{ "contractName": "UniswapArbitrageur", "abi": [ { "inputs": [ { "internalType": "address", "name": "_uniswap", "type": "address" }, { "internalType": "address", "name": "_dodo", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "_BASE_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_DODO_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_QUOTE_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_REVERSE_", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_UNISWAP_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "baseAmount", "type": "uint256" } ], "name": "executeBuyArbitrage", "outputs": [ { "internalType": "uint256", "name": "quoteProfit", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "baseAmount", "type": "uint256" } ], "name": "executeSellArbitrage", "outputs": [ { "internalType": "uint256", "name": "baseProfit", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bool", "name": "isDODOBuy", "type": "bool" }, { "internalType": "uint256", "name": "baseAmount", "type": "uint256" }, { "internalType": "uint256", "name": "quoteAmount", "type": "uint256" }, { "internalType": "bytes", "name": "", "type": "bytes" } ], "name": "dodoCall", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "retrieve", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.6.9+commit.3e3065ac\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_uniswap\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_dodo\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"_BASE_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_DODO_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_QUOTE_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_REVERSE_\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_UNISWAP_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isDODOBuy\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quoteAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"dodoCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"}],\"name\":\"executeBuyArbitrage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"quoteProfit\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"}],\"name\":\"executeSellArbitrage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"baseProfit\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"retrieve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/UniswapArbitrageur.sol\":\"UniswapArbitrageur\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/UniswapArbitrageur.sol\":{\"keccak256\":\"0xdc579c56e5f96b8d2b8490aba8b175063e185ab989f2c868a2c698ccc8a370b6\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://7c51ce6b69657968d20de307f4d85e66f439ad448c1bf2c89352b0f508b3e74b\",\"dweb:/ipfs/QmYAg4jZeQCA1pM9y85F1kYZ1QL2GoBeDLRckduGG9M4Ti\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IDODO.sol\":{\"keccak256\":\"0x8fd9ec49ff1517e33698dc8dd4022da05f3a1ae6e4bf97c48f5f5b6714df2123\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://cfaa388f09d627ad26c66e6c4a73c232d494010b73b989392e264f815a84cd1d\",\"dweb:/ipfs/QmSBNeEyjgFSAtcYpKjyQfKZx7ahZKFwUtnnbpSSpS3p2H\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IERC20.sol\":{\"keccak256\":\"0x40355eddd56b5a9ac760c5a056e135946b372b724fb632415792ad82c60a9ac5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://66e932da3bb19bdd0a7b17715099bc419f087cbf06809885fd98a7a35574387e\",\"dweb:/ipfs/Qmdv97dz4214Xrbb8xGbuYPJtvmqAoUcXuSCFgA8NzBUsg\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/Ownable.sol\":{\"keccak256\":\"0xb7a2ca6570834e4784e86d19fd5a4b6b1eff22a4586dc240659943396a365aa5\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://5855a493c78e787d7effd87d9c661acbcd19ca1e1ba72dbeaa91c3c8db29cbb4\",\"dweb:/ipfs/QmSddEexZ5okMatgoQ5JZRoJqe7BwsJwwWA2o1kKx7vbTH\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeERC20.sol\":{\"keccak256\":\"0xe11bb64537b764f7b0b64f817ffa0b4b278c2017474ff985428225b3f0928295\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c756ca959d2326d58ed49b8a2d39100866197596ba09240e4f1bf861399a6e96\",\"dweb:/ipfs/QmdgzWZNT614vRnb5zsDva91bkLpvZmCVV5d6xetqsyedR\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0x57d750628881687f826b54f60cbfd46c1a172433eed892bbb123f91869886af1\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://b40bd7946010ddae9679f36630510217dcaa9cb8643824f9edc8ef52bda95717\",\"dweb:/ipfs/QmZSjpfUGyrmokZyaMc74a8h6zy2qFVECPVP8VfTvzNEFb\"]}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200159d3803806200159d833981016040819052620000349162000481565b600080546001600160a01b038085166001600160a01b0319928316178355600180548583169316929092179182905560408051632512469560e11b815290519290911692634a248d2a926004808401936020939083900390910190829087803b158015620000a157600080fd5b505af1158015620000b6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000dc919062000451565b600280546001600160a01b0319166001600160a01b0392831617905560015460408051636a5cb82360e11b81529051919092169163d4b970469160048083019260209291908290030181600087803b1580156200013857600080fd5b505af11580156200014d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000173919062000451565b600380546001600160a01b0319166001600160a01b039283161790556000805460408051630dfe168160e01b8152905192939190911691630dfe168191600480820192602092909190829003018186803b158015620001d157600080fd5b505afa158015620001e6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020c919062000451565b905060008060009054906101000a90046001600160a01b03166001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156200025e57600080fd5b505afa15801562000273573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000299919062000451565b6002549091506001600160a01b038381169116148015620002c757506003546001600160a01b038281169116145b15620002e0576003805460ff60a01b1916905562000325565b6003546001600160a01b0383811691161480156200030b57506002546001600160a01b038281169116145b1562000325576003805460ff60a01b1916600160a01b1790555b60025460015460405163095ea7b360e01b81526001600160a01b039283169263095ea7b3926200035f9291169060001990600401620004e1565b602060405180830381600087803b1580156200037a57600080fd5b505af11580156200038f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003b59190620004bf565b5060035460015460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392620003f09291169060001990600401620004e1565b602060405180830381600087803b1580156200040b57600080fd5b505af115801562000420573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004469190620004bf565b505050505062000513565b60006020828403121562000463578081fd5b81516001600160a01b03811681146200047a578182fd5b9392505050565b6000806040838503121562000494578081fd5b8251620004a181620004fa565b6020840151909250620004b481620004fa565b809150509250929050565b600060208284031215620004d1578081fd5b815180151581146200047a578182fd5b6001600160a01b03929092168252602082015260400190565b6001600160a01b03811681146200051057600080fd5b50565b61107a80620005236000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063919d365d11610066578063919d365d146100e8578063949805ff14610108578063c3a2a6651461011b578063ca436ea41461012e578063f4c7076a1461013657610093565b806323208b5a1461009857806325755c95146100b657806360378cea146100be57806375103e15146100d3575b600080fd5b6100a061013e565b6040516100ad9190610e2d565b60405180910390f35b6100a061014d565b6100d16100cc366004610cc6565b61015c565b005b6100db6101c3565b6040516100ad9190610e5a565b6100fb6100f6366004610dae565b6101d3565b6040516100ad9190610fc1565b6100fb610116366004610dae565b610364565b6100d1610129366004610c74565b61049f565b6100a06104bd565b6100a06104cc565b6001546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b0316331461018f5760405162461bcd60e51b815260040161018690610e65565b60405180910390fd5b600354600160a01b900460ff16156101b1576101ac8585856104db565b6101bc565b6101bc858585610836565b5050505050565b600354600160a01b900460ff1681565b600154604051638dae733360e01b81526000916001600160a01b031690638dae7333906102069085908590600401610fca565b602060405180830381600087803b15801561022057600080fd5b505af1158015610234573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102589190610dc6565b506002546040516370a0823160e01b81526001600160a01b03909116906370a0823190610289903090600401610e2d565b60206040518083038186803b1580156102a157600080fd5b505afa1580156102b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d99190610dc6565b60025460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb9061030c9033908590600401610e41565b602060405180830381600087803b15801561032657600080fd5b505af115801561033a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035e9190610caa565b50919050565b60015460405163733e738360e11b81526000916001600160a01b03169063e67ce7069061039990859060001990600401610fca565b602060405180830381600087803b1580156103b357600080fd5b505af11580156103c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103eb9190610dc6565b506003546040516370a0823160e01b81526001600160a01b03909116906370a082319061041c903090600401610e2d565b60206040518083038186803b15801561043457600080fd5b505afa158015610448573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046c9190610dc6565b60035460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb9061030c9033908590600401610e41565b6104b96001600160a01b038316338363ffffffff610a9a16565b5050565b6003546001600160a01b031681565b6002546001600160a01b031681565b6000805460408051630240bc6b60e21b8152905183926001600160a01b031691630902f1ac916004808301926060929190829003018186803b15801561052057600080fd5b505afa158015610534573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105589190610d5a565b5090925090506001600160701b0380831690821660008088156106e65760025460005460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb926105ab929116908c90600401610e41565b602060405180830381600087803b1580156105c557600080fd5b505af11580156105d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fd9190610caa565b50600061062f610613858b63ffffffff610af516565b610623878763ffffffff610b2316565b9063ffffffff610b5d16565b90506106596127106106236126f161064d898663ffffffff610b8f16565b9063ffffffff610b2316565b925087831161067a5760405162461bcd60e51b815260040161018690610f76565b60005460405163022c0d9f60e01b81526001600160a01b039091169063022c0d9f906106ae90869086903090600401610ff0565b600060405180830381600087803b1580156106c857600080fd5b505af11580156106dc573d6000803e3d6000fd5b505050505061082b565b60035460005460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb9261071c929116908b90600401610e41565b602060405180830381600087803b15801561073657600080fd5b505af115801561074a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076e9190610caa565b506000610784610613868a63ffffffff610af516565b90506107a26127106106236126f161064d888663ffffffff610b8f16565b91508882116107c35760405162461bcd60e51b815260040161018690610f76565b60005460405163022c0d9f60e01b81526001600160a01b039091169063022c0d9f906107f790869086903090600401610ff0565b600060405180830381600087803b15801561081157600080fd5b505af1158015610825573d6000803e3d6000fd5b50505050505b505050505050505050565b6000805460408051630240bc6b60e21b8152905183926001600160a01b031691630902f1ac916004808301926060929190829003018186803b15801561087b57600080fd5b505afa15801561088f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b39190610d5a565b5090925090506001600160701b0380831690821660008088156109bd5760025460005460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb92610906929116908c90600401610e41565b602060405180830381600087803b15801561092057600080fd5b505af1158015610934573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109589190610caa565b50600061097e61096e868b63ffffffff610af516565b610623868863ffffffff610b2316565b905061099c6127106106236126f161064d888663ffffffff610b8f16565b915087821161067a5760405162461bcd60e51b815260040161018690610f76565b60035460005460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb926109f3929116908b90600401610e41565b602060405180830381600087803b158015610a0d57600080fd5b505af1158015610a21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a459190610caa565b506000610a5b61096e858a63ffffffff610af516565b9050610a796127106106236126f161064d898663ffffffff610b8f16565b92508883116107c35760405162461bcd60e51b815260040161018690610f76565b610af08363a9059cbb60e01b8484604051602401610ab9929190610e41565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610bb7565b505050565b600082820183811015610b1a5760405162461bcd60e51b815260040161018690610f09565b90505b92915050565b600082610b3257506000610b1d565b82820282848281610b3f57fe5b0414610b1a5760405162461bcd60e51b815260040161018690610f9e565b6000808211610b7e5760405162461bcd60e51b815260040161018690610ebe565b818381610b8757fe5b049392505050565b600082821115610bb15760405162461bcd60e51b815260040161018690610ee6565b50900390565b60006060836001600160a01b031683604051610bd39190610df4565b6000604051808303816000865af19150503d8060008114610c10576040519150601f19603f3d011682016040523d82523d6000602084013e610c15565b606091505b509150915081610c375760405162461bcd60e51b815260040161018690610e89565b805115610c6e5780806020019051810190610c529190610caa565b610c6e5760405162461bcd60e51b815260040161018690610f2c565b50505050565b60008060408385031215610c86578182fd5b82356001600160a01b0381168114610c9c578283fd5b946020939093013593505050565b600060208284031215610cbb578081fd5b8151610b1a8161101e565b600080600080600060808688031215610cdd578081fd5b8535610ce88161101e565b94506020860135935060408601359250606086013567ffffffffffffffff80821115610d12578283fd5b81880189601f820112610d23578384fd5b8035925081831115610d33578384fd5b896020848301011115610d44578384fd5b6020810194505050809150509295509295909350565b600080600060608486031215610d6e578283fd5b8351610d798161102f565b6020850151909350610d8a8161102f565b604085015190925063ffffffff81168114610da3578182fd5b809150509250925092565b600060208284031215610dbf578081fd5b5035919050565b600060208284031215610dd7578081fd5b5051919050565b60038152620c1e1960ea1b602082015260400190565b60008251815b81811015610e145760208186018101518583015201610dfa565b81811115610e225782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6020808252600a908201526957524f4e475f444f444f60b01b604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252600e908201526d2224ab24a224a723afa2a92927a960911b604082015260600190565b60208082526009908201526829aaa12fa2a92927a960b91b604082015260600190565b60208082526009908201526820a2222fa2a92927a960b91b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252600e908201526d4e4f545f50524f46495441424c4560901b604082015260600190565b60208082526009908201526826aaa62fa2a92927a960b91b604082015260600190565b90815260200190565b600083825282602083015260606040830152610fe860608301610dde565b949350505050565b92835260208301919091526001600160a01b0316604082015260806060820181905260009082015260a00190565b801515811461102c57600080fd5b50565b6001600160701b038116811461102c57600080fdfea26469706673582212201ea39c0ccb151d3e43c2b6a501dfd3dbb90b6a942e145fb823668cef61e177ae64736f6c63430006090033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063919d365d11610066578063919d365d146100e8578063949805ff14610108578063c3a2a6651461011b578063ca436ea41461012e578063f4c7076a1461013657610093565b806323208b5a1461009857806325755c95146100b657806360378cea146100be57806375103e15146100d3575b600080fd5b6100a061013e565b6040516100ad9190610e2d565b60405180910390f35b6100a061014d565b6100d16100cc366004610cc6565b61015c565b005b6100db6101c3565b6040516100ad9190610e5a565b6100fb6100f6366004610dae565b6101d3565b6040516100ad9190610fc1565b6100fb610116366004610dae565b610364565b6100d1610129366004610c74565b61049f565b6100a06104bd565b6100a06104cc565b6001546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b0316331461018f5760405162461bcd60e51b815260040161018690610e65565b60405180910390fd5b600354600160a01b900460ff16156101b1576101ac8585856104db565b6101bc565b6101bc858585610836565b5050505050565b600354600160a01b900460ff1681565b600154604051638dae733360e01b81526000916001600160a01b031690638dae7333906102069085908590600401610fca565b602060405180830381600087803b15801561022057600080fd5b505af1158015610234573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102589190610dc6565b506002546040516370a0823160e01b81526001600160a01b03909116906370a0823190610289903090600401610e2d565b60206040518083038186803b1580156102a157600080fd5b505afa1580156102b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d99190610dc6565b60025460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb9061030c9033908590600401610e41565b602060405180830381600087803b15801561032657600080fd5b505af115801561033a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035e9190610caa565b50919050565b60015460405163733e738360e11b81526000916001600160a01b03169063e67ce7069061039990859060001990600401610fca565b602060405180830381600087803b1580156103b357600080fd5b505af11580156103c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103eb9190610dc6565b506003546040516370a0823160e01b81526001600160a01b03909116906370a082319061041c903090600401610e2d565b60206040518083038186803b15801561043457600080fd5b505afa158015610448573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046c9190610dc6565b60035460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb9061030c9033908590600401610e41565b6104b96001600160a01b038316338363ffffffff610a9a16565b5050565b6003546001600160a01b031681565b6002546001600160a01b031681565b6000805460408051630240bc6b60e21b8152905183926001600160a01b031691630902f1ac916004808301926060929190829003018186803b15801561052057600080fd5b505afa158015610534573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105589190610d5a565b5090925090506001600160701b0380831690821660008088156106e65760025460005460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb926105ab929116908c90600401610e41565b602060405180830381600087803b1580156105c557600080fd5b505af11580156105d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fd9190610caa565b50600061062f610613858b63ffffffff610af516565b610623878763ffffffff610b2316565b9063ffffffff610b5d16565b90506106596127106106236126f161064d898663ffffffff610b8f16565b9063ffffffff610b2316565b925087831161067a5760405162461bcd60e51b815260040161018690610f76565b60005460405163022c0d9f60e01b81526001600160a01b039091169063022c0d9f906106ae90869086903090600401610ff0565b600060405180830381600087803b1580156106c857600080fd5b505af11580156106dc573d6000803e3d6000fd5b505050505061082b565b60035460005460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb9261071c929116908b90600401610e41565b602060405180830381600087803b15801561073657600080fd5b505af115801561074a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076e9190610caa565b506000610784610613868a63ffffffff610af516565b90506107a26127106106236126f161064d888663ffffffff610b8f16565b91508882116107c35760405162461bcd60e51b815260040161018690610f76565b60005460405163022c0d9f60e01b81526001600160a01b039091169063022c0d9f906107f790869086903090600401610ff0565b600060405180830381600087803b15801561081157600080fd5b505af1158015610825573d6000803e3d6000fd5b50505050505b505050505050505050565b6000805460408051630240bc6b60e21b8152905183926001600160a01b031691630902f1ac916004808301926060929190829003018186803b15801561087b57600080fd5b505afa15801561088f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b39190610d5a565b5090925090506001600160701b0380831690821660008088156109bd5760025460005460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb92610906929116908c90600401610e41565b602060405180830381600087803b15801561092057600080fd5b505af1158015610934573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109589190610caa565b50600061097e61096e868b63ffffffff610af516565b610623868863ffffffff610b2316565b905061099c6127106106236126f161064d888663ffffffff610b8f16565b915087821161067a5760405162461bcd60e51b815260040161018690610f76565b60035460005460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb926109f3929116908b90600401610e41565b602060405180830381600087803b158015610a0d57600080fd5b505af1158015610a21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a459190610caa565b506000610a5b61096e858a63ffffffff610af516565b9050610a796127106106236126f161064d898663ffffffff610b8f16565b92508883116107c35760405162461bcd60e51b815260040161018690610f76565b610af08363a9059cbb60e01b8484604051602401610ab9929190610e41565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610bb7565b505050565b600082820183811015610b1a5760405162461bcd60e51b815260040161018690610f09565b90505b92915050565b600082610b3257506000610b1d565b82820282848281610b3f57fe5b0414610b1a5760405162461bcd60e51b815260040161018690610f9e565b6000808211610b7e5760405162461bcd60e51b815260040161018690610ebe565b818381610b8757fe5b049392505050565b600082821115610bb15760405162461bcd60e51b815260040161018690610ee6565b50900390565b60006060836001600160a01b031683604051610bd39190610df4565b6000604051808303816000865af19150503d8060008114610c10576040519150601f19603f3d011682016040523d82523d6000602084013e610c15565b606091505b509150915081610c375760405162461bcd60e51b815260040161018690610e89565b805115610c6e5780806020019051810190610c529190610caa565b610c6e5760405162461bcd60e51b815260040161018690610f2c565b50505050565b60008060408385031215610c86578182fd5b82356001600160a01b0381168114610c9c578283fd5b946020939093013593505050565b600060208284031215610cbb578081fd5b8151610b1a8161101e565b600080600080600060808688031215610cdd578081fd5b8535610ce88161101e565b94506020860135935060408601359250606086013567ffffffffffffffff80821115610d12578283fd5b81880189601f820112610d23578384fd5b8035925081831115610d33578384fd5b896020848301011115610d44578384fd5b6020810194505050809150509295509295909350565b600080600060608486031215610d6e578283fd5b8351610d798161102f565b6020850151909350610d8a8161102f565b604085015190925063ffffffff81168114610da3578182fd5b809150509250925092565b600060208284031215610dbf578081fd5b5035919050565b600060208284031215610dd7578081fd5b5051919050565b60038152620c1e1960ea1b602082015260400190565b60008251815b81811015610e145760208186018101518583015201610dfa565b81811115610e225782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6020808252600a908201526957524f4e475f444f444f60b01b604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252600e908201526d2224ab24a224a723afa2a92927a960911b604082015260600190565b60208082526009908201526829aaa12fa2a92927a960b91b604082015260600190565b60208082526009908201526820a2222fa2a92927a960b91b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252600e908201526d4e4f545f50524f46495441424c4560901b604082015260600190565b60208082526009908201526826aaa62fa2a92927a960b91b604082015260600190565b90815260200190565b600083825282602083015260606040830152610fe860608301610dde565b949350505050565b92835260208301919091526001600160a01b0316604082015260806060820181905260009082015260a00190565b801515811461102c57600080fd5b50565b6001600160701b038116811461102c57600080fdfea26469706673582212201ea39c0ccb151d3e43c2b6a501dfd3dbb90b6a942e145fb823668cef61e177ae64736f6c63430006090033", "immutableReferences": {}, "sourceMap": "825:4996:20:-:0;;;1106:696;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1168:9;:20;;-1:-1:-1;;;;;1168:20:20;;;-1:-1:-1;;;;;;1168:20:20;;;;;;;1198:14;;;;;;;;;;;;;;;1232:28;;;-1:-1:-1;;;1232:28:20;;;;1238:6;;;;;1232:26;;:28;;;;;;;;;;;;;;;;;1238:6;1232:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1223:6;:37;;-1:-1:-1;;;;;;1223:37:20;-1:-1:-1;;;;;1223:37:20;;;;;;-1:-1:-1;1286:6:20;1280:29;;;-1:-1:-1;;;1280:29:20;;;;1286:6;;;;;1280:27;;:29;;;;;;;;;;;;;;-1:-1:-1;1286:6:20;1280:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1270:7;:39;;-1:-1:-1;;;;;;1270:39:20;-1:-1:-1;;;;;1270:39:20;;;;;;-1:-1:-1;1352:9:20;;1337:34;;;-1:-1:-1;;;1337:34:20;;;;-1:-1:-1;;1352:9:20;;;;;1337:32;;:34;;;;;;;;;;;;;;;1352:9;1337:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1320:51;;1381:14;1413:9;;;;;;;;;-1:-1:-1;;;;;1413:9:20;-1:-1:-1;;;;;1398:32:20;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1457:6;;1381:51;;-1:-1:-1;;;;;;1447:16:20;;;1457:6;;1447:16;:37;;;;-1:-1:-1;1477:7:20;;-1:-1:-1;;;;;1467:17:20;;;1477:7;;1467:17;1447:37;1443:245;;;1500:9;:17;;-1:-1:-1;;;;1500:17:20;;;1443:245;;;1548:7;;-1:-1:-1;;;;;1538:17:20;;;1548:7;;1538:17;:37;;;;-1:-1:-1;1569:6:20;;-1:-1:-1;;;;;1559:16:20;;;1569:6;;1559:16;1538:37;1534:154;;;1591:9;:16;;-1:-1:-1;;;;1591:16:20;-1:-1:-1;;;1591:16:20;;;1534:154;1705:6;;;1721;1698:43;;-1:-1:-1;;;1698:43:20;;-1:-1:-1;;;;;1705:6:20;;;;1698:22;;:43;;1721:6;;;-1:-1:-1;;1737:2:20;1698:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1758:7:20;;;1775:6;1751:44;;-1:-1:-1;;;1751:44:20;;-1:-1:-1;;;;;1758:7:20;;;;1751:23;;:44;;1775:6;;;-1:-1:-1;;1791:2:20;1751:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1106:696;;;;825:4996;;281:263:-1;;396:2;384:9;375:7;371:23;367:32;364:2;;;-1:-1;;402:12;364:2;83:13;;-1:-1;;;;;2979:54;;3183:35;;3173:2;;-1:-1;;3222:12;3173:2;454:74;358:186;-1:-1;;;358:186;551:399;;;683:2;671:9;662:7;658:23;654:32;651:2;;;-1:-1;;689:12;651:2;89:6;83:13;101:33;128:5;101:33;;;852:2;902:22;;83:13;741:74;;-1:-1;101:33;83:13;101:33;;;860:74;;;;645:305;;;;;;957:257;;1069:2;1057:9;1048:7;1044:23;1040:32;1037:2;;;-1:-1;;1075:12;1037:2;227:6;221:13;3329:5;2891:13;2884:21;3307:5;3304:32;3294:2;;-1:-1;;3340:12;1792:333;-1:-1;;;;;2979:54;;;;1292:37;;2111:2;2096:18;;1743:37;1947:2;1932:18;;1918:207;3124:117;-1:-1;;;;;2979:54;;3183:35;;3173:2;;3232:1;;3222:12;3173:2;3167:74;;;825:4996:20;;;;;;", "deployedSourceMap": "825:4996:20:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;954:21;;;:::i;:::-;;;;;;;;;;;;;;;;924:24;;;:::i;2434:377::-;;;;;;;;;:::i;:::-;;1037:21;;;:::i;:::-;;;;;;;;2128:300;;;;;;;;;:::i;:::-;;;;;;;;1808:314;;;;;;;;;:::i;5698:121::-;;;;;;;;;:::i;1008:22::-;;;:::i;981:21::-;;;:::i;954:::-;;;-1:-1:-1;;;;;954:21:20;;:::o;924:24::-;;;-1:-1:-1;;;;;924:24:20;;:::o;2434:377::-;2604:6;;-1:-1:-1;;;;;2604:6:20;2590:10;:20;2582:43;;;;-1:-1:-1;;;2582:43:20;;;;;;;;;;;;;;;;;2639:9;;-1:-1:-1;;;2639:9:20;;;;2635:170;;;2664:53;2682:9;2693:10;2705:11;2664:17;:53::i;:::-;2635:170;;;2748:46;2759:9;2770:10;2782:11;2748:10;:46::i;:::-;2434:377;;;;;:::o;1037:21::-;;;-1:-1:-1;;;1037:21:20;;;;;:::o;2128:300::-;2232:6;;2226:49;;-1:-1:-1;;;2226:49:20;;2196:18;;-1:-1:-1;;;;;2232:6:20;;2226:27;;:49;;2254:10;;2196:18;;2226:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2305:6:20;;2298:39;;-1:-1:-1;;;2298:39:20;;-1:-1:-1;;;;;2305:6:20;;;;2298:24;;:39;;2331:4;;2298:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2354:6;;2347:47;;-1:-1:-1;;;2347:47:20;;2285:52;;-1:-1:-1;;;;;;2354:6:20;;2347:23;;:47;;2371:10;;2285:52;;2347:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2128:300:20;;;:::o;1808:314::-;1912:6;;1906:58;;-1:-1:-1;;;1906:58:20;;1875:19;;-1:-1:-1;;;;;1912:6:20;;1906:26;;:58;;1933:10;;-1:-1:-1;;1953:2:20;1906:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1995:7:20;;1988:40;;-1:-1:-1;;;1988:40:20;;-1:-1:-1;;;;;1995:7:20;;;;1988:25;;:40;;2022:4;;1988:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2045:7;;2038:49;;-1:-1:-1;;;2038:49:20;;1974:54;;-1:-1:-1;;;;;;2045:7:20;;2038:24;;:49;;2063:10;;1974:54;;2038:49;;;;5698:121;5766:46;-1:-1:-1;;;;;5766:26:20;;5793:10;5805:6;5766:46;:26;:46;:::i;:::-;5698:121;;:::o;1008:22::-;;;-1:-1:-1;;;;;1008:22:20;;:::o;981:21::-;;;-1:-1:-1;;;;;981:21:20;;:::o;2817:1438::-;2951:17;3008:9;;2993:39;;;-1:-1:-1;;;2993:39:20;;;;2951:17;;-1:-1:-1;;;;;3008:9:20;;2993:37;;:39;;;;;;;;;;;;;;3008:9;2993:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2950:82:20;;-1:-1:-1;2950:82:20;-1:-1:-1;;;;;;3066:18:20;;;;3118;;3042:21;;3206:1043;;;;3242:6;;;3259:9;3235:46;;-1:-1:-1;;;3235:46:20;;-1:-1:-1;;;;;3242:6:20;;;;3235:23;;:46;;3259:9;;;3270:10;;3235:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3339:24:20;3366:97;3420:29;:13;3438:10;3420:29;:17;:29;:::i;:::-;3366:32;:13;3384;3366:32;:17;:32;:::i;:::-;:36;:97;:36;:97;:::i;:::-;3339:124;-1:-1:-1;3492:56:20;3542:5;3492:45;3532:4;3492:35;:13;3339:124;3492:35;:17;:35;:::i;:::-;:39;:45;:39;:45;:::i;:56::-;3477:71;;3599:11;3584:12;:26;3576:53;;;;-1:-1:-1;;;3576:53:20;;;;;;;;;3658:9;;3643:77;;-1:-1:-1;;;3643:77:20;;-1:-1:-1;;;;;3658:9:20;;;;3643:30;;:77;;3674:12;;3688;;3710:4;;3643:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3206:1043;;;;3758:7;;;3776:9;3751:48;;-1:-1:-1;;;3751:48:20;;-1:-1:-1;;;;;3758:7:20;;;;3751:24;;:48;;3776:9;;;3787:11;;3751:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3857:24:20;3884:98;3938:30;:13;3956:11;3938:30;:17;:30;:::i;3884:98::-;3857:125;-1:-1:-1;4011:56:20;4061:5;4011:45;4051:4;4011:35;:13;3857:125;4011:35;:17;:35;:::i;:56::-;3996:71;;4118:10;4103:12;:25;4095:52;;;;-1:-1:-1;;;4095:52:20;;;;;;;;;4176:9;;4161:77;;-1:-1:-1;;;4161:77:20;;-1:-1:-1;;;;;4176:9:20;;;;4161:30;;:77;;4192:12;;4206;;4228:4;;4161:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3206:1043;;2817:1438;;;;;;;;;:::o;4261:1431::-;4388:17;4445:9;;4430:39;;;-1:-1:-1;;;4430:39:20;;;;4388:17;;-1:-1:-1;;;;;4445:9:20;;4430:37;;:39;;;;;;;;;;;;;;4445:9;4430:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4387:82:20;;-1:-1:-1;4387:82:20;-1:-1:-1;;;;;;4503:18:20;;;;4555;;4479:21;;4643:1043;;;;4679:6;;;4696:9;4672:46;;-1:-1:-1;;;4672:46:20;;-1:-1:-1;;;;;4679:6:20;;;;4672:23;;:46;;4696:9;;;4707:10;;4672:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4776:24:20;4803:97;4857:29;:13;4875:10;4857:29;:17;:29;:::i;:::-;4803:32;:13;4821;4803:32;:17;:32;:::i;:97::-;4776:124;-1:-1:-1;4929:56:20;4979:5;4929:45;4969:4;4929:35;:13;4776:124;4929:35;:17;:35;:::i;:56::-;4914:71;;5036:11;5021:12;:26;5013:53;;;;-1:-1:-1;;;5013:53:20;;;;;;;;4643:1043;5195:7;;;5213:9;5188:48;;-1:-1:-1;;;5188:48:20;;-1:-1:-1;;;;;5195:7:20;;;;5188:24;;:48;;5213:9;;;5224:11;;5188:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5294:24:20;5321:98;5375:30;:13;5393:11;5375:30;:17;:30;:::i;5321:98::-;5294:125;-1:-1:-1;5448:56:20;5498:5;5448:45;5488:4;5448:35;:13;5294:125;5448:35;:17;:35;:::i;:56::-;5433:71;;5555:10;5540:12;:25;5532:52;;;;-1:-1:-1;;;5532:52:20;;;;;;;;804:205:40;916:86;936:5;966:23;;;991:2;995:5;943:58;;;;;;;;;;;;;;-1:-1:-1;;943:58:40;;;;;;;;;;;;;;-1:-1:-1;;;;;943:58:40;-1:-1:-1;;;;;;943:58:40;;;;;;;;;;916:19;:86::i;:::-;804:205;;;:::o;1074:157:41:-;1132:7;1163:5;;;1186:6;;;;1178:28;;;;-1:-1:-1;;;1178:28:41;;;;;;;;;1223:1;-1:-1:-1;1074:157:41;;;;;:::o;281:217::-;339:7;362:6;358:45;;-1:-1:-1;391:1:41;384:8;;358:45;425:5;;;429:1;425;:5;:1;448:5;;;;;:10;440:32;;;;-1:-1:-1;;;440:32:41;;;;;;;;504:138;562:7;593:1;589;:5;581:32;;;;-1:-1:-1;;;581:32:41;;;;;;;;;634:1;630;:5;;;;;;;504:138;-1:-1:-1;;;504:138:41:o;934:134::-;992:7;1024:1;1019;:6;;1011:28;;;;-1:-1:-1;;;1011:28:41;;;;;;;;;-1:-1:-1;1056:5:41;;;934:134::o;2335:1027:40:-;2984:12;2998:23;3033:5;-1:-1:-1;;;;;3025:19:40;3045:4;3025:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2983:67;;;;3068:7;3060:52;;;;-1:-1:-1;;;3060:52:40;;;;;;;;;3127:17;;:21;3123:233;;3279:10;3268:30;;;;;;;;;;;;;;3260:85;;;;-1:-1:-1;;;3260:85:40;;;;;;;;;2335:1027;;;;:::o;1324:366:-1:-;;;1445:2;1433:9;1424:7;1420:23;1416:32;1413:2;;;-1:-1;;1451:12;1413:2;72:20;;-1:-1;;;;;16078:54;;17156:35;;17146:2;;-1:-1;;17195:12;17146:2;1503:63;1603:2;1642:22;;;;974:20;;-1:-1;;;1407:283;1697:257;;1809:2;1797:9;1788:7;1784:23;1780:32;1777:2;;;-1:-1;;1815:12;1777:2;354:6;348:13;366:30;390:5;366:30;;1961:735;;;;;;2132:3;2120:9;2111:7;2107:23;2103:33;2100:2;;;-1:-1;;2139:12;2100:2;219:6;206:20;231:30;255:5;231:30;;;2191:60;-1:-1;2288:2;2327:22;;974:20;;-1:-1;2396:2;2435:22;;974:20;;-1:-1;2532:2;2517:18;;2504:32;2556:18;2545:30;;;2542:2;;;-1:-1;;2578:12;2542:2;2663:6;2652:9;2648:22;536:3;529:4;521:6;517:17;513:27;503:2;;-1:-1;;544:12;503:2;587:6;574:20;564:30;;2556:18;606:6;603:30;600:2;;;-1:-1;;636:12;600:2;731:3;2288:2;711:17;672:6;697:32;;694:41;691:2;;;-1:-1;;738:12;691:2;2288;672:6;668:17;2606:74;;;;;;;;2094:602;;;;;;;;;2703:533;;;;2851:2;2839:9;2830:7;2826:23;2822:32;2819:2;;;-1:-1;;2857:12;2819:2;850:6;844:13;862:33;889:5;862:33;;;3020:2;3070:22;;844:13;2909:74;;-1:-1;862:33;844:13;862:33;;;3139:2;3188:22;;1262:13;3028:74;;-1:-1;16295:10;16284:22;;17645:34;;17635:2;;-1:-1;;17683:12;17635:2;3147:73;;;;2813:423;;;;;;3243:241;;3347:2;3335:9;3326:7;3322:23;3318:32;3315:2;;;-1:-1;;3353:12;3315:2;-1:-1;974:20;;3309:175;-1:-1;3309:175;3491:263;;3606:2;3594:9;3585:7;3581:23;3577:32;3574:2;;;-1:-1;;3612:12;3574:2;-1:-1;1122:13;;3568:186;-1:-1;3568:186;5314:300;5536:1;15317:19;;-1:-1;;;15366:4;15357:14;;5551:26;5596:12;;;5459:155;7996:271;;4301:5;15173:12;-1:-1;16893:101;16907:6;16904:1;16901:13;16893:101;;;4445:4;16974:11;;;;;16968:18;16955:11;;;16948:39;16922:10;16893:101;;;17009:6;17006:1;17003:13;17000:2;;;-1:-1;17065:6;17060:3;17056:16;17049:27;17000:2;-1:-1;4476:16;;;;;8130:137;-1:-1;;8130:137;8274:222;-1:-1;;;;;16078:54;;;;3981:37;;8401:2;8386:18;;8372:124;8503:349;-1:-1;;;;;16078:54;;;;3840:58;;8838:2;8823:18;;7947:37;8666:2;8651:18;;8637:215;9199:210;15874:13;;15867:21;4095:34;;9320:2;9305:18;;9291:118;9416:416;9616:2;9630:47;;;4878:2;9601:18;;;15317:19;-1:-1;;;15357:14;;;4894:33;4946:12;;;9587:245;9839:416;10039:2;10053:47;;;10024:18;;;15317:19;5233:34;15357:14;;;5213:55;5287:12;;;10010:245;10262:416;10462:2;10476:47;;;5847:2;10447:18;;;15317:19;-1:-1;;;15357:14;;;5863:37;5919:12;;;10433:245;10685:416;10885:2;10899:47;;;6170:1;10870:18;;;15317:19;-1:-1;;;15357:14;;;6185:32;6236:12;;;10856:245;11108:416;11308:2;11322:47;;;6756:1;11293:18;;;15317:19;-1:-1;;;15357:14;;;6771:32;6822:12;;;11279:245;11531:416;11731:2;11745:47;;;7073:2;11716:18;;;15317:19;7109:34;15357:14;;;7089:55;-1:-1;;;7164:12;;;7157:34;7210:12;;;11702:245;11954:416;12154:2;12168:47;;;7461:2;12139:18;;;15317:19;-1:-1;;;15357:14;;;7477:37;7533:12;;;12125:245;12377:416;12577:2;12591:47;;;7784:1;12562:18;;;15317:19;-1:-1;;;15357:14;;;7799:32;7850:12;;;12548:245;12800:222;7947:37;;;12927:2;12912:18;;12898:124;13029:652;;7977:5;7954:3;7947:37;16541:24;13464:2;13453:9;13449:18;4583:58;13292:2;13501;13490:9;13486:18;13479:48;13541:130;13292:2;13281:9;13277:18;13541:130;;;13533:138;13263:418;-1:-1;;;;13263:418;13688:748;7947:37;;;14136:2;14121:18;;7947:37;;;;-1:-1;;;;;16078:54;14219:2;14204:18;;3981:37;13971:3;14256:2;14241:18;;14234:48;;;13688:748;13956:19;;;15317;16089:42;15357:14;;13942:494;17221:111;17302:5;15874:13;15867:21;17280:5;17277:32;17267:2;;17323:1;;17313:12;17267:2;17261:71;;17339:117;-1:-1;;;;;17426:5;15962:42;17401:5;17398:35;17388:2;;17447:1;;17437:12", "source": "/*\n\n Copyright 2020 DODO ZOO.\n SPDX-License-Identifier: Apache-2.0\n\n*/\n\npragma solidity 0.6.9;\npragma experimental ABIEncoderV2;\n\nimport {Ownable} from \"../lib/Ownable.sol\";\nimport {IDODO} from \"../intf/IDODO.sol\";\nimport {IERC20} from \"../intf/IERC20.sol\";\nimport {SafeERC20} from \"../lib/SafeERC20.sol\";\nimport {SafeMath} from \"../lib/SafeMath.sol\";\n\ninterface IUniswapV2Pair {\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function getReserves()\n external\n view\n returns (\n uint112 reserve0,\n uint112 reserve1,\n uint32 blockTimestampLast\n );\n\n function swap(\n uint256 amount0Out,\n uint256 amount1Out,\n address to,\n bytes calldata data\n ) external;\n}\n\ncontract UniswapArbitrageur {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n address public _UNISWAP_;\n address public _DODO_;\n address public _BASE_;\n address public _QUOTE_;\n\n bool public _REVERSE_; // true if dodo.baseToken=uniswap.token0\n\n constructor(address _uniswap, address _dodo) public {\n _UNISWAP_ = _uniswap;\n _DODO_ = _dodo;\n\n _BASE_ = IDODO(_DODO_)._BASE_TOKEN_();\n _QUOTE_ = IDODO(_DODO_)._QUOTE_TOKEN_();\n\n address token0 = IUniswapV2Pair(_UNISWAP_).token0();\n address token1 = IUniswapV2Pair(_UNISWAP_).token1();\n\n if (token0 == _BASE_ && token1 == _QUOTE_) {\n _REVERSE_ = false;\n } else if (token0 == _QUOTE_ && token1 == _BASE_) {\n _REVERSE_ = true;\n } else {\n require(true, \"DODO_UNISWAP_NOT_MATCH\");\n }\n\n IERC20(_BASE_).approve(_DODO_, uint256(-1));\n IERC20(_QUOTE_).approve(_DODO_, uint256(-1));\n }\n\n function executeBuyArbitrage(uint256 baseAmount) external returns (uint256 quoteProfit) {\n IDODO(_DODO_).buyBaseToken(baseAmount, uint256(-1), \"0xd\");\n quoteProfit = IERC20(_QUOTE_).balanceOf(address(this));\n IERC20(_QUOTE_).transfer(msg.sender, quoteProfit);\n return quoteProfit;\n }\n\n function executeSellArbitrage(uint256 baseAmount) external returns (uint256 baseProfit) {\n IDODO(_DODO_).sellBaseToken(baseAmount, 0, \"0xd\");\n baseProfit = IERC20(_BASE_).balanceOf(address(this));\n IERC20(_BASE_).transfer(msg.sender, baseProfit);\n return baseProfit;\n }\n\n function dodoCall(\n bool isDODOBuy,\n uint256 baseAmount,\n uint256 quoteAmount,\n bytes calldata\n ) external {\n require(msg.sender == _DODO_, \"WRONG_DODO\");\n if (_REVERSE_) {\n _inverseArbitrage(isDODOBuy, baseAmount, quoteAmount);\n } else {\n _arbitrage(isDODOBuy, baseAmount, quoteAmount);\n }\n }\n\n function _inverseArbitrage(\n bool isDODOBuy,\n uint256 baseAmount,\n uint256 quoteAmount\n ) internal {\n (uint112 _reserve0, uint112 _reserve1, ) = IUniswapV2Pair(_UNISWAP_).getReserves();\n uint256 token0Balance = uint256(_reserve0);\n uint256 token1Balance = uint256(_reserve1);\n uint256 token0Amount;\n uint256 token1Amount;\n if (isDODOBuy) {\n IERC20(_BASE_).transfer(_UNISWAP_, baseAmount);\n // transfer token1 into uniswap\n uint256 newToken0Balance = token0Balance.mul(token1Balance).div(\n token1Balance.add(baseAmount)\n );\n token0Amount = token0Balance.sub(newToken0Balance).mul(9969).div(10000); // mul 0.9969\n require(token0Amount > quoteAmount, \"NOT_PROFITABLE\");\n IUniswapV2Pair(_UNISWAP_).swap(token0Amount, token1Amount, address(this), \"\");\n } else {\n IERC20(_QUOTE_).transfer(_UNISWAP_, quoteAmount);\n // transfer token0 into uniswap\n uint256 newToken1Balance = token0Balance.mul(token1Balance).div(\n token0Balance.add(quoteAmount)\n );\n token1Amount = token1Balance.sub(newToken1Balance).mul(9969).div(10000); // mul 0.9969\n require(token1Amount > baseAmount, \"NOT_PROFITABLE\");\n IUniswapV2Pair(_UNISWAP_).swap(token0Amount, token1Amount, address(this), \"\");\n }\n }\n\n function _arbitrage(\n bool isDODOBuy,\n uint256 baseAmount,\n uint256 quoteAmount\n ) internal {\n (uint112 _reserve0, uint112 _reserve1, ) = IUniswapV2Pair(_UNISWAP_).getReserves();\n uint256 token0Balance = uint256(_reserve0);\n uint256 token1Balance = uint256(_reserve1);\n uint256 token0Amount;\n uint256 token1Amount;\n if (isDODOBuy) {\n IERC20(_BASE_).transfer(_UNISWAP_, baseAmount);\n // transfer token0 into uniswap\n uint256 newToken1Balance = token1Balance.mul(token0Balance).div(\n token0Balance.add(baseAmount)\n );\n token1Amount = token1Balance.sub(newToken1Balance).mul(9969).div(10000); // mul 0.9969\n require(token1Amount > quoteAmount, \"NOT_PROFITABLE\");\n IUniswapV2Pair(_UNISWAP_).swap(token0Amount, token1Amount, address(this), \"\");\n } else {\n IERC20(_QUOTE_).transfer(_UNISWAP_, quoteAmount);\n // transfer token1 into uniswap\n uint256 newToken0Balance = token1Balance.mul(token0Balance).div(\n token1Balance.add(quoteAmount)\n );\n token0Amount = token0Balance.sub(newToken0Balance).mul(9969).div(10000); // mul 0.9969\n require(token0Amount > baseAmount, \"NOT_PROFITABLE\");\n IUniswapV2Pair(_UNISWAP_).swap(token0Amount, token1Amount, address(this), \"\");\n }\n }\n\n function retrieve(address token, uint256 amount) external {\n IERC20(token).safeTransfer(msg.sender, amount);\n }\n}\n", "sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/UniswapArbitrageur.sol", "ast": { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/UniswapArbitrageur.sol", "exportedSymbols": { "IUniswapV2Pair": [ 3996 ], "UniswapArbitrageur": [ 4558 ] }, "id": 4559, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 3954, "literals": [ "solidity", "0.6", ".9" ], "nodeType": "PragmaDirective", "src": "78:22:20" }, { "id": 3955, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "101:33:20" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/Ownable.sol", "file": "../lib/Ownable.sol", "id": 3957, "nodeType": "ImportDirective", "scope": 4559, "sourceUnit": 11272, "src": "136:43:20", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 3956, "name": "Ownable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "144:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IDODO.sol", "file": "../intf/IDODO.sol", "id": 3959, "nodeType": "ImportDirective", "scope": 4559, "sourceUnit": 10492, "src": "180:40:20", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 3958, "name": "IDODO", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "188:5:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IERC20.sol", "file": "../intf/IERC20.sol", "id": 3961, "nodeType": "ImportDirective", "scope": 4559, "sourceUnit": 10608, "src": "221:42:20", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 3960, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "229:6:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeERC20.sol", "file": "../lib/SafeERC20.sol", "id": 3963, "nodeType": "ImportDirective", "scope": 4559, "sourceUnit": 11441, "src": "264:47:20", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 3962, "name": "SafeERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "272:9:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol", "file": "../lib/SafeMath.sol", "id": 3965, "nodeType": "ImportDirective", "scope": 4559, "sourceUnit": 11624, "src": "312:45:20", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 3964, "name": "SafeMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "320:8:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": null, "fullyImplemented": false, "id": 3996, "linearizedBaseContracts": [ 3996 ], "name": "IUniswapV2Pair", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": null, "functionSelector": "0dfe1681", "id": 3970, "implemented": false, "kind": "function", "modifiers": [], "name": "token0", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3966, "nodeType": "ParameterList", "parameters": [], "src": "405:2:20" }, "returnParameters": { "id": 3969, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3968, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3970, "src": "431:7:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3967, "name": "address", "nodeType": "ElementaryTypeName", "src": "431:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "430:9:20" }, "scope": 3996, "src": "390:50:20", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "d21220a7", "id": 3975, "implemented": false, "kind": "function", "modifiers": [], "name": "token1", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3971, "nodeType": "ParameterList", "parameters": [], "src": "461:2:20" }, "returnParameters": { "id": 3974, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3973, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3975, "src": "487:7:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3972, "name": "address", "nodeType": "ElementaryTypeName", "src": "487:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "486:9:20" }, "scope": 3996, "src": "446:50:20", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "0902f1ac", "id": 3984, "implemented": false, "kind": "function", "modifiers": [], "name": "getReserves", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3976, "nodeType": "ParameterList", "parameters": [], "src": "522:2:20" }, "returnParameters": { "id": 3983, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3978, "mutability": "mutable", "name": "reserve0", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3984, "src": "585:16:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" }, "typeName": { "id": 3977, "name": "uint112", "nodeType": "ElementaryTypeName", "src": "585:7:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3980, "mutability": "mutable", "name": "reserve1", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3984, "src": "615:16:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" }, "typeName": { "id": 3979, "name": "uint112", "nodeType": "ElementaryTypeName", "src": "615:7:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3982, "mutability": "mutable", "name": "blockTimestampLast", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3984, "src": "645:25:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "typeName": { "id": 3981, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "645:6:20", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "value": null, "visibility": "internal" } ], "src": "571:109:20" }, "scope": 3996, "src": "502:179:20", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "022c0d9f", "id": 3995, "implemented": false, "kind": "function", "modifiers": [], "name": "swap", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3993, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3986, "mutability": "mutable", "name": "amount0Out", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3995, "src": "710:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3985, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "710:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3988, "mutability": "mutable", "name": "amount1Out", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3995, "src": "738:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3987, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "738:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3990, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3995, "src": "766:10:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3989, "name": "address", "nodeType": "ElementaryTypeName", "src": "766:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3992, "mutability": "mutable", "name": "data", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3995, "src": "786:19:20", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 3991, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "786:5:20", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "700:111:20" }, "returnParameters": { "id": 3994, "nodeType": "ParameterList", "parameters": [], "src": "820:0:20" }, "scope": 3996, "src": "687:134:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 4559, "src": "359:464:20" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 4558, "linearizedBaseContracts": [ 4558 ], "name": "UniswapArbitrageur", "nodeType": "ContractDefinition", "nodes": [ { "id": 3999, "libraryName": { "contractScope": null, "id": 3997, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 11623, "src": "865:8:20", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$11623", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "859:27:20", "typeName": { "id": 3998, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "878:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "id": 4002, "libraryName": { "contractScope": null, "id": 4000, "name": "SafeERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 11440, "src": "897:9:20", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeERC20_$11440", "typeString": "library SafeERC20" } }, "nodeType": "UsingForDirective", "src": "891:27:20", "typeName": { "contractScope": null, "id": 4001, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 10607, "src": "911:6:20", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } } }, { "constant": false, "functionSelector": "25755c95", "id": 4004, "mutability": "mutable", "name": "_UNISWAP_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4558, "src": "924:24:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4003, "name": "address", "nodeType": "ElementaryTypeName", "src": "924:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "23208b5a", "id": 4006, "mutability": "mutable", "name": "_DODO_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4558, "src": "954:21:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4005, "name": "address", "nodeType": "ElementaryTypeName", "src": "954:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "f4c7076a", "id": 4008, "mutability": "mutable", "name": "_BASE_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4558, "src": "981:21:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4007, "name": "address", "nodeType": "ElementaryTypeName", "src": "981:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "ca436ea4", "id": 4010, "mutability": "mutable", "name": "_QUOTE_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4558, "src": "1008:22:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4009, "name": "address", "nodeType": "ElementaryTypeName", "src": "1008:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "75103e15", "id": 4012, "mutability": "mutable", "name": "_REVERSE_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4558, "src": "1037:21:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4011, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1037:4:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "public" }, { "body": { "id": 4115, "nodeType": "Block", "src": "1158:644:20", "statements": [ { "expression": { "argumentTypes": null, "id": 4021, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4019, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "1168:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 4020, "name": "_uniswap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4014, "src": "1180:8:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1168:20:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4022, "nodeType": "ExpressionStatement", "src": "1168:20:20" }, { "expression": { "argumentTypes": null, "id": 4025, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4023, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "1198:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 4024, "name": "_dodo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4016, "src": "1207:5:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1198:14:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4026, "nodeType": "ExpressionStatement", "src": "1198:14:20" }, { "expression": { "argumentTypes": null, "id": 4033, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4027, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "1223:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4029, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "1238:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4028, "name": "IDODO", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10491, "src": "1232:5:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$", "typeString": "type(contract IDODO)" } }, "id": 4030, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1232:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODO_$10491", "typeString": "contract IDODO" } }, "id": 4031, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_BASE_TOKEN_", "nodeType": "MemberAccess", "referencedDeclaration": 10485, "src": "1232:26:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_address_$", "typeString": "function () external returns (address)" } }, "id": 4032, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1232:28:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1223:37:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4034, "nodeType": "ExpressionStatement", "src": "1223:37:20" }, { "expression": { "argumentTypes": null, "id": 4041, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4035, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "1270:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4037, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "1286:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4036, "name": "IDODO", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10491, "src": "1280:5:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$", "typeString": "type(contract IDODO)" } }, "id": 4038, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1280:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODO_$10491", "typeString": "contract IDODO" } }, "id": 4039, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_QUOTE_TOKEN_", "nodeType": "MemberAccess", "referencedDeclaration": 10490, "src": "1280:27:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_address_$", "typeString": "function () external returns (address)" } }, "id": 4040, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1280:29:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1270:39:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4042, "nodeType": "ExpressionStatement", "src": "1270:39:20" }, { "assignments": [ 4044 ], "declarations": [ { "constant": false, "id": 4044, "mutability": "mutable", "name": "token0", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4115, "src": "1320:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4043, "name": "address", "nodeType": "ElementaryTypeName", "src": "1320:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "id": 4050, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4046, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "1352:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4045, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "1337:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4047, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1337:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4048, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "token0", "nodeType": "MemberAccess", "referencedDeclaration": 3970, "src": "1337:32:20", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", "typeString": "function () view external returns (address)" } }, "id": 4049, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1337:34:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "1320:51:20" }, { "assignments": [ 4052 ], "declarations": [ { "constant": false, "id": 4052, "mutability": "mutable", "name": "token1", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4115, "src": "1381:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4051, "name": "address", "nodeType": "ElementaryTypeName", "src": "1381:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "id": 4058, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4054, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "1413:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4053, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "1398:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4055, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1398:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4056, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "token1", "nodeType": "MemberAccess", "referencedDeclaration": 3975, "src": "1398:32:20", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", "typeString": "function () view external returns (address)" } }, "id": 4057, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1398:34:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "1381:51:20" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 4065, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4061, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4059, "name": "token0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4044, "src": "1447:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4060, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "1457:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1447:16:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4064, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4062, "name": "token1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4052, "src": "1467:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4063, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "1477:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1467:17:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "1447:37:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 4077, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4073, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4071, "name": "token0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4044, "src": "1538:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4072, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "1548:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1538:17:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4076, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4074, "name": "token1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4052, "src": "1559:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4075, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "1569:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1559:16:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "1538:37:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 4088, "nodeType": "Block", "src": "1624:64:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "74727565", "id": 4084, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1646:4:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, { "argumentTypes": null, "hexValue": "444f444f5f554e49535741505f4e4f545f4d41544348", "id": 4085, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1652:24:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_085ae99011c80da9c1d86962411149a128f10f322f636819b5a99783f05c31c1", "typeString": "literal_string \"DODO_UNISWAP_NOT_MATCH\"" }, "value": "DODO_UNISWAP_NOT_MATCH" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_085ae99011c80da9c1d86962411149a128f10f322f636819b5a99783f05c31c1", "typeString": "literal_string \"DODO_UNISWAP_NOT_MATCH\"" } ], "id": 4083, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1638:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4086, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1638:39:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4087, "nodeType": "ExpressionStatement", "src": "1638:39:20" } ] }, "id": 4089, "nodeType": "IfStatement", "src": "1534:154:20", "trueBody": { "id": 4082, "nodeType": "Block", "src": "1577:41:20", "statements": [ { "expression": { "argumentTypes": null, "id": 4080, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4078, "name": "_REVERSE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4012, "src": "1591:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 4079, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1603:4:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "1591:16:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4081, "nodeType": "ExpressionStatement", "src": "1591:16:20" } ] } }, "id": 4090, "nodeType": "IfStatement", "src": "1443:245:20", "trueBody": { "id": 4070, "nodeType": "Block", "src": "1486:42:20", "statements": [ { "expression": { "argumentTypes": null, "id": 4068, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4066, "name": "_REVERSE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4012, "src": "1500:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", "id": 4067, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1512:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "1500:17:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4069, "nodeType": "ExpressionStatement", "src": "1500:17:20" } ] } }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4095, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "1721:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4099, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "-", "prefix": true, "src": "1737:2:20", "subExpression": { "argumentTypes": null, "hexValue": "31", "id": 4098, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1738:1:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "typeDescriptions": { "typeIdentifier": "t_rational_minus_1_by_1", "typeString": "int_const -1" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_minus_1_by_1", "typeString": "int_const -1" } ], "id": 4097, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1729:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4096, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1729:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4100, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1729:11:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4092, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "1705:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4091, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1698:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4093, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1698:14:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4094, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "approve", "nodeType": "MemberAccess", "referencedDeclaration": 10594, "src": "1698:22:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4101, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1698:43:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4102, "nodeType": "ExpressionStatement", "src": "1698:43:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4107, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "1775:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4111, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "-", "prefix": true, "src": "1791:2:20", "subExpression": { "argumentTypes": null, "hexValue": "31", "id": 4110, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1792:1:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "typeDescriptions": { "typeIdentifier": "t_rational_minus_1_by_1", "typeString": "int_const -1" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_minus_1_by_1", "typeString": "int_const -1" } ], "id": 4109, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1783:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4108, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1783:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4112, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1783:11:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4104, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "1758:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4103, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1751:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4105, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1751:15:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4106, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "approve", "nodeType": "MemberAccess", "referencedDeclaration": 10594, "src": "1751:23:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4113, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1751:44:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4114, "nodeType": "ExpressionStatement", "src": "1751:44:20" } ] }, "documentation": null, "id": 4116, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4017, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4014, "mutability": "mutable", "name": "_uniswap", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4116, "src": "1118:16:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4013, "name": "address", "nodeType": "ElementaryTypeName", "src": "1118:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4016, "mutability": "mutable", "name": "_dodo", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4116, "src": "1136:13:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4015, "name": "address", "nodeType": "ElementaryTypeName", "src": "1136:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1117:33:20" }, "returnParameters": { "id": 4018, "nodeType": "ParameterList", "parameters": [], "src": "1158:0:20" }, "scope": 4558, "src": "1106:696:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 4159, "nodeType": "Block", "src": "1896:226:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4127, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4118, "src": "1933:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4131, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "-", "prefix": true, "src": "1953:2:20", "subExpression": { "argumentTypes": null, "hexValue": "31", "id": 4130, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1954:1:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "typeDescriptions": { "typeIdentifier": "t_rational_minus_1_by_1", "typeString": "int_const -1" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_minus_1_by_1", "typeString": "int_const -1" } ], "id": 4129, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1945:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4128, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1945:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4132, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1945:11:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "hexValue": "307864", "id": 4133, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1958:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_4ca88ae40bb7d308c953e4be794121a997c64099064e80e6e79d9445458a1a7a", "typeString": "literal_string \"0xd\"" }, "value": "0xd" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_stringliteral_4ca88ae40bb7d308c953e4be794121a997c64099064e80e6e79d9445458a1a7a", "typeString": "literal_string \"0xd\"" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4124, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "1912:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4123, "name": "IDODO", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10491, "src": "1906:5:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$", "typeString": "type(contract IDODO)" } }, "id": 4125, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1906:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODO_$10491", "typeString": "contract IDODO" } }, "id": 4126, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "buyBaseToken", "nodeType": "MemberAccess", "referencedDeclaration": 10407, "src": "1906:26:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,bytes memory) external returns (uint256)" } }, "id": 4134, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1906:58:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4135, "nodeType": "ExpressionStatement", "src": "1906:58:20" }, { "expression": { "argumentTypes": null, "id": 4146, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4136, "name": "quoteProfit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4121, "src": "1974:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4143, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "2022:4:20", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } ], "id": 4142, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2014:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 4141, "name": "address", "nodeType": "ElementaryTypeName", "src": "2014:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4144, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2014:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4138, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "1995:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4137, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1988:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4139, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1988:15:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4140, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 10564, "src": "1988:25:20", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, "id": 4145, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1988:40:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1974:54:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4147, "nodeType": "ExpressionStatement", "src": "1974:54:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4152, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2063:3:20", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4153, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2063:10:20", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 4154, "name": "quoteProfit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4121, "src": "2075:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4149, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "2045:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4148, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "2038:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4150, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2038:15:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4151, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 10574, "src": "2038:24:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4155, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2038:49:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4156, "nodeType": "ExpressionStatement", "src": "2038:49:20" }, { "expression": { "argumentTypes": null, "id": 4157, "name": "quoteProfit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4121, "src": "2104:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 4122, "id": 4158, "nodeType": "Return", "src": "2097:18:20" } ] }, "documentation": null, "functionSelector": "949805ff", "id": 4160, "implemented": true, "kind": "function", "modifiers": [], "name": "executeBuyArbitrage", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4119, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4118, "mutability": "mutable", "name": "baseAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4160, "src": "1837:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4117, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1837:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1836:20:20" }, "returnParameters": { "id": 4122, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4121, "mutability": "mutable", "name": "quoteProfit", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4160, "src": "1875:19:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4120, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1875:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1874:21:20" }, "scope": 4558, "src": "1808:314:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 4199, "nodeType": "Block", "src": "2216:212:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4171, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4162, "src": "2254:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "hexValue": "30", "id": 4172, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2266:1:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, { "argumentTypes": null, "hexValue": "307864", "id": 4173, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2269:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_4ca88ae40bb7d308c953e4be794121a997c64099064e80e6e79d9445458a1a7a", "typeString": "literal_string \"0xd\"" }, "value": "0xd" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, { "typeIdentifier": "t_stringliteral_4ca88ae40bb7d308c953e4be794121a997c64099064e80e6e79d9445458a1a7a", "typeString": "literal_string \"0xd\"" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4168, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "2232:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4167, "name": "IDODO", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10491, "src": "2226:5:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$", "typeString": "type(contract IDODO)" } }, "id": 4169, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2226:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODO_$10491", "typeString": "contract IDODO" } }, "id": 4170, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sellBaseToken", "nodeType": "MemberAccess", "referencedDeclaration": 10396, "src": "2226:27:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,bytes memory) external returns (uint256)" } }, "id": 4174, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2226:49:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4175, "nodeType": "ExpressionStatement", "src": "2226:49:20" }, { "expression": { "argumentTypes": null, "id": 4186, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4176, "name": "baseProfit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4165, "src": "2285:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4183, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "2331:4:20", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } ], "id": 4182, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2323:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 4181, "name": "address", "nodeType": "ElementaryTypeName", "src": "2323:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4184, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2323:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4178, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "2305:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4177, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "2298:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4179, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2298:14:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4180, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 10564, "src": "2298:24:20", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, "id": 4185, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2298:39:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2285:52:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4187, "nodeType": "ExpressionStatement", "src": "2285:52:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4192, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2371:3:20", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4193, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2371:10:20", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 4194, "name": "baseProfit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4165, "src": "2383:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4189, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "2354:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4188, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "2347:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4190, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2347:14:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4191, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 10574, "src": "2347:23:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4195, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2347:47:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4196, "nodeType": "ExpressionStatement", "src": "2347:47:20" }, { "expression": { "argumentTypes": null, "id": 4197, "name": "baseProfit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4165, "src": "2411:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 4166, "id": 4198, "nodeType": "Return", "src": "2404:17:20" } ] }, "documentation": null, "functionSelector": "919d365d", "id": 4200, "implemented": true, "kind": "function", "modifiers": [], "name": "executeSellArbitrage", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4163, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4162, "mutability": "mutable", "name": "baseAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4200, "src": "2158:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4161, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2158:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2157:20:20" }, "returnParameters": { "id": 4166, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4165, "mutability": "mutable", "name": "baseProfit", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4200, "src": "2196:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4164, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2196:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2195:20:20" }, "scope": 4558, "src": "2128:300:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 4235, "nodeType": "Block", "src": "2572:239:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4215, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4212, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2590:3:20", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4213, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2590:10:20", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4214, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "2604:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "2590:20:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "57524f4e475f444f444f", "id": 4216, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2612:12:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_41662103fa761538f203aa14fdd6465fb2b049b8631d2a0c262356d67d2459f3", "typeString": "literal_string \"WRONG_DODO\"" }, "value": "WRONG_DODO" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_41662103fa761538f203aa14fdd6465fb2b049b8631d2a0c262356d67d2459f3", "typeString": "literal_string \"WRONG_DODO\"" } ], "id": 4211, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "2582:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4217, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2582:43:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4218, "nodeType": "ExpressionStatement", "src": "2582:43:20" }, { "condition": { "argumentTypes": null, "id": 4219, "name": "_REVERSE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4012, "src": "2639:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 4233, "nodeType": "Block", "src": "2734:71:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4228, "name": "isDODOBuy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4202, "src": "2759:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "id": 4229, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4204, "src": "2770:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 4230, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4206, "src": "2782:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 4227, "name": "_arbitrage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4540, "src": "2748:10:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (bool,uint256,uint256)" } }, "id": 4231, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2748:46:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4232, "nodeType": "ExpressionStatement", "src": "2748:46:20" } ] }, "id": 4234, "nodeType": "IfStatement", "src": "2635:170:20", "trueBody": { "id": 4226, "nodeType": "Block", "src": "2650:78:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4221, "name": "isDODOBuy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4202, "src": "2682:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "id": 4222, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4204, "src": "2693:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 4223, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4206, "src": "2705:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 4220, "name": "_inverseArbitrage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4388, "src": "2664:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (bool,uint256,uint256)" } }, "id": 4224, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2664:53:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4225, "nodeType": "ExpressionStatement", "src": "2664:53:20" } ] } } ] }, "documentation": null, "functionSelector": "60378cea", "id": 4236, "implemented": true, "kind": "function", "modifiers": [], "name": "dodoCall", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4209, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4202, "mutability": "mutable", "name": "isDODOBuy", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4236, "src": "2461:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4201, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2461:4:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4204, "mutability": "mutable", "name": "baseAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4236, "src": "2485:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4203, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2485:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4206, "mutability": "mutable", "name": "quoteAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4236, "src": "2513:19:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4205, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2513:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4208, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4236, "src": "2542:14:20", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 4207, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2542:5:20", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "2451:111:20" }, "returnParameters": { "id": 4210, "nodeType": "ParameterList", "parameters": [], "src": "2572:0:20" }, "scope": 4558, "src": "2434:377:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 4387, "nodeType": "Block", "src": "2940:1315:20", "statements": [ { "assignments": [ 4246, 4248, null ], "declarations": [ { "constant": false, "id": 4246, "mutability": "mutable", "name": "_reserve0", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4387, "src": "2951:17:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" }, "typeName": { "id": 4245, "name": "uint112", "nodeType": "ElementaryTypeName", "src": "2951:7:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4248, "mutability": "mutable", "name": "_reserve1", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4387, "src": "2970:17:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" }, "typeName": { "id": 4247, "name": "uint112", "nodeType": "ElementaryTypeName", "src": "2970:7:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } }, "value": null, "visibility": "internal" }, null ], "id": 4254, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4250, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "3008:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4249, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "2993:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4251, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2993:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4252, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getReserves", "nodeType": "MemberAccess", "referencedDeclaration": 3984, "src": "2993:37:20", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_uint112_$_t_uint112_$_t_uint32_$", "typeString": "function () view external returns (uint112,uint112,uint32)" } }, "id": 4253, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2993:39:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint112_$_t_uint112_$_t_uint32_$", "typeString": "tuple(uint112,uint112,uint32)" } }, "nodeType": "VariableDeclarationStatement", "src": "2950:82:20" }, { "assignments": [ 4256 ], "declarations": [ { "constant": false, "id": 4256, "mutability": "mutable", "name": "token0Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4387, "src": "3042:21:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4255, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3042:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4261, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4259, "name": "_reserve0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4246, "src": "3074:9:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint112", "typeString": "uint112" } ], "id": 4258, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3066:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4257, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3066:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4260, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3066:18:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3042:42:20" }, { "assignments": [ 4263 ], "declarations": [ { "constant": false, "id": 4263, "mutability": "mutable", "name": "token1Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4387, "src": "3094:21:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4262, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3094:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4268, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4266, "name": "_reserve1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4248, "src": "3126:9:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint112", "typeString": "uint112" } ], "id": 4265, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3118:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4264, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3118:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4267, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3118:18:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3094:42:20" }, { "assignments": [ 4270 ], "declarations": [ { "constant": false, "id": 4270, "mutability": "mutable", "name": "token0Amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4387, "src": "3146:20:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4269, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3146:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4271, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "3146:20:20" }, { "assignments": [ 4273 ], "declarations": [ { "constant": false, "id": 4273, "mutability": "mutable", "name": "token1Amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4387, "src": "3176:20:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4272, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3176:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4274, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "3176:20:20" }, { "condition": { "argumentTypes": null, "id": 4275, "name": "isDODOBuy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4238, "src": "3210:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 4385, "nodeType": "Block", "src": "3737:512:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4335, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "3776:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 4336, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4242, "src": "3787:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4332, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "3758:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4331, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "3751:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4333, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3751:15:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4334, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 10574, "src": "3751:24:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4337, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3751:48:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4338, "nodeType": "ExpressionStatement", "src": "3751:48:20" }, { "assignments": [ 4340 ], "declarations": [ { "constant": false, "id": 4340, "mutability": "mutable", "name": "newToken1Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4385, "src": "3857:24:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4339, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3857:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4351, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4348, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4242, "src": "3956:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4346, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4256, "src": "3938:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4347, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "3938:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4349, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3938:30:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4343, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4263, "src": "3902:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4341, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4256, "src": "3884:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4342, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "3884:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4344, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3884:32:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4345, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "3884:36:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4350, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3884:98:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3857:125:20" }, { "expression": { "argumentTypes": null, "id": 4363, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4352, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4273, "src": "3996:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "3130303030", "id": 4361, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4061:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" }, "value": "10000" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "39393639", "id": 4358, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4051:4:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" }, "value": "9969" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4355, "name": "newToken1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4340, "src": "4029:16:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4353, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4263, "src": "4011:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4354, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "4011:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4356, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4011:35:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4357, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "4011:39:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4359, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4011:45:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4360, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "4011:49:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4362, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4011:56:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3996:71:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4364, "nodeType": "ExpressionStatement", "src": "3996:71:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 4368, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4366, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4273, "src": "4103:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 4367, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4240, "src": "4118:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4103:25:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f545f50524f46495441424c45", "id": 4369, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4130:16:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" }, "value": "NOT_PROFITABLE" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" } ], "id": 4365, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "4095:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4370, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4095:52:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4371, "nodeType": "ExpressionStatement", "src": "4095:52:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4376, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4270, "src": "4192:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 4377, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4273, "src": "4206:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4380, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "4228:4:20", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } ], "id": 4379, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4220:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 4378, "name": "address", "nodeType": "ElementaryTypeName", "src": "4220:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4381, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4220:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "", "id": 4382, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4235:2:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" }, "value": "" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4373, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "4176:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4372, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "4161:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4374, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4161:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4375, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "swap", "nodeType": "MemberAccess", "referencedDeclaration": 3995, "src": "4161:30:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,address,bytes memory) external" } }, "id": 4383, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4161:77:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4384, "nodeType": "ExpressionStatement", "src": "4161:77:20" } ] }, "id": 4386, "nodeType": "IfStatement", "src": "3206:1043:20", "trueBody": { "id": 4330, "nodeType": "Block", "src": "3221:510:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4280, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "3259:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 4281, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4240, "src": "3270:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4277, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "3242:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4276, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "3235:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4278, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3235:14:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4279, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 10574, "src": "3235:23:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4282, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3235:46:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4283, "nodeType": "ExpressionStatement", "src": "3235:46:20" }, { "assignments": [ 4285 ], "declarations": [ { "constant": false, "id": 4285, "mutability": "mutable", "name": "newToken0Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4330, "src": "3339:24:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4284, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3339:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4296, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4293, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4240, "src": "3438:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4291, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4263, "src": "3420:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4292, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "3420:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4294, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3420:29:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4288, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4263, "src": "3384:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4286, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4256, "src": "3366:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4287, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "3366:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4289, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3366:32:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4290, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "3366:36:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4295, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3366:97:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3339:124:20" }, { "expression": { "argumentTypes": null, "id": 4308, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4297, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4270, "src": "3477:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "3130303030", "id": 4306, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3542:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" }, "value": "10000" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "39393639", "id": 4303, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3532:4:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" }, "value": "9969" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4300, "name": "newToken0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4285, "src": "3510:16:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4298, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4256, "src": "3492:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4299, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "3492:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4301, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3492:35:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4302, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "3492:39:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4304, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3492:45:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4305, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "3492:49:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4307, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3492:56:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3477:71:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4309, "nodeType": "ExpressionStatement", "src": "3477:71:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 4313, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4311, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4270, "src": "3584:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 4312, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4242, "src": "3599:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3584:26:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f545f50524f46495441424c45", "id": 4314, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3612:16:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" }, "value": "NOT_PROFITABLE" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" } ], "id": 4310, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "3576:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4315, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3576:53:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4316, "nodeType": "ExpressionStatement", "src": "3576:53:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4321, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4270, "src": "3674:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 4322, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4273, "src": "3688:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4325, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "3710:4:20", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } ], "id": 4324, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3702:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 4323, "name": "address", "nodeType": "ElementaryTypeName", "src": "3702:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4326, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3702:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "", "id": 4327, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3717:2:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" }, "value": "" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4318, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "3658:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4317, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "3643:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4319, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3643:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4320, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "swap", "nodeType": "MemberAccess", "referencedDeclaration": 3995, "src": "3643:30:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,address,bytes memory) external" } }, "id": 4328, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3643:77:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4329, "nodeType": "ExpressionStatement", "src": "3643:77:20" } ] } } ] }, "documentation": null, "id": 4388, "implemented": true, "kind": "function", "modifiers": [], "name": "_inverseArbitrage", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4243, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4238, "mutability": "mutable", "name": "isDODOBuy", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4388, "src": "2853:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4237, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2853:4:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4240, "mutability": "mutable", "name": "baseAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4388, "src": "2877:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4239, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2877:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4242, "mutability": "mutable", "name": "quoteAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4388, "src": "2905:19:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4241, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2905:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2843:87:20" }, "returnParameters": { "id": 4244, "nodeType": "ParameterList", "parameters": [], "src": "2940:0:20" }, "scope": 4558, "src": "2817:1438:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 4539, "nodeType": "Block", "src": "4377:1315:20", "statements": [ { "assignments": [ 4398, 4400, null ], "declarations": [ { "constant": false, "id": 4398, "mutability": "mutable", "name": "_reserve0", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4539, "src": "4388:17:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" }, "typeName": { "id": 4397, "name": "uint112", "nodeType": "ElementaryTypeName", "src": "4388:7:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4400, "mutability": "mutable", "name": "_reserve1", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4539, "src": "4407:17:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" }, "typeName": { "id": 4399, "name": "uint112", "nodeType": "ElementaryTypeName", "src": "4407:7:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } }, "value": null, "visibility": "internal" }, null ], "id": 4406, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4402, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "4445:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4401, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "4430:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4403, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4430:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4404, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getReserves", "nodeType": "MemberAccess", "referencedDeclaration": 3984, "src": "4430:37:20", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_uint112_$_t_uint112_$_t_uint32_$", "typeString": "function () view external returns (uint112,uint112,uint32)" } }, "id": 4405, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4430:39:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint112_$_t_uint112_$_t_uint32_$", "typeString": "tuple(uint112,uint112,uint32)" } }, "nodeType": "VariableDeclarationStatement", "src": "4387:82:20" }, { "assignments": [ 4408 ], "declarations": [ { "constant": false, "id": 4408, "mutability": "mutable", "name": "token0Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4539, "src": "4479:21:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4407, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4479:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4413, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4411, "name": "_reserve0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4398, "src": "4511:9:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint112", "typeString": "uint112" } ], "id": 4410, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4503:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4409, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4503:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4412, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4503:18:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4479:42:20" }, { "assignments": [ 4415 ], "declarations": [ { "constant": false, "id": 4415, "mutability": "mutable", "name": "token1Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4539, "src": "4531:21:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4414, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4531:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4420, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4418, "name": "_reserve1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4400, "src": "4563:9:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint112", "typeString": "uint112" } ], "id": 4417, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4555:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4416, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4555:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4419, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4555:18:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4531:42:20" }, { "assignments": [ 4422 ], "declarations": [ { "constant": false, "id": 4422, "mutability": "mutable", "name": "token0Amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4539, "src": "4583:20:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4421, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4583:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4423, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "4583:20:20" }, { "assignments": [ 4425 ], "declarations": [ { "constant": false, "id": 4425, "mutability": "mutable", "name": "token1Amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4539, "src": "4613:20:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4424, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4613:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4426, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "4613:20:20" }, { "condition": { "argumentTypes": null, "id": 4427, "name": "isDODOBuy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4390, "src": "4647:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 4537, "nodeType": "Block", "src": "5174:512:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4487, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "5213:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 4488, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4394, "src": "5224:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4484, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "5195:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4483, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "5188:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4485, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5188:15:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4486, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 10574, "src": "5188:24:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4489, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5188:48:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4490, "nodeType": "ExpressionStatement", "src": "5188:48:20" }, { "assignments": [ 4492 ], "declarations": [ { "constant": false, "id": 4492, "mutability": "mutable", "name": "newToken0Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4537, "src": "5294:24:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4491, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5294:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4503, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4500, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4394, "src": "5393:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4498, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4415, "src": "5375:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4499, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "5375:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4501, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5375:30:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4495, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4408, "src": "5339:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4493, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4415, "src": "5321:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4494, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "5321:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4496, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5321:32:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4497, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "5321:36:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4502, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5321:98:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "5294:125:20" }, { "expression": { "argumentTypes": null, "id": 4515, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4504, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4422, "src": "5433:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "3130303030", "id": 4513, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5498:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" }, "value": "10000" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "39393639", "id": 4510, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5488:4:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" }, "value": "9969" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4507, "name": "newToken0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4492, "src": "5466:16:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4505, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4408, "src": "5448:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4506, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "5448:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4508, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5448:35:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4509, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "5448:39:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4511, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5448:45:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4512, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "5448:49:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4514, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5448:56:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5433:71:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4516, "nodeType": "ExpressionStatement", "src": "5433:71:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 4520, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4518, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4422, "src": "5540:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 4519, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4392, "src": "5555:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5540:25:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f545f50524f46495441424c45", "id": 4521, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5567:16:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" }, "value": "NOT_PROFITABLE" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" } ], "id": 4517, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5532:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4522, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5532:52:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4523, "nodeType": "ExpressionStatement", "src": "5532:52:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4528, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4422, "src": "5629:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 4529, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4425, "src": "5643:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4532, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5665:4:20", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } ], "id": 4531, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5657:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 4530, "name": "address", "nodeType": "ElementaryTypeName", "src": "5657:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4533, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5657:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "", "id": 4534, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5672:2:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" }, "value": "" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4525, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "5613:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4524, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "5598:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4526, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5598:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4527, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "swap", "nodeType": "MemberAccess", "referencedDeclaration": 3995, "src": "5598:30:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,address,bytes memory) external" } }, "id": 4535, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5598:77:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4536, "nodeType": "ExpressionStatement", "src": "5598:77:20" } ] }, "id": 4538, "nodeType": "IfStatement", "src": "4643:1043:20", "trueBody": { "id": 4482, "nodeType": "Block", "src": "4658:510:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4432, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "4696:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 4433, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4392, "src": "4707:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4429, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "4679:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4428, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "4672:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4430, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4672:14:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4431, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 10574, "src": "4672:23:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4434, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4672:46:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4435, "nodeType": "ExpressionStatement", "src": "4672:46:20" }, { "assignments": [ 4437 ], "declarations": [ { "constant": false, "id": 4437, "mutability": "mutable", "name": "newToken1Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4482, "src": "4776:24:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4436, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4776:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4448, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4445, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4392, "src": "4875:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4443, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4408, "src": "4857:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4444, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "4857:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4446, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4857:29:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4440, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4408, "src": "4821:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4438, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4415, "src": "4803:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4439, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "4803:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4441, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4803:32:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4442, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "4803:36:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4447, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4803:97:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4776:124:20" }, { "expression": { "argumentTypes": null, "id": 4460, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4449, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4425, "src": "4914:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "3130303030", "id": 4458, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4979:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" }, "value": "10000" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "39393639", "id": 4455, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4969:4:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" }, "value": "9969" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4452, "name": "newToken1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4437, "src": "4947:16:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4450, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4415, "src": "4929:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4451, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "4929:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4453, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4929:35:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4454, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "4929:39:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4456, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4929:45:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4457, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "4929:49:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4459, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4929:56:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4914:71:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4461, "nodeType": "ExpressionStatement", "src": "4914:71:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 4465, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4463, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4425, "src": "5021:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 4464, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4394, "src": "5036:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5021:26:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f545f50524f46495441424c45", "id": 4466, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5049:16:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" }, "value": "NOT_PROFITABLE" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" } ], "id": 4462, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5013:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4467, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5013:53:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4468, "nodeType": "ExpressionStatement", "src": "5013:53:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4473, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4422, "src": "5111:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 4474, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4425, "src": "5125:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4477, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5147:4:20", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } ], "id": 4476, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5139:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 4475, "name": "address", "nodeType": "ElementaryTypeName", "src": "5139:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4478, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5139:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "", "id": 4479, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5154:2:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" }, "value": "" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4470, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "5095:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4469, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "5080:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4471, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5080:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4472, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "swap", "nodeType": "MemberAccess", "referencedDeclaration": 3995, "src": "5080:30:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,address,bytes memory) external" } }, "id": 4480, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5080:77:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4481, "nodeType": "ExpressionStatement", "src": "5080:77:20" } ] } } ] }, "documentation": null, "id": 4540, "implemented": true, "kind": "function", "modifiers": [], "name": "_arbitrage", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4395, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4390, "mutability": "mutable", "name": "isDODOBuy", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4540, "src": "4290:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4389, "name": "bool", "nodeType": "ElementaryTypeName", "src": "4290:4:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4392, "mutability": "mutable", "name": "baseAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4540, "src": "4314:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4391, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4314:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4394, "mutability": "mutable", "name": "quoteAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4540, "src": "4342:19:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4393, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4342:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "4280:87:20" }, "returnParameters": { "id": 4396, "nodeType": "ParameterList", "parameters": [], "src": "4377:0:20" }, "scope": 4558, "src": "4261:1431:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 4556, "nodeType": "Block", "src": "5756:63:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4551, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5793:3:20", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4552, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5793:10:20", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 4553, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4544, "src": "5805:6:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4548, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4542, "src": "5773:5:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4547, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "5766:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4549, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5766:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4550, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 11329, "src": "5766:26:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$10607_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$10607_$", "typeString": "function (contract IERC20,address,uint256)" } }, "id": 4554, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5766:46:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4555, "nodeType": "ExpressionStatement", "src": "5766:46:20" } ] }, "documentation": null, "functionSelector": "c3a2a665", "id": 4557, "implemented": true, "kind": "function", "modifiers": [], "name": "retrieve", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4545, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4542, "mutability": "mutable", "name": "token", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4557, "src": "5716:13:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4541, "name": "address", "nodeType": "ElementaryTypeName", "src": "5716:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4544, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4557, "src": "5731:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4543, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5731:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5715:31:20" }, "returnParameters": { "id": 4546, "nodeType": "ParameterList", "parameters": [], "src": "5756:0:20" }, "scope": 4558, "src": "5698:121:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 4559, "src": "825:4996:20" } ], "src": "78:5744:20" }, "legacyAST": { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/UniswapArbitrageur.sol", "exportedSymbols": { "IUniswapV2Pair": [ 3996 ], "UniswapArbitrageur": [ 4558 ] }, "id": 4559, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 3954, "literals": [ "solidity", "0.6", ".9" ], "nodeType": "PragmaDirective", "src": "78:22:20" }, { "id": 3955, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "101:33:20" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/Ownable.sol", "file": "../lib/Ownable.sol", "id": 3957, "nodeType": "ImportDirective", "scope": 4559, "sourceUnit": 11272, "src": "136:43:20", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 3956, "name": "Ownable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "144:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IDODO.sol", "file": "../intf/IDODO.sol", "id": 3959, "nodeType": "ImportDirective", "scope": 4559, "sourceUnit": 10492, "src": "180:40:20", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 3958, "name": "IDODO", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "188:5:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IERC20.sol", "file": "../intf/IERC20.sol", "id": 3961, "nodeType": "ImportDirective", "scope": 4559, "sourceUnit": 10608, "src": "221:42:20", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 3960, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "229:6:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeERC20.sol", "file": "../lib/SafeERC20.sol", "id": 3963, "nodeType": "ImportDirective", "scope": 4559, "sourceUnit": 11441, "src": "264:47:20", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 3962, "name": "SafeERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "272:9:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol", "file": "../lib/SafeMath.sol", "id": 3965, "nodeType": "ImportDirective", "scope": 4559, "sourceUnit": 11624, "src": "312:45:20", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 3964, "name": "SafeMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "320:8:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": null, "fullyImplemented": false, "id": 3996, "linearizedBaseContracts": [ 3996 ], "name": "IUniswapV2Pair", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": null, "functionSelector": "0dfe1681", "id": 3970, "implemented": false, "kind": "function", "modifiers": [], "name": "token0", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3966, "nodeType": "ParameterList", "parameters": [], "src": "405:2:20" }, "returnParameters": { "id": 3969, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3968, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3970, "src": "431:7:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3967, "name": "address", "nodeType": "ElementaryTypeName", "src": "431:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "430:9:20" }, "scope": 3996, "src": "390:50:20", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "d21220a7", "id": 3975, "implemented": false, "kind": "function", "modifiers": [], "name": "token1", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3971, "nodeType": "ParameterList", "parameters": [], "src": "461:2:20" }, "returnParameters": { "id": 3974, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3973, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3975, "src": "487:7:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3972, "name": "address", "nodeType": "ElementaryTypeName", "src": "487:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "486:9:20" }, "scope": 3996, "src": "446:50:20", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "0902f1ac", "id": 3984, "implemented": false, "kind": "function", "modifiers": [], "name": "getReserves", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3976, "nodeType": "ParameterList", "parameters": [], "src": "522:2:20" }, "returnParameters": { "id": 3983, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3978, "mutability": "mutable", "name": "reserve0", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3984, "src": "585:16:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" }, "typeName": { "id": 3977, "name": "uint112", "nodeType": "ElementaryTypeName", "src": "585:7:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3980, "mutability": "mutable", "name": "reserve1", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3984, "src": "615:16:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" }, "typeName": { "id": 3979, "name": "uint112", "nodeType": "ElementaryTypeName", "src": "615:7:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3982, "mutability": "mutable", "name": "blockTimestampLast", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3984, "src": "645:25:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "typeName": { "id": 3981, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "645:6:20", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "value": null, "visibility": "internal" } ], "src": "571:109:20" }, "scope": 3996, "src": "502:179:20", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "022c0d9f", "id": 3995, "implemented": false, "kind": "function", "modifiers": [], "name": "swap", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3993, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3986, "mutability": "mutable", "name": "amount0Out", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3995, "src": "710:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3985, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "710:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3988, "mutability": "mutable", "name": "amount1Out", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3995, "src": "738:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3987, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "738:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3990, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3995, "src": "766:10:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3989, "name": "address", "nodeType": "ElementaryTypeName", "src": "766:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3992, "mutability": "mutable", "name": "data", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3995, "src": "786:19:20", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 3991, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "786:5:20", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "700:111:20" }, "returnParameters": { "id": 3994, "nodeType": "ParameterList", "parameters": [], "src": "820:0:20" }, "scope": 3996, "src": "687:134:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 4559, "src": "359:464:20" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 4558, "linearizedBaseContracts": [ 4558 ], "name": "UniswapArbitrageur", "nodeType": "ContractDefinition", "nodes": [ { "id": 3999, "libraryName": { "contractScope": null, "id": 3997, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 11623, "src": "865:8:20", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$11623", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "859:27:20", "typeName": { "id": 3998, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "878:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "id": 4002, "libraryName": { "contractScope": null, "id": 4000, "name": "SafeERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 11440, "src": "897:9:20", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeERC20_$11440", "typeString": "library SafeERC20" } }, "nodeType": "UsingForDirective", "src": "891:27:20", "typeName": { "contractScope": null, "id": 4001, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 10607, "src": "911:6:20", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } } }, { "constant": false, "functionSelector": "25755c95", "id": 4004, "mutability": "mutable", "name": "_UNISWAP_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4558, "src": "924:24:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4003, "name": "address", "nodeType": "ElementaryTypeName", "src": "924:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "23208b5a", "id": 4006, "mutability": "mutable", "name": "_DODO_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4558, "src": "954:21:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4005, "name": "address", "nodeType": "ElementaryTypeName", "src": "954:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "f4c7076a", "id": 4008, "mutability": "mutable", "name": "_BASE_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4558, "src": "981:21:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4007, "name": "address", "nodeType": "ElementaryTypeName", "src": "981:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "ca436ea4", "id": 4010, "mutability": "mutable", "name": "_QUOTE_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4558, "src": "1008:22:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4009, "name": "address", "nodeType": "ElementaryTypeName", "src": "1008:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "75103e15", "id": 4012, "mutability": "mutable", "name": "_REVERSE_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4558, "src": "1037:21:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4011, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1037:4:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "public" }, { "body": { "id": 4115, "nodeType": "Block", "src": "1158:644:20", "statements": [ { "expression": { "argumentTypes": null, "id": 4021, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4019, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "1168:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 4020, "name": "_uniswap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4014, "src": "1180:8:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1168:20:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4022, "nodeType": "ExpressionStatement", "src": "1168:20:20" }, { "expression": { "argumentTypes": null, "id": 4025, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4023, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "1198:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 4024, "name": "_dodo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4016, "src": "1207:5:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1198:14:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4026, "nodeType": "ExpressionStatement", "src": "1198:14:20" }, { "expression": { "argumentTypes": null, "id": 4033, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4027, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "1223:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4029, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "1238:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4028, "name": "IDODO", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10491, "src": "1232:5:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$", "typeString": "type(contract IDODO)" } }, "id": 4030, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1232:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODO_$10491", "typeString": "contract IDODO" } }, "id": 4031, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_BASE_TOKEN_", "nodeType": "MemberAccess", "referencedDeclaration": 10485, "src": "1232:26:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_address_$", "typeString": "function () external returns (address)" } }, "id": 4032, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1232:28:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1223:37:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4034, "nodeType": "ExpressionStatement", "src": "1223:37:20" }, { "expression": { "argumentTypes": null, "id": 4041, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4035, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "1270:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4037, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "1286:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4036, "name": "IDODO", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10491, "src": "1280:5:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$", "typeString": "type(contract IDODO)" } }, "id": 4038, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1280:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODO_$10491", "typeString": "contract IDODO" } }, "id": 4039, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_QUOTE_TOKEN_", "nodeType": "MemberAccess", "referencedDeclaration": 10490, "src": "1280:27:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_address_$", "typeString": "function () external returns (address)" } }, "id": 4040, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1280:29:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1270:39:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4042, "nodeType": "ExpressionStatement", "src": "1270:39:20" }, { "assignments": [ 4044 ], "declarations": [ { "constant": false, "id": 4044, "mutability": "mutable", "name": "token0", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4115, "src": "1320:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4043, "name": "address", "nodeType": "ElementaryTypeName", "src": "1320:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "id": 4050, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4046, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "1352:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4045, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "1337:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4047, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1337:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4048, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "token0", "nodeType": "MemberAccess", "referencedDeclaration": 3970, "src": "1337:32:20", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", "typeString": "function () view external returns (address)" } }, "id": 4049, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1337:34:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "1320:51:20" }, { "assignments": [ 4052 ], "declarations": [ { "constant": false, "id": 4052, "mutability": "mutable", "name": "token1", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4115, "src": "1381:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4051, "name": "address", "nodeType": "ElementaryTypeName", "src": "1381:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "id": 4058, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4054, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "1413:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4053, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "1398:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4055, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1398:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4056, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "token1", "nodeType": "MemberAccess", "referencedDeclaration": 3975, "src": "1398:32:20", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", "typeString": "function () view external returns (address)" } }, "id": 4057, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1398:34:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "1381:51:20" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 4065, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4061, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4059, "name": "token0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4044, "src": "1447:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4060, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "1457:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1447:16:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4064, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4062, "name": "token1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4052, "src": "1467:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4063, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "1477:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1467:17:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "1447:37:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 4077, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4073, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4071, "name": "token0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4044, "src": "1538:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4072, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "1548:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1538:17:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4076, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4074, "name": "token1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4052, "src": "1559:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4075, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "1569:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1559:16:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "1538:37:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 4088, "nodeType": "Block", "src": "1624:64:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "74727565", "id": 4084, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1646:4:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, { "argumentTypes": null, "hexValue": "444f444f5f554e49535741505f4e4f545f4d41544348", "id": 4085, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1652:24:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_085ae99011c80da9c1d86962411149a128f10f322f636819b5a99783f05c31c1", "typeString": "literal_string \"DODO_UNISWAP_NOT_MATCH\"" }, "value": "DODO_UNISWAP_NOT_MATCH" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_085ae99011c80da9c1d86962411149a128f10f322f636819b5a99783f05c31c1", "typeString": "literal_string \"DODO_UNISWAP_NOT_MATCH\"" } ], "id": 4083, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1638:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4086, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1638:39:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4087, "nodeType": "ExpressionStatement", "src": "1638:39:20" } ] }, "id": 4089, "nodeType": "IfStatement", "src": "1534:154:20", "trueBody": { "id": 4082, "nodeType": "Block", "src": "1577:41:20", "statements": [ { "expression": { "argumentTypes": null, "id": 4080, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4078, "name": "_REVERSE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4012, "src": "1591:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 4079, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1603:4:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "1591:16:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4081, "nodeType": "ExpressionStatement", "src": "1591:16:20" } ] } }, "id": 4090, "nodeType": "IfStatement", "src": "1443:245:20", "trueBody": { "id": 4070, "nodeType": "Block", "src": "1486:42:20", "statements": [ { "expression": { "argumentTypes": null, "id": 4068, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4066, "name": "_REVERSE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4012, "src": "1500:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", "id": 4067, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1512:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "1500:17:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4069, "nodeType": "ExpressionStatement", "src": "1500:17:20" } ] } }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4095, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "1721:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4099, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "-", "prefix": true, "src": "1737:2:20", "subExpression": { "argumentTypes": null, "hexValue": "31", "id": 4098, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1738:1:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "typeDescriptions": { "typeIdentifier": "t_rational_minus_1_by_1", "typeString": "int_const -1" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_minus_1_by_1", "typeString": "int_const -1" } ], "id": 4097, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1729:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4096, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1729:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4100, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1729:11:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4092, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "1705:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4091, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1698:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4093, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1698:14:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4094, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "approve", "nodeType": "MemberAccess", "referencedDeclaration": 10594, "src": "1698:22:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4101, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1698:43:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4102, "nodeType": "ExpressionStatement", "src": "1698:43:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4107, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "1775:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4111, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "-", "prefix": true, "src": "1791:2:20", "subExpression": { "argumentTypes": null, "hexValue": "31", "id": 4110, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1792:1:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "typeDescriptions": { "typeIdentifier": "t_rational_minus_1_by_1", "typeString": "int_const -1" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_minus_1_by_1", "typeString": "int_const -1" } ], "id": 4109, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1783:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4108, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1783:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4112, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1783:11:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4104, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "1758:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4103, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1751:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4105, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1751:15:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4106, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "approve", "nodeType": "MemberAccess", "referencedDeclaration": 10594, "src": "1751:23:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4113, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1751:44:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4114, "nodeType": "ExpressionStatement", "src": "1751:44:20" } ] }, "documentation": null, "id": 4116, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4017, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4014, "mutability": "mutable", "name": "_uniswap", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4116, "src": "1118:16:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4013, "name": "address", "nodeType": "ElementaryTypeName", "src": "1118:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4016, "mutability": "mutable", "name": "_dodo", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4116, "src": "1136:13:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4015, "name": "address", "nodeType": "ElementaryTypeName", "src": "1136:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1117:33:20" }, "returnParameters": { "id": 4018, "nodeType": "ParameterList", "parameters": [], "src": "1158:0:20" }, "scope": 4558, "src": "1106:696:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 4159, "nodeType": "Block", "src": "1896:226:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4127, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4118, "src": "1933:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4131, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "-", "prefix": true, "src": "1953:2:20", "subExpression": { "argumentTypes": null, "hexValue": "31", "id": 4130, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1954:1:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "typeDescriptions": { "typeIdentifier": "t_rational_minus_1_by_1", "typeString": "int_const -1" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_minus_1_by_1", "typeString": "int_const -1" } ], "id": 4129, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1945:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4128, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1945:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4132, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1945:11:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "hexValue": "307864", "id": 4133, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1958:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_4ca88ae40bb7d308c953e4be794121a997c64099064e80e6e79d9445458a1a7a", "typeString": "literal_string \"0xd\"" }, "value": "0xd" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_stringliteral_4ca88ae40bb7d308c953e4be794121a997c64099064e80e6e79d9445458a1a7a", "typeString": "literal_string \"0xd\"" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4124, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "1912:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4123, "name": "IDODO", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10491, "src": "1906:5:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$", "typeString": "type(contract IDODO)" } }, "id": 4125, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1906:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODO_$10491", "typeString": "contract IDODO" } }, "id": 4126, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "buyBaseToken", "nodeType": "MemberAccess", "referencedDeclaration": 10407, "src": "1906:26:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,bytes memory) external returns (uint256)" } }, "id": 4134, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1906:58:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4135, "nodeType": "ExpressionStatement", "src": "1906:58:20" }, { "expression": { "argumentTypes": null, "id": 4146, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4136, "name": "quoteProfit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4121, "src": "1974:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4143, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "2022:4:20", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } ], "id": 4142, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2014:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 4141, "name": "address", "nodeType": "ElementaryTypeName", "src": "2014:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4144, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2014:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4138, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "1995:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4137, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1988:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4139, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1988:15:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4140, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 10564, "src": "1988:25:20", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, "id": 4145, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1988:40:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1974:54:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4147, "nodeType": "ExpressionStatement", "src": "1974:54:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4152, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2063:3:20", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4153, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2063:10:20", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 4154, "name": "quoteProfit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4121, "src": "2075:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4149, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "2045:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4148, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "2038:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4150, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2038:15:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4151, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 10574, "src": "2038:24:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4155, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2038:49:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4156, "nodeType": "ExpressionStatement", "src": "2038:49:20" }, { "expression": { "argumentTypes": null, "id": 4157, "name": "quoteProfit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4121, "src": "2104:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 4122, "id": 4158, "nodeType": "Return", "src": "2097:18:20" } ] }, "documentation": null, "functionSelector": "949805ff", "id": 4160, "implemented": true, "kind": "function", "modifiers": [], "name": "executeBuyArbitrage", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4119, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4118, "mutability": "mutable", "name": "baseAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4160, "src": "1837:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4117, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1837:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1836:20:20" }, "returnParameters": { "id": 4122, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4121, "mutability": "mutable", "name": "quoteProfit", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4160, "src": "1875:19:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4120, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1875:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1874:21:20" }, "scope": 4558, "src": "1808:314:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 4199, "nodeType": "Block", "src": "2216:212:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4171, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4162, "src": "2254:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "hexValue": "30", "id": 4172, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2266:1:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, { "argumentTypes": null, "hexValue": "307864", "id": 4173, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2269:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_4ca88ae40bb7d308c953e4be794121a997c64099064e80e6e79d9445458a1a7a", "typeString": "literal_string \"0xd\"" }, "value": "0xd" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, { "typeIdentifier": "t_stringliteral_4ca88ae40bb7d308c953e4be794121a997c64099064e80e6e79d9445458a1a7a", "typeString": "literal_string \"0xd\"" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4168, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "2232:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4167, "name": "IDODO", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10491, "src": "2226:5:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$", "typeString": "type(contract IDODO)" } }, "id": 4169, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2226:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODO_$10491", "typeString": "contract IDODO" } }, "id": 4170, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sellBaseToken", "nodeType": "MemberAccess", "referencedDeclaration": 10396, "src": "2226:27:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,bytes memory) external returns (uint256)" } }, "id": 4174, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2226:49:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4175, "nodeType": "ExpressionStatement", "src": "2226:49:20" }, { "expression": { "argumentTypes": null, "id": 4186, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4176, "name": "baseProfit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4165, "src": "2285:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4183, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "2331:4:20", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } ], "id": 4182, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2323:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 4181, "name": "address", "nodeType": "ElementaryTypeName", "src": "2323:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4184, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2323:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4178, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "2305:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4177, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "2298:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4179, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2298:14:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4180, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 10564, "src": "2298:24:20", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, "id": 4185, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2298:39:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2285:52:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4187, "nodeType": "ExpressionStatement", "src": "2285:52:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4192, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2371:3:20", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4193, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2371:10:20", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 4194, "name": "baseProfit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4165, "src": "2383:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4189, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "2354:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4188, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "2347:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4190, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2347:14:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4191, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 10574, "src": "2347:23:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4195, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2347:47:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4196, "nodeType": "ExpressionStatement", "src": "2347:47:20" }, { "expression": { "argumentTypes": null, "id": 4197, "name": "baseProfit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4165, "src": "2411:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 4166, "id": 4198, "nodeType": "Return", "src": "2404:17:20" } ] }, "documentation": null, "functionSelector": "919d365d", "id": 4200, "implemented": true, "kind": "function", "modifiers": [], "name": "executeSellArbitrage", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4163, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4162, "mutability": "mutable", "name": "baseAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4200, "src": "2158:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4161, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2158:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2157:20:20" }, "returnParameters": { "id": 4166, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4165, "mutability": "mutable", "name": "baseProfit", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4200, "src": "2196:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4164, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2196:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2195:20:20" }, "scope": 4558, "src": "2128:300:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 4235, "nodeType": "Block", "src": "2572:239:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4215, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4212, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2590:3:20", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4213, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2590:10:20", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4214, "name": "_DODO_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4006, "src": "2604:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "2590:20:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "57524f4e475f444f444f", "id": 4216, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2612:12:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_41662103fa761538f203aa14fdd6465fb2b049b8631d2a0c262356d67d2459f3", "typeString": "literal_string \"WRONG_DODO\"" }, "value": "WRONG_DODO" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_41662103fa761538f203aa14fdd6465fb2b049b8631d2a0c262356d67d2459f3", "typeString": "literal_string \"WRONG_DODO\"" } ], "id": 4211, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "2582:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4217, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2582:43:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4218, "nodeType": "ExpressionStatement", "src": "2582:43:20" }, { "condition": { "argumentTypes": null, "id": 4219, "name": "_REVERSE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4012, "src": "2639:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 4233, "nodeType": "Block", "src": "2734:71:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4228, "name": "isDODOBuy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4202, "src": "2759:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "id": 4229, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4204, "src": "2770:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 4230, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4206, "src": "2782:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 4227, "name": "_arbitrage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4540, "src": "2748:10:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (bool,uint256,uint256)" } }, "id": 4231, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2748:46:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4232, "nodeType": "ExpressionStatement", "src": "2748:46:20" } ] }, "id": 4234, "nodeType": "IfStatement", "src": "2635:170:20", "trueBody": { "id": 4226, "nodeType": "Block", "src": "2650:78:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4221, "name": "isDODOBuy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4202, "src": "2682:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "id": 4222, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4204, "src": "2693:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 4223, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4206, "src": "2705:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 4220, "name": "_inverseArbitrage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4388, "src": "2664:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (bool,uint256,uint256)" } }, "id": 4224, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2664:53:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4225, "nodeType": "ExpressionStatement", "src": "2664:53:20" } ] } } ] }, "documentation": null, "functionSelector": "60378cea", "id": 4236, "implemented": true, "kind": "function", "modifiers": [], "name": "dodoCall", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4209, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4202, "mutability": "mutable", "name": "isDODOBuy", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4236, "src": "2461:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4201, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2461:4:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4204, "mutability": "mutable", "name": "baseAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4236, "src": "2485:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4203, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2485:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4206, "mutability": "mutable", "name": "quoteAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4236, "src": "2513:19:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4205, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2513:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4208, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4236, "src": "2542:14:20", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 4207, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2542:5:20", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "2451:111:20" }, "returnParameters": { "id": 4210, "nodeType": "ParameterList", "parameters": [], "src": "2572:0:20" }, "scope": 4558, "src": "2434:377:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 4387, "nodeType": "Block", "src": "2940:1315:20", "statements": [ { "assignments": [ 4246, 4248, null ], "declarations": [ { "constant": false, "id": 4246, "mutability": "mutable", "name": "_reserve0", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4387, "src": "2951:17:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" }, "typeName": { "id": 4245, "name": "uint112", "nodeType": "ElementaryTypeName", "src": "2951:7:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4248, "mutability": "mutable", "name": "_reserve1", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4387, "src": "2970:17:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" }, "typeName": { "id": 4247, "name": "uint112", "nodeType": "ElementaryTypeName", "src": "2970:7:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } }, "value": null, "visibility": "internal" }, null ], "id": 4254, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4250, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "3008:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4249, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "2993:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4251, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2993:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4252, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getReserves", "nodeType": "MemberAccess", "referencedDeclaration": 3984, "src": "2993:37:20", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_uint112_$_t_uint112_$_t_uint32_$", "typeString": "function () view external returns (uint112,uint112,uint32)" } }, "id": 4253, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2993:39:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint112_$_t_uint112_$_t_uint32_$", "typeString": "tuple(uint112,uint112,uint32)" } }, "nodeType": "VariableDeclarationStatement", "src": "2950:82:20" }, { "assignments": [ 4256 ], "declarations": [ { "constant": false, "id": 4256, "mutability": "mutable", "name": "token0Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4387, "src": "3042:21:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4255, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3042:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4261, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4259, "name": "_reserve0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4246, "src": "3074:9:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint112", "typeString": "uint112" } ], "id": 4258, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3066:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4257, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3066:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4260, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3066:18:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3042:42:20" }, { "assignments": [ 4263 ], "declarations": [ { "constant": false, "id": 4263, "mutability": "mutable", "name": "token1Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4387, "src": "3094:21:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4262, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3094:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4268, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4266, "name": "_reserve1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4248, "src": "3126:9:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint112", "typeString": "uint112" } ], "id": 4265, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3118:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4264, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3118:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4267, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3118:18:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3094:42:20" }, { "assignments": [ 4270 ], "declarations": [ { "constant": false, "id": 4270, "mutability": "mutable", "name": "token0Amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4387, "src": "3146:20:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4269, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3146:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4271, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "3146:20:20" }, { "assignments": [ 4273 ], "declarations": [ { "constant": false, "id": 4273, "mutability": "mutable", "name": "token1Amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4387, "src": "3176:20:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4272, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3176:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4274, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "3176:20:20" }, { "condition": { "argumentTypes": null, "id": 4275, "name": "isDODOBuy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4238, "src": "3210:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 4385, "nodeType": "Block", "src": "3737:512:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4335, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "3776:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 4336, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4242, "src": "3787:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4332, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "3758:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4331, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "3751:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4333, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3751:15:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4334, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 10574, "src": "3751:24:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4337, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3751:48:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4338, "nodeType": "ExpressionStatement", "src": "3751:48:20" }, { "assignments": [ 4340 ], "declarations": [ { "constant": false, "id": 4340, "mutability": "mutable", "name": "newToken1Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4385, "src": "3857:24:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4339, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3857:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4351, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4348, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4242, "src": "3956:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4346, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4256, "src": "3938:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4347, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "3938:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4349, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3938:30:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4343, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4263, "src": "3902:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4341, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4256, "src": "3884:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4342, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "3884:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4344, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3884:32:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4345, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "3884:36:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4350, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3884:98:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3857:125:20" }, { "expression": { "argumentTypes": null, "id": 4363, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4352, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4273, "src": "3996:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "3130303030", "id": 4361, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4061:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" }, "value": "10000" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "39393639", "id": 4358, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4051:4:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" }, "value": "9969" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4355, "name": "newToken1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4340, "src": "4029:16:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4353, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4263, "src": "4011:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4354, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "4011:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4356, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4011:35:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4357, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "4011:39:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4359, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4011:45:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4360, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "4011:49:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4362, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4011:56:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3996:71:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4364, "nodeType": "ExpressionStatement", "src": "3996:71:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 4368, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4366, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4273, "src": "4103:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 4367, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4240, "src": "4118:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4103:25:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f545f50524f46495441424c45", "id": 4369, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4130:16:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" }, "value": "NOT_PROFITABLE" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" } ], "id": 4365, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "4095:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4370, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4095:52:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4371, "nodeType": "ExpressionStatement", "src": "4095:52:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4376, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4270, "src": "4192:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 4377, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4273, "src": "4206:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4380, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "4228:4:20", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } ], "id": 4379, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4220:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 4378, "name": "address", "nodeType": "ElementaryTypeName", "src": "4220:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4381, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4220:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "", "id": 4382, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4235:2:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" }, "value": "" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4373, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "4176:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4372, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "4161:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4374, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4161:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4375, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "swap", "nodeType": "MemberAccess", "referencedDeclaration": 3995, "src": "4161:30:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,address,bytes memory) external" } }, "id": 4383, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4161:77:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4384, "nodeType": "ExpressionStatement", "src": "4161:77:20" } ] }, "id": 4386, "nodeType": "IfStatement", "src": "3206:1043:20", "trueBody": { "id": 4330, "nodeType": "Block", "src": "3221:510:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4280, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "3259:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 4281, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4240, "src": "3270:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4277, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "3242:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4276, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "3235:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4278, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3235:14:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4279, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 10574, "src": "3235:23:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4282, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3235:46:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4283, "nodeType": "ExpressionStatement", "src": "3235:46:20" }, { "assignments": [ 4285 ], "declarations": [ { "constant": false, "id": 4285, "mutability": "mutable", "name": "newToken0Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4330, "src": "3339:24:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4284, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3339:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4296, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4293, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4240, "src": "3438:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4291, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4263, "src": "3420:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4292, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "3420:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4294, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3420:29:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4288, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4263, "src": "3384:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4286, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4256, "src": "3366:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4287, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "3366:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4289, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3366:32:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4290, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "3366:36:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4295, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3366:97:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3339:124:20" }, { "expression": { "argumentTypes": null, "id": 4308, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4297, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4270, "src": "3477:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "3130303030", "id": 4306, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3542:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" }, "value": "10000" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "39393639", "id": 4303, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3532:4:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" }, "value": "9969" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4300, "name": "newToken0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4285, "src": "3510:16:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4298, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4256, "src": "3492:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4299, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "3492:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4301, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3492:35:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4302, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "3492:39:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4304, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3492:45:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4305, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "3492:49:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4307, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3492:56:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3477:71:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4309, "nodeType": "ExpressionStatement", "src": "3477:71:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 4313, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4311, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4270, "src": "3584:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 4312, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4242, "src": "3599:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3584:26:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f545f50524f46495441424c45", "id": 4314, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3612:16:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" }, "value": "NOT_PROFITABLE" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" } ], "id": 4310, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "3576:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4315, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3576:53:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4316, "nodeType": "ExpressionStatement", "src": "3576:53:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4321, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4270, "src": "3674:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 4322, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4273, "src": "3688:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4325, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "3710:4:20", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } ], "id": 4324, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3702:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 4323, "name": "address", "nodeType": "ElementaryTypeName", "src": "3702:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4326, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3702:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "", "id": 4327, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3717:2:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" }, "value": "" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4318, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "3658:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4317, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "3643:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4319, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3643:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4320, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "swap", "nodeType": "MemberAccess", "referencedDeclaration": 3995, "src": "3643:30:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,address,bytes memory) external" } }, "id": 4328, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3643:77:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4329, "nodeType": "ExpressionStatement", "src": "3643:77:20" } ] } } ] }, "documentation": null, "id": 4388, "implemented": true, "kind": "function", "modifiers": [], "name": "_inverseArbitrage", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4243, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4238, "mutability": "mutable", "name": "isDODOBuy", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4388, "src": "2853:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4237, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2853:4:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4240, "mutability": "mutable", "name": "baseAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4388, "src": "2877:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4239, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2877:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4242, "mutability": "mutable", "name": "quoteAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4388, "src": "2905:19:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4241, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2905:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2843:87:20" }, "returnParameters": { "id": 4244, "nodeType": "ParameterList", "parameters": [], "src": "2940:0:20" }, "scope": 4558, "src": "2817:1438:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 4539, "nodeType": "Block", "src": "4377:1315:20", "statements": [ { "assignments": [ 4398, 4400, null ], "declarations": [ { "constant": false, "id": 4398, "mutability": "mutable", "name": "_reserve0", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4539, "src": "4388:17:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" }, "typeName": { "id": 4397, "name": "uint112", "nodeType": "ElementaryTypeName", "src": "4388:7:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4400, "mutability": "mutable", "name": "_reserve1", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4539, "src": "4407:17:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" }, "typeName": { "id": 4399, "name": "uint112", "nodeType": "ElementaryTypeName", "src": "4407:7:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } }, "value": null, "visibility": "internal" }, null ], "id": 4406, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4402, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "4445:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4401, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "4430:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4403, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4430:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4404, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getReserves", "nodeType": "MemberAccess", "referencedDeclaration": 3984, "src": "4430:37:20", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_uint112_$_t_uint112_$_t_uint32_$", "typeString": "function () view external returns (uint112,uint112,uint32)" } }, "id": 4405, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4430:39:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint112_$_t_uint112_$_t_uint32_$", "typeString": "tuple(uint112,uint112,uint32)" } }, "nodeType": "VariableDeclarationStatement", "src": "4387:82:20" }, { "assignments": [ 4408 ], "declarations": [ { "constant": false, "id": 4408, "mutability": "mutable", "name": "token0Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4539, "src": "4479:21:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4407, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4479:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4413, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4411, "name": "_reserve0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4398, "src": "4511:9:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint112", "typeString": "uint112" } ], "id": 4410, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4503:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4409, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4503:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4412, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4503:18:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4479:42:20" }, { "assignments": [ 4415 ], "declarations": [ { "constant": false, "id": 4415, "mutability": "mutable", "name": "token1Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4539, "src": "4531:21:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4414, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4531:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4420, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4418, "name": "_reserve1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4400, "src": "4563:9:20", "typeDescriptions": { "typeIdentifier": "t_uint112", "typeString": "uint112" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint112", "typeString": "uint112" } ], "id": 4417, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4555:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 4416, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4555:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4419, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4555:18:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4531:42:20" }, { "assignments": [ 4422 ], "declarations": [ { "constant": false, "id": 4422, "mutability": "mutable", "name": "token0Amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4539, "src": "4583:20:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4421, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4583:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4423, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "4583:20:20" }, { "assignments": [ 4425 ], "declarations": [ { "constant": false, "id": 4425, "mutability": "mutable", "name": "token1Amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4539, "src": "4613:20:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4424, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4613:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4426, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "4613:20:20" }, { "condition": { "argumentTypes": null, "id": 4427, "name": "isDODOBuy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4390, "src": "4647:9:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 4537, "nodeType": "Block", "src": "5174:512:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4487, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "5213:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 4488, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4394, "src": "5224:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4484, "name": "_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4010, "src": "5195:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4483, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "5188:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4485, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5188:15:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4486, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 10574, "src": "5188:24:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4489, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5188:48:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4490, "nodeType": "ExpressionStatement", "src": "5188:48:20" }, { "assignments": [ 4492 ], "declarations": [ { "constant": false, "id": 4492, "mutability": "mutable", "name": "newToken0Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4537, "src": "5294:24:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4491, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5294:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4503, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4500, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4394, "src": "5393:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4498, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4415, "src": "5375:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4499, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "5375:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4501, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5375:30:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4495, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4408, "src": "5339:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4493, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4415, "src": "5321:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4494, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "5321:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4496, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5321:32:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4497, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "5321:36:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4502, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5321:98:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "5294:125:20" }, { "expression": { "argumentTypes": null, "id": 4515, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4504, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4422, "src": "5433:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "3130303030", "id": 4513, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5498:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" }, "value": "10000" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "39393639", "id": 4510, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5488:4:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" }, "value": "9969" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4507, "name": "newToken0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4492, "src": "5466:16:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4505, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4408, "src": "5448:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4506, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "5448:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4508, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5448:35:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4509, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "5448:39:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4511, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5448:45:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4512, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "5448:49:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4514, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5448:56:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5433:71:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4516, "nodeType": "ExpressionStatement", "src": "5433:71:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 4520, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4518, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4422, "src": "5540:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 4519, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4392, "src": "5555:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5540:25:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f545f50524f46495441424c45", "id": 4521, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5567:16:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" }, "value": "NOT_PROFITABLE" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" } ], "id": 4517, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5532:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4522, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5532:52:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4523, "nodeType": "ExpressionStatement", "src": "5532:52:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4528, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4422, "src": "5629:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 4529, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4425, "src": "5643:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4532, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5665:4:20", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } ], "id": 4531, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5657:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 4530, "name": "address", "nodeType": "ElementaryTypeName", "src": "5657:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4533, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5657:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "", "id": 4534, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5672:2:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" }, "value": "" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4525, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "5613:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4524, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "5598:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4526, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5598:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4527, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "swap", "nodeType": "MemberAccess", "referencedDeclaration": 3995, "src": "5598:30:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,address,bytes memory) external" } }, "id": 4535, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5598:77:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4536, "nodeType": "ExpressionStatement", "src": "5598:77:20" } ] }, "id": 4538, "nodeType": "IfStatement", "src": "4643:1043:20", "trueBody": { "id": 4482, "nodeType": "Block", "src": "4658:510:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4432, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "4696:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 4433, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4392, "src": "4707:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4429, "name": "_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4008, "src": "4679:6:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4428, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "4672:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4430, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4672:14:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4431, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 10574, "src": "4672:23:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 4434, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4672:46:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 4435, "nodeType": "ExpressionStatement", "src": "4672:46:20" }, { "assignments": [ 4437 ], "declarations": [ { "constant": false, "id": 4437, "mutability": "mutable", "name": "newToken1Balance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4482, "src": "4776:24:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4436, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4776:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 4448, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4445, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4392, "src": "4875:10:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4443, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4408, "src": "4857:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4444, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "4857:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4446, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4857:29:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4440, "name": "token0Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4408, "src": "4821:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4438, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4415, "src": "4803:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4439, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "4803:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4441, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4803:32:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4442, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "4803:36:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4447, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4803:97:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4776:124:20" }, { "expression": { "argumentTypes": null, "id": 4460, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4449, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4425, "src": "4914:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "3130303030", "id": 4458, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4979:5:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" }, "value": "10000" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_10000_by_1", "typeString": "int_const 10000" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "39393639", "id": 4455, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4969:4:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" }, "value": "9969" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_9969_by_1", "typeString": "int_const 9969" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4452, "name": "newToken1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4437, "src": "4947:16:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4450, "name": "token1Balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4415, "src": "4929:13:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4451, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "4929:17:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4453, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4929:35:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4454, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "4929:39:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4456, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4929:45:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4457, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "4929:49:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 4459, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4929:56:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4914:71:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4461, "nodeType": "ExpressionStatement", "src": "4914:71:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 4465, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4463, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4425, "src": "5021:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 4464, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4394, "src": "5036:11:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5021:26:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f545f50524f46495441424c45", "id": 4466, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5049:16:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" }, "value": "NOT_PROFITABLE" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ed9cb83f8e0a8cbd28c4025212bde92e5c49adb79749aec6363d598b55a8f5dd", "typeString": "literal_string \"NOT_PROFITABLE\"" } ], "id": 4462, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5013:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4467, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5013:53:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4468, "nodeType": "ExpressionStatement", "src": "5013:53:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4473, "name": "token0Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4422, "src": "5111:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 4474, "name": "token1Amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4425, "src": "5125:12:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4477, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5147:4:20", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapArbitrageur_$4558", "typeString": "contract UniswapArbitrageur" } ], "id": 4476, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5139:7:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 4475, "name": "address", "nodeType": "ElementaryTypeName", "src": "5139:7:20", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 4478, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5139:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "", "id": 4479, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5154:2:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" }, "value": "" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4470, "name": "_UNISWAP_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4004, "src": "5095:9:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4469, "name": "IUniswapV2Pair", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3996, "src": "5080:14:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUniswapV2Pair_$3996_$", "typeString": "type(contract IUniswapV2Pair)" } }, "id": 4471, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5080:25:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IUniswapV2Pair_$3996", "typeString": "contract IUniswapV2Pair" } }, "id": 4472, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "swap", "nodeType": "MemberAccess", "referencedDeclaration": 3995, "src": "5080:30:20", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,address,bytes memory) external" } }, "id": 4480, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5080:77:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4481, "nodeType": "ExpressionStatement", "src": "5080:77:20" } ] } } ] }, "documentation": null, "id": 4540, "implemented": true, "kind": "function", "modifiers": [], "name": "_arbitrage", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4395, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4390, "mutability": "mutable", "name": "isDODOBuy", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4540, "src": "4290:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4389, "name": "bool", "nodeType": "ElementaryTypeName", "src": "4290:4:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4392, "mutability": "mutable", "name": "baseAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4540, "src": "4314:18:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4391, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4314:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4394, "mutability": "mutable", "name": "quoteAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4540, "src": "4342:19:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4393, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4342:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "4280:87:20" }, "returnParameters": { "id": 4396, "nodeType": "ParameterList", "parameters": [], "src": "4377:0:20" }, "scope": 4558, "src": "4261:1431:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 4556, "nodeType": "Block", "src": "5756:63:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4551, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5793:3:20", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4552, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5793:10:20", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 4553, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4544, "src": "5805:6:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4548, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4542, "src": "5773:5:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4547, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "5766:6:20", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 4549, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5766:13:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 4550, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 11329, "src": "5766:26:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$10607_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$10607_$", "typeString": "function (contract IERC20,address,uint256)" } }, "id": 4554, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5766:46:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4555, "nodeType": "ExpressionStatement", "src": "5766:46:20" } ] }, "documentation": null, "functionSelector": "c3a2a665", "id": 4557, "implemented": true, "kind": "function", "modifiers": [], "name": "retrieve", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 4545, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4542, "mutability": "mutable", "name": "token", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4557, "src": "5716:13:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4541, "name": "address", "nodeType": "ElementaryTypeName", "src": "5716:7:20", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4544, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 4557, "src": "5731:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4543, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5731:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5715:31:20" }, "returnParameters": { "id": 4546, "nodeType": "ParameterList", "parameters": [], "src": "5756:0:20" }, "scope": 4558, "src": "5698:121:20", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 4559, "src": "825:4996:20" } ], "src": "78:5744:20" }, "compiler": { "name": "solc", "version": "0.6.9+commit.3e3065ac.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.2.3", "updatedAt": "2020-11-06T08:03:35.544Z", "devdoc": { "methods": {} }, "userdoc": { "methods": {} } }