{ "contractName": "Settlement", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "baseTokenAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "quoteTokenAmount", "type": "uint256" } ], "name": "ClaimAssets", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "bool", "name": "isBaseToken", "type": "bool" } ], "name": "Donate", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferPrepared", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "inputs": [], "name": "_BASE_BALANCE_", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_BASE_BALANCE_LIMIT_", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_BASE_CAPITAL_RECEIVE_QUOTE_", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_BASE_CAPITAL_TOKEN_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_BASE_TOKEN_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_BUYING_ALLOWED_", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "_CLAIMED_", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_CLOSED_", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_DEPOSIT_BASE_ALLOWED_", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_DEPOSIT_QUOTE_ALLOWED_", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_GAS_PRICE_LIMIT_", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_K_", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_LP_FEE_RATE_", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_MAINTAINER_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_MT_FEE_RATE_", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_NEW_OWNER_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_ORACLE_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_OWNER_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_QUOTE_BALANCE_", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_QUOTE_BALANCE_LIMIT_", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_QUOTE_CAPITAL_RECEIVE_BASE_", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_QUOTE_CAPITAL_TOKEN_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_QUOTE_TOKEN_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_R_STATUS_", "outputs": [ { "internalType": "enum Types.RStatus", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_SELLING_ALLOWED_", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_SUPERVISOR_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_TARGET_BASE_TOKEN_AMOUNT_", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_TRADE_ALLOWED_", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "claimOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "lp", "type": "address" } ], "name": "getBaseCapitalBalanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getOraclePrice", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "lp", "type": "address" } ], "name": "getQuoteCapitalBalanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getTotalBaseCapital", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getTotalQuoteCapital", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "version", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "donateBaseToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "donateQuoteToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "finalSettlement", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "claimAssets", "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\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseTokenAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quoteTokenAmount\",\"type\":\"uint256\"}],\"name\":\"ClaimAssets\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isBaseToken\",\"type\":\"bool\"}],\"name\":\"Donate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferPrepared\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_BASE_BALANCE_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_BASE_BALANCE_LIMIT_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_BASE_CAPITAL_RECEIVE_QUOTE_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_BASE_CAPITAL_TOKEN_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_BASE_TOKEN_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_BUYING_ALLOWED_\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"_CLAIMED_\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_CLOSED_\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_DEPOSIT_BASE_ALLOWED_\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_DEPOSIT_QUOTE_ALLOWED_\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_GAS_PRICE_LIMIT_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_K_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_LP_FEE_RATE_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_MAINTAINER_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_MT_FEE_RATE_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_NEW_OWNER_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_ORACLE_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_OWNER_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_QUOTE_BALANCE_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_QUOTE_BALANCE_LIMIT_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_QUOTE_CAPITAL_RECEIVE_BASE_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_QUOTE_CAPITAL_TOKEN_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_QUOTE_TOKEN_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_R_STATUS_\",\"outputs\":[{\"internalType\":\"enum Types.RStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_SELLING_ALLOWED_\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_SUPERVISOR_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_TARGET_BASE_TOKEN_AMOUNT_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_TARGET_QUOTE_TOKEN_AMOUNT_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_TRADE_ALLOWED_\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimAssets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"donateBaseToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"donateQuoteToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalSettlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"lp\",\"type\":\"address\"}],\"name\":\"getBaseCapitalBalanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOraclePrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"lp\",\"type\":\"address\"}],\"name\":\"getQuoteCapitalBalanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalBaseCapital\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalQuoteCapital\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"retrieve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"DODO Breeder\",\"methods\":{},\"title\":\"Settlement\"},\"userdoc\":{\"methods\":{},\"notice\":\"Functions for assets settlement\"}},\"settings\":{\"compilationTarget\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Settlement.sol\":\"Settlement\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Settlement.sol\":{\"keccak256\":\"0x8167f472615dc95cf743254785eeef730a0a3b753f05f5b64391fbb9992c8ab6\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://3e2a25e398638f4bbecf434cf9b8b608c34a1271c051ee7e411b6c2c32702439\",\"dweb:/ipfs/QmUQmysLQ1k8uBWGzsTdmGCqyWQhZ4xtzPWAfsALGWYLPh\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Storage.sol\":{\"keccak256\":\"0xbf15f2a72d59bbf0ed32b2a24fc4a68d45ffaa60dd2b2c1cc555d03ec1cd2f0a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://7289884a2a8939295c4f61aeb7754bd3ce49e9d09188a1eddb762342589f36be\",\"dweb:/ipfs/QmaHYH51wieAyxBDASyHyfYSeu6UJNV7adD3AceeZXCgcZ\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IDODOLpToken.sol\":{\"keccak256\":\"0x2183977c7a3cf5aa8d2f56d2167bf59515e34a8e4ebd2402efa85b612631955f\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://61766578f8d1bef7f51912a5327e8d4e95e3d9adb509e9486b4e2c8cf179f5e6\",\"dweb:/ipfs/QmXJRK4JKMrJkdn7BFVueoNRixsu26shnX3Dxeb5T9JKK4\"]},\"/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/intf/IOracle.sol\":{\"keccak256\":\"0xed4a31155c30a764366aba2244e42406269e59618088f93c02f1b4c9fec9e53c\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://bd3d50110c9120d942f7713e1cfced848ba7721ea336b2d9c4a87a6eb2a82ca9\",\"dweb:/ipfs/QmTYFeDcAyA2JpfoL1LsGLgj4TeRJxNV1rM27vdcaZSwpF\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/DecimalMath.sol\":{\"keccak256\":\"0x9a093cbac4e37ed4ee5e27495dae08754bbfec81f7c0ceb57a5a7ac4f362208f\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://1ddd9e5de1c555f0d1232e148fe18574e6adaa348e792844d9011bbd39bf908f\",\"dweb:/ipfs/QmSgZNwPNqCrQC4kJNdwH3iQNasbTfw2cbTtAtNVcpqnYc\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/InitializableOwnable.sol\":{\"keccak256\":\"0xf462d86a85221f424c5a40f3c0d4a699c72a61b31ed07091ffb0e0b28b3cd137\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://3d92b79f4527b3d7812395c41e5d0786309a121b99af3bff5cd7663f7255d335\",\"dweb:/ipfs/QmYkQANWtKsJNHKeD6PrtUFeC3D6uWAxhXjB97eBHwqtzK\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/ReentrancyGuard.sol\":{\"keccak256\":\"0xc9c3fc946350fd72083a9d5b1327ff923533ef37b054bc7b6007562b20b0faaf\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://fc140417457139fb240427629673bfaf970c5d4568ad1cfe582764c6e4855bbb\",\"dweb:/ipfs/Qmd7ESYe5kyM6NYiSzeFE74f1YGGPXzpdVd5qnYg2AvgH8\"]},\"/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\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/Types.sol\":{\"keccak256\":\"0x0aebcc897b4de833e87e46a11e5a70d2b6e1d2fd99ebdf9e32e6421924f18b15\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://a1098dace4f0664b0e3f5c3b6ce535ad2aba52e68fb6d1ea94b09debc06ed33c\",\"dweb:/ipfs/QmRbiq7M3Y8utAXaPWmVooGmoYF27N5dKVn6QYTaDFwqdP\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b506117a8806100206000396000f3fe608060405234801561001057600080fd5b506004361061025e5760003560e01c80637c9b8e8911610146578063c3a2a665116100c3578063dd58b41c11610087578063dd58b41c146103ee578063eab5d20e146103f6578063ec2fd46d146103fe578063ed0aa42814610406578063f2fde38b14610419578063f67ed4481461042c5761025e565b8063c3a2a665146103bb578063c5bbffe8146103ce578063c6b73cf9146103d6578063d4b97046146103de578063d689107c146103e65761025e565b8063a598aca71161010a578063a598aca714610393578063ab44a7a31461039b578063ac1fbc98146103a3578063b2094fd3146103ab578063c0ffa178146103b35761025e565b80637c9b8e891461036b5780638456db15146103735780638ff5e7421461037b5780639b020fba14610383578063a3161a561461038b5761025e565b80634322ec83116101df578063648a4fac116101a3578063648a4fac1461031857806368be20ad146103205780636ec6a58d1461034057806373a2ab7c14610348578063796da7af146103505780637aed942d146103585761025e565b80634322ec83146102f05780634a248d2a146102f85780634de4527e146103005780634e71e0c81461030857806354fd4d50146103105761025e565b80631f3c156e116102265780631f3c156e146102bb578063245c9685146102c55780632aa82c65146102cd578063387b0c11146102d55780633960f142146102e85761025e565b80630cd1667d146102635780630e6518e91461028157806316048bc4146102895780631769ddaa1461029e57806317be952e146102a6575b600080fd5b61026b61043f565b604051610278919061174b565b60405180910390f35b61026b6104c1565b6102916104c7565b60405161027891906113e4565b61026b6104d6565b6102ae6104dc565b6040516102789190611440565b6102c36104e5565b005b61026b6107b1565b61026b6107b7565b6102c36102e336600461137b565b6107fc565b61029161085c565b61029161086b565b61029161087a565b61026b610889565b6102c361088f565b61026b61091d565b6102c3610922565b61033361032e366004611316565b610a3c565b6040516102789190611435565b610333610a51565b610291610a61565b61026b610a70565b61026b610366366004611316565b610ab5565b61026b610b3c565b610291610b42565b610333610b51565b61026b610b5f565b610333610b65565b610333610b6e565b61026b610b7e565b610291610b84565b61026b610b93565b61026b610b99565b6102c36103c9366004611331565b610b9f565b610333610d75565b61026b610d85565b610291610d8b565b610291610d9a565b610333610da9565b61026b610db9565b61026b610dbf565b6102c361041436600461137b565b610dc5565b6102c3610427366004611316565b610e15565b61026b61043a366004611316565b610ec0565b601354604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561048457600080fd5b505afa158015610498573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bc9190611393565b905090565b60165481565b6000546001600160a01b031681565b60055481565b600e5460ff1681565b600154600160a01b900460ff16156105185760405162461bcd60e51b815260040161050f906114b2565b60405180910390fd5b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff166105535760405162461bcd60e51b815260040161050f90611722565b3360009081526017602052604090205460ff16156105835760405162461bcd60e51b815260040161050f906116f9565b336000818152601760205260408120805460ff19166001179055906105a790610ec0565b905060006105b433610ab5565b9050600082156105eb576105e86105c96107b7565b6010546105dc908663ffffffff610ef116565b9063ffffffff610f3216565b90505b60008215610614576106116105fe61043f565b600f546105dc908663ffffffff610ef116565b90505b601054610627908363ffffffff610f6416565b601055600f5461063d908263ffffffff610f6416565b600f8190555061065f61065284601554610f8c565b839063ffffffff610fae16565b915061067d61067085601654610f8c565b829063ffffffff610fae16565b90506106893382610fd3565b610693338361100a565b601354604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac906106c590339087906004016113f8565b600060405180830381600087803b1580156106df57600080fd5b505af11580156106f3573d6000803e3d6000fd5b5050601454604051632770a7eb60e21b81526001600160a01b039091169250639dc29fac915061072990339088906004016113f8565b600060405180830381600087803b15801561074357600080fd5b505af1158015610757573d6000803e3d6000fd5b50505050336001600160a01b03167fbe5f7fe66d16c6a87bb5b8b08a96634fe4f1c2bac9e5e413efe41a782d4d0c438284604051610796929190611764565b60405180910390a2505050506001805460ff60a01b19169055565b60105481565b601454604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561048457600080fd5b600154600160a01b900460ff16156108265760405162461bcd60e51b815260040161050f906114b2565b6001805460ff60a01b1916600160a01b1790556108433382611041565b61084c816110a6565b506001805460ff60a01b19169055565b6006546001600160a01b031681565b6007546001600160a01b031681565b6008546001600160a01b031681565b60025481565b6001546001600160a01b031633146108b95760405162461bcd60e51b815260040161050f9061148b565b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b606590565b6000546001600160a01b0316331461094c5760405162461bcd60e51b815260040161050f90611646565b600154600160b01b900460ff16156109765760405162461bcd60e51b815260040161050f90611621565b6001805462ffffff60b81b1960ff60b01b19909116600160b01b17169055600061099e61043f565b905060006109aa6107b7565b905060105460125411156109e65760006109d1601054601254610f6490919063ffffffff16565b90506109dd81846110fa565b601555506109ed565b6012546010555b600f546011541115610a27576000610a12600f54601154610f6490919063ffffffff16565b9050610a1e81836110fa565b60165550610a2e565b601154600f555b5050600e805460ff19169055565b60176020526000908152604090205460ff1681565b600154600160b01b900460ff1681565b600a546001600160a01b031681565b600a5460408051634c6afee560e11b815290516000926001600160a01b0316916398d5fdca916004808301926020929190829003018186803b15801561048457600080fd5b6013546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610ae69085906004016113e4565b60206040518083038186803b158015610afe57600080fd5b505afa158015610b12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b369190611393565b92915050565b60125481565b6001546001600160a01b031681565b600354610100900460ff1681565b60045481565b60035460ff1681565b600154600160c01b900460ff1681565b600b5481565b6014546001600160a01b031681565b600f5481565b600c5481565b6000546001600160a01b03163314610bc95760405162461bcd60e51b815260040161050f90611646565b6008546001600160a01b0383811691161415610c9057601154610bf2908263ffffffff610fae16565b6008546040516370a0823160e01b81526001600160a01b03909116906370a0823190610c229030906004016113e4565b60206040518083038186803b158015610c3a57600080fd5b505afa158015610c4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c729190611393565b1015610c905760405162461bcd60e51b815260040161050f906115c3565b6009546001600160a01b0383811691161415610d5757601254610cb9908263ffffffff610fae16565b6009546040516370a0823160e01b81526001600160a01b03909116906370a0823190610ce99030906004016113e4565b60206040518083038186803b158015610d0157600080fd5b505afa158015610d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d399190611393565b1015610d575760405162461bcd60e51b815260040161050f90611454565b610d716001600160a01b038316338363ffffffff61111816565b5050565b600154600160b81b900460ff1681565b60155481565b6009546001600160a01b031681565b6013546001600160a01b031681565b600154600160c81b900460ff1681565b60115481565b600d5481565b600154600160a01b900460ff1615610def5760405162461bcd60e51b815260040161050f906114b2565b6001805460ff60a01b1916600160a01b179055610e0c3382611173565b61084c816111d8565b6000546001600160a01b03163314610e3f5760405162461bcd60e51b815260040161050f90611646565b6001600160a01b038116610e655760405162461bcd60e51b815260040161050f906115fa565b600080546040516001600160a01b03808516939216917fdcf55418cee3220104fef63f979ff3c4097ad240c0c43dcb33ce837748983e6291a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610ae69085906004016113e4565b600082610f0057506000610b36565b82820282848281610f0d57fe5b0414610f2b5760405162461bcd60e51b815260040161050f906116d6565b9392505050565b6000808211610f535760405162461bcd60e51b815260040161050f90611541565b818381610f5c57fe5b049392505050565b600082821115610f865760405162461bcd60e51b815260040161050f906115a0565b50900390565b6000670de0b6b3a7640000610fa7848463ffffffff610ef116565b81610f5c57fe5b600082820183811015610f2b5760405162461bcd60e51b815260040161050f90611669565b600854610ff0906001600160a01b0316838363ffffffff61111816565b601154611003908263ffffffff610f6416565b6011555050565b600954611027906001600160a01b0316838363ffffffff61111816565b60125461103a908263ffffffff610f6416565b6012555050565b600554601254611057908363ffffffff610fae16565b11156110755760405162461bcd60e51b815260040161050f906114d5565b600954611093906001600160a01b031683308463ffffffff61122116565b60125461103a908263ffffffff610fae16565b6010546110b9908263ffffffff610fae16565b6010556040517fa259c93818139b6bc90fb80e8feb75122b42edaae49560f81392cf4e1946726e906110ef908390600090611754565b60405180910390a150565b6000610f2b826105dc85670de0b6b3a764000063ffffffff610ef116565b61116e8363a9059cbb60e01b84846040516024016111379291906113f8565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611248565b505050565b600454601154611189908363ffffffff610fae16565b11156111a75760405162461bcd60e51b815260040161050f90611569565b6008546111c5906001600160a01b031683308463ffffffff61122116565b601154611003908263ffffffff610fae16565b600f546111eb908263ffffffff610fae16565b600f556040517fa259c93818139b6bc90fb80e8feb75122b42edaae49560f81392cf4e1946726e906110ef908390600190611754565b611242846323b872dd60e01b85858560405160240161113793929190611411565b50505050565b60006060836001600160a01b03168360405161126491906113ab565b6000604051808303816000865af19150503d80600081146112a1576040519150601f19603f3d011682016040523d82523d6000602084013e6112a6565b606091505b5091509150816112c85760405162461bcd60e51b815260040161050f9061150c565b80511561124257808060200190518101906112e3919061135b565b6112425760405162461bcd60e51b815260040161050f9061168c565b80356001600160a01b0381168114610b3657600080fd5b600060208284031215611327578081fd5b610f2b83836112ff565b60008060408385031215611343578081fd5b61134d84846112ff565b946020939093013593505050565b60006020828403121561136c578081fd5b81518015158114610f2b578182fd5b60006020828403121561138c578081fd5b5035919050565b6000602082840312156113a4578081fd5b5051919050565b60008251815b818110156113cb57602081860181015185830152016113b1565b818111156113d95782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b602081016003831061144e57fe5b91905290565b6020808252601d908201527f444f444f5f51554f54455f42414c414e43455f4e4f545f454e4f554748000000604082015260600190565b6020808252600d908201526c494e56414c49445f434c41494d60981b604082015260600190565b60208082526009908201526814915153951490539560ba1b604082015260600190565b6020808252601c908201527f51554f54455f42414c414e43455f4c494d49545f455843454544454400000000604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252600e908201526d2224ab24a224a723afa2a92927a960911b604082015260600190565b6020808252601b908201527f424153455f42414c414e43455f4c494d49545f45584345454445440000000000604082015260600190565b60208082526009908201526829aaa12fa2a92927a960b91b604082015260600190565b6020808252601c908201527f444f444f5f424153455f42414c414e43455f4e4f545f454e4f55474800000000604082015260600190565b6020808252600d908201526c24a72b20a624a22fa7aba722a960991b604082015260600190565b6020808252600b908201526a1113d113d7d0d313d4d15160aa1b604082015260600190565b6020808252600990820152682727aa2fa7aba722a960b91b604082015260600190565b60208082526009908201526820a2222fa2a92927a960b91b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526009908201526826aaa62fa2a92927a960b91b604082015260600190565b6020808252600f908201526e1053149150511657d0d31052535151608a1b604082015260600190565b6020808252600f908201526e1113d113d7d393d517d0d313d4d151608a1b604082015260600190565b90815260200190565b9182521515602082015260400190565b91825260208201526040019056fea2646970667358221220cfea613c5e0f5d3e3df8fc569e9c30dd6e0f3e8a4581f0064c3c6f4a868b6cf964736f6c63430006090033", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061025e5760003560e01c80637c9b8e8911610146578063c3a2a665116100c3578063dd58b41c11610087578063dd58b41c146103ee578063eab5d20e146103f6578063ec2fd46d146103fe578063ed0aa42814610406578063f2fde38b14610419578063f67ed4481461042c5761025e565b8063c3a2a665146103bb578063c5bbffe8146103ce578063c6b73cf9146103d6578063d4b97046146103de578063d689107c146103e65761025e565b8063a598aca71161010a578063a598aca714610393578063ab44a7a31461039b578063ac1fbc98146103a3578063b2094fd3146103ab578063c0ffa178146103b35761025e565b80637c9b8e891461036b5780638456db15146103735780638ff5e7421461037b5780639b020fba14610383578063a3161a561461038b5761025e565b80634322ec83116101df578063648a4fac116101a3578063648a4fac1461031857806368be20ad146103205780636ec6a58d1461034057806373a2ab7c14610348578063796da7af146103505780637aed942d146103585761025e565b80634322ec83146102f05780634a248d2a146102f85780634de4527e146103005780634e71e0c81461030857806354fd4d50146103105761025e565b80631f3c156e116102265780631f3c156e146102bb578063245c9685146102c55780632aa82c65146102cd578063387b0c11146102d55780633960f142146102e85761025e565b80630cd1667d146102635780630e6518e91461028157806316048bc4146102895780631769ddaa1461029e57806317be952e146102a6575b600080fd5b61026b61043f565b604051610278919061174b565b60405180910390f35b61026b6104c1565b6102916104c7565b60405161027891906113e4565b61026b6104d6565b6102ae6104dc565b6040516102789190611440565b6102c36104e5565b005b61026b6107b1565b61026b6107b7565b6102c36102e336600461137b565b6107fc565b61029161085c565b61029161086b565b61029161087a565b61026b610889565b6102c361088f565b61026b61091d565b6102c3610922565b61033361032e366004611316565b610a3c565b6040516102789190611435565b610333610a51565b610291610a61565b61026b610a70565b61026b610366366004611316565b610ab5565b61026b610b3c565b610291610b42565b610333610b51565b61026b610b5f565b610333610b65565b610333610b6e565b61026b610b7e565b610291610b84565b61026b610b93565b61026b610b99565b6102c36103c9366004611331565b610b9f565b610333610d75565b61026b610d85565b610291610d8b565b610291610d9a565b610333610da9565b61026b610db9565b61026b610dbf565b6102c361041436600461137b565b610dc5565b6102c3610427366004611316565b610e15565b61026b61043a366004611316565b610ec0565b601354604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561048457600080fd5b505afa158015610498573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bc9190611393565b905090565b60165481565b6000546001600160a01b031681565b60055481565b600e5460ff1681565b600154600160a01b900460ff16156105185760405162461bcd60e51b815260040161050f906114b2565b60405180910390fd5b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff166105535760405162461bcd60e51b815260040161050f90611722565b3360009081526017602052604090205460ff16156105835760405162461bcd60e51b815260040161050f906116f9565b336000818152601760205260408120805460ff19166001179055906105a790610ec0565b905060006105b433610ab5565b9050600082156105eb576105e86105c96107b7565b6010546105dc908663ffffffff610ef116565b9063ffffffff610f3216565b90505b60008215610614576106116105fe61043f565b600f546105dc908663ffffffff610ef116565b90505b601054610627908363ffffffff610f6416565b601055600f5461063d908263ffffffff610f6416565b600f8190555061065f61065284601554610f8c565b839063ffffffff610fae16565b915061067d61067085601654610f8c565b829063ffffffff610fae16565b90506106893382610fd3565b610693338361100a565b601354604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac906106c590339087906004016113f8565b600060405180830381600087803b1580156106df57600080fd5b505af11580156106f3573d6000803e3d6000fd5b5050601454604051632770a7eb60e21b81526001600160a01b039091169250639dc29fac915061072990339088906004016113f8565b600060405180830381600087803b15801561074357600080fd5b505af1158015610757573d6000803e3d6000fd5b50505050336001600160a01b03167fbe5f7fe66d16c6a87bb5b8b08a96634fe4f1c2bac9e5e413efe41a782d4d0c438284604051610796929190611764565b60405180910390a2505050506001805460ff60a01b19169055565b60105481565b601454604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561048457600080fd5b600154600160a01b900460ff16156108265760405162461bcd60e51b815260040161050f906114b2565b6001805460ff60a01b1916600160a01b1790556108433382611041565b61084c816110a6565b506001805460ff60a01b19169055565b6006546001600160a01b031681565b6007546001600160a01b031681565b6008546001600160a01b031681565b60025481565b6001546001600160a01b031633146108b95760405162461bcd60e51b815260040161050f9061148b565b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b606590565b6000546001600160a01b0316331461094c5760405162461bcd60e51b815260040161050f90611646565b600154600160b01b900460ff16156109765760405162461bcd60e51b815260040161050f90611621565b6001805462ffffff60b81b1960ff60b01b19909116600160b01b17169055600061099e61043f565b905060006109aa6107b7565b905060105460125411156109e65760006109d1601054601254610f6490919063ffffffff16565b90506109dd81846110fa565b601555506109ed565b6012546010555b600f546011541115610a27576000610a12600f54601154610f6490919063ffffffff16565b9050610a1e81836110fa565b60165550610a2e565b601154600f555b5050600e805460ff19169055565b60176020526000908152604090205460ff1681565b600154600160b01b900460ff1681565b600a546001600160a01b031681565b600a5460408051634c6afee560e11b815290516000926001600160a01b0316916398d5fdca916004808301926020929190829003018186803b15801561048457600080fd5b6013546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610ae69085906004016113e4565b60206040518083038186803b158015610afe57600080fd5b505afa158015610b12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b369190611393565b92915050565b60125481565b6001546001600160a01b031681565b600354610100900460ff1681565b60045481565b60035460ff1681565b600154600160c01b900460ff1681565b600b5481565b6014546001600160a01b031681565b600f5481565b600c5481565b6000546001600160a01b03163314610bc95760405162461bcd60e51b815260040161050f90611646565b6008546001600160a01b0383811691161415610c9057601154610bf2908263ffffffff610fae16565b6008546040516370a0823160e01b81526001600160a01b03909116906370a0823190610c229030906004016113e4565b60206040518083038186803b158015610c3a57600080fd5b505afa158015610c4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c729190611393565b1015610c905760405162461bcd60e51b815260040161050f906115c3565b6009546001600160a01b0383811691161415610d5757601254610cb9908263ffffffff610fae16565b6009546040516370a0823160e01b81526001600160a01b03909116906370a0823190610ce99030906004016113e4565b60206040518083038186803b158015610d0157600080fd5b505afa158015610d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d399190611393565b1015610d575760405162461bcd60e51b815260040161050f90611454565b610d716001600160a01b038316338363ffffffff61111816565b5050565b600154600160b81b900460ff1681565b60155481565b6009546001600160a01b031681565b6013546001600160a01b031681565b600154600160c81b900460ff1681565b60115481565b600d5481565b600154600160a01b900460ff1615610def5760405162461bcd60e51b815260040161050f906114b2565b6001805460ff60a01b1916600160a01b179055610e0c3382611173565b61084c816111d8565b6000546001600160a01b03163314610e3f5760405162461bcd60e51b815260040161050f90611646565b6001600160a01b038116610e655760405162461bcd60e51b815260040161050f906115fa565b600080546040516001600160a01b03808516939216917fdcf55418cee3220104fef63f979ff3c4097ad240c0c43dcb33ce837748983e6291a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610ae69085906004016113e4565b600082610f0057506000610b36565b82820282848281610f0d57fe5b0414610f2b5760405162461bcd60e51b815260040161050f906116d6565b9392505050565b6000808211610f535760405162461bcd60e51b815260040161050f90611541565b818381610f5c57fe5b049392505050565b600082821115610f865760405162461bcd60e51b815260040161050f906115a0565b50900390565b6000670de0b6b3a7640000610fa7848463ffffffff610ef116565b81610f5c57fe5b600082820183811015610f2b5760405162461bcd60e51b815260040161050f90611669565b600854610ff0906001600160a01b0316838363ffffffff61111816565b601154611003908263ffffffff610f6416565b6011555050565b600954611027906001600160a01b0316838363ffffffff61111816565b60125461103a908263ffffffff610f6416565b6012555050565b600554601254611057908363ffffffff610fae16565b11156110755760405162461bcd60e51b815260040161050f906114d5565b600954611093906001600160a01b031683308463ffffffff61122116565b60125461103a908263ffffffff610fae16565b6010546110b9908263ffffffff610fae16565b6010556040517fa259c93818139b6bc90fb80e8feb75122b42edaae49560f81392cf4e1946726e906110ef908390600090611754565b60405180910390a150565b6000610f2b826105dc85670de0b6b3a764000063ffffffff610ef116565b61116e8363a9059cbb60e01b84846040516024016111379291906113f8565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611248565b505050565b600454601154611189908363ffffffff610fae16565b11156111a75760405162461bcd60e51b815260040161050f90611569565b6008546111c5906001600160a01b031683308463ffffffff61122116565b601154611003908263ffffffff610fae16565b600f546111eb908263ffffffff610fae16565b600f556040517fa259c93818139b6bc90fb80e8feb75122b42edaae49560f81392cf4e1946726e906110ef908390600190611754565b611242846323b872dd60e01b85858560405160240161113793929190611411565b50505050565b60006060836001600160a01b03168360405161126491906113ab565b6000604051808303816000865af19150503d80600081146112a1576040519150601f19603f3d011682016040523d82523d6000602084013e6112a6565b606091505b5091509150816112c85760405162461bcd60e51b815260040161050f9061150c565b80511561124257808060200190518101906112e3919061135b565b6112425760405162461bcd60e51b815260040161050f9061168c565b80356001600160a01b0381168114610b3657600080fd5b600060208284031215611327578081fd5b610f2b83836112ff565b60008060408385031215611343578081fd5b61134d84846112ff565b946020939093013593505050565b60006020828403121561136c578081fd5b81518015158114610f2b578182fd5b60006020828403121561138c578081fd5b5035919050565b6000602082840312156113a4578081fd5b5051919050565b60008251815b818110156113cb57602081860181015185830152016113b1565b818111156113d95782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b602081016003831061144e57fe5b91905290565b6020808252601d908201527f444f444f5f51554f54455f42414c414e43455f4e4f545f454e4f554748000000604082015260600190565b6020808252600d908201526c494e56414c49445f434c41494d60981b604082015260600190565b60208082526009908201526814915153951490539560ba1b604082015260600190565b6020808252601c908201527f51554f54455f42414c414e43455f4c494d49545f455843454544454400000000604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252600e908201526d2224ab24a224a723afa2a92927a960911b604082015260600190565b6020808252601b908201527f424153455f42414c414e43455f4c494d49545f45584345454445440000000000604082015260600190565b60208082526009908201526829aaa12fa2a92927a960b91b604082015260600190565b6020808252601c908201527f444f444f5f424153455f42414c414e43455f4e4f545f454e4f55474800000000604082015260600190565b6020808252600d908201526c24a72b20a624a22fa7aba722a960991b604082015260600190565b6020808252600b908201526a1113d113d7d0d313d4d15160aa1b604082015260600190565b6020808252600990820152682727aa2fa7aba722a960b91b604082015260600190565b60208082526009908201526820a2222fa2a92927a960b91b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526009908201526826aaa62fa2a92927a960b91b604082015260600190565b6020808252600f908201526e1053149150511657d0d31052535151608a1b604082015260600190565b6020808252600f908201526e1113d113d7d393d517d0d313d4d151608a1b604082015260600190565b90815260200190565b9182521515602082015260400190565b91825260208201526040019056fea2646970667358221220cfea613c5e0f5d3e3df8fc569e9c30dd6e0f3e8a4581f0064c3c6f4a868b6cf964736f6c63430006090033", "immutableReferences": {}, "sourceMap": "560:5347:26:-:0;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "560:5347:26:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2949:133:27;;;:::i;:::-;;;;;;;;;;;;;;;;2006:43;;;:::i;264:22:37:-;;;:::i;:::-;;;;;;;;1112:36:27;;;:::i;1604:31::-;;;:::i;:::-;;;;;;;;3873:1392:26;;;:::i;:::-;;1688:42:27;;;:::i;3243:135::-;;;:::i;2545:161:26:-;;;;;;;;;:::i;1202:27:27:-;;;:::i;1271:::-;;;:::i;1352:::-;;;:::i;912:32::-;;;:::i;963:225:37:-;;;:::i;3433:87:27:-;;;:::i;2808:1006:26:-;;;:::i;2055:41:27:-;;;;;;;;;:::i;:::-;;;;;;;;772:20;;;:::i;1419:23::-;;;:::i;2682:108::-;;;:::i;2796:147::-;;;;;;;;;:::i;1771:30::-;;;:::i;292:26:37:-;;;:::i;1036:29:27:-;;;:::i;1071:35::-;;;:::i;1002:28::-;;;:::i;839:34::-;;;:::i;1511:28::-;;;:::i;1849:36::-;;;:::i;1641:41::-;;;:::i;1545:28::-;;;:::i;5324:581:26:-;;;;;;;;;:::i;798:35:27:-;;;:::i;1957:43::-;;;:::i;1385:28::-;;;:::i;1808:35::-;;;:::i;879:27::-;;;:::i;1736:29::-;;;:::i;1579:18::-;;;:::i;2381:158:26:-;;;;;;;;;:::i;737:220:37:-;;;;;;;;;:::i;3088:149:27:-;;;;;;;;;:::i;2949:133::-;3040:20;;3027:48;;;-1:-1:-1;;;3027:48:27;;;;3001:7;;-1:-1:-1;;;;;3040:20:27;;3027:46;;:48;;;;;;;;;;;;;;3040:20;3027:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3020:55;;2949:133;:::o;2006:43::-;;;;:::o;264:22:37:-;;;-1:-1:-1;;;;;264:22:37;;:::o;1112:36:27:-;;;;:::o;1604:31::-;;;;;;:::o;3873:1392:26:-;515:9:39;;-1:-1:-1;;;515:9:39;;;;514:10;506:32;;;;-1:-1:-1;;;506:32:39;;;;;;;;;;;;;;;;;560:4;548:16;;-1:-1:-1;;;;548:16:39;-1:-1:-1;;;548:16:39;;;;;-1:-1:-1;;;3940:8:26;::::1;548:16:39::0;3940:8:26::1;3932:36;;;;-1:-1:-1::0;;;3932:36:26::1;;;;;;;;;3997:10;3987:21;::::0;;;:9:::1;:21;::::0;;;;;::::1;;3986:22;3978:50;;;;-1:-1:-1::0;;;3978:50:26::1;;;;;;;;;4048:10;4038:21;::::0;;;:9:::1;:21;::::0;;;;:28;;-1:-1:-1;;4038:28:26::1;4062:4;4038:28;::::0;;:21;4100:36:::1;::::0;:24:::1;:36::i;:::-;4077:59;;4146:19;4168:35;4192:10;4168:23;:35::i;:::-;4146:57:::0;-1:-1:-1;4214:19:26::1;4251:16:::0;;4247:134:::1;;4297:73;4347:22;:20;:22::i;:::-;4297:27;::::0;:45:::1;::::0;4329:12;4297:45:::1;:31;:45;:::i;:::-;:49:::0;:73:::1;:49;:73;:::i;:::-;4283:87;;4247:134;4390:18;4426:15:::0;;4422:129:::1;;4470:70;4518:21;:19;:21::i;:::-;4470:26;::::0;:43:::1;::::0;4501:11;4470:43:::1;:30;:43;:::i;:70::-;4457:83;;4422:129;4591:27;::::0;:44:::1;::::0;4623:11;4591:44:::1;:31;:44;:::i;:::-;4561:27;:74:::0;4674:26:::1;::::0;:42:::1;::::0;4705:10;4674:42:::1;:30;:42;:::i;:::-;4645:26;:71;;;;4741:75;4757:58;4773:11;4786:28;;4757:15;:58::i;:::-;4741:11:::0;;:75:::1;:15;:75;:::i;:::-;4727:89;;4839:75;4854:59;4870:12;4884:28;;4854:15;:59::i;:::-;4839:10:::0;;:75:::1;:14;:75;:::i;:::-;4826:88;;4925:45;4947:10;4959;4925:21;:45::i;:::-;4980:47;5003:10;5015:11;4980:22;:47::i;:::-;5051:20;::::0;5038:64:::1;::::0;-1:-1:-1;;;5038:64:26;;-1:-1:-1;;;;;5051:20:26;;::::1;::::0;5038:39:::1;::::0;:64:::1;::::0;5078:10:::1;::::0;5090:11;;5038:64:::1;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;5125:21:26::1;::::0;5112:66:::1;::::0;-1:-1:-1;;;5112:66:26;;-1:-1:-1;;;;;5125:21:26;;::::1;::::0;-1:-1:-1;5112:40:26::1;::::0;-1:-1:-1;5112:66:26::1;::::0;5153:10:::1;::::0;5165:12;;5112:66:::1;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;5206:10;-1:-1:-1::0;;;;;5194:48:26::1;;5218:10;5230:11;5194:48;;;;;;;;;;;;;;;;5252:7;;;;585:9:39::0;:17;;-1:-1:-1;;;;585:17:39;;;3873:1392:26:o;1688:42:27:-;;;;:::o;3243:135::-;3335:21;;3322:49;;;-1:-1:-1;;;3322:49:27;;;;3296:7;;-1:-1:-1;;;;;3335:21:27;;3322:47;;:49;;;;;;;;;;;;;;3335:21;3322:49;;;;;;;;;;2545:161:26;515:9:39;;-1:-1:-1;;;515:9:39;;;;514:10;506:32;;;;-1:-1:-1;;;506:32:39;;;;;;;;;560:4;548:16;;-1:-1:-1;;;;548:16:39;-1:-1:-1;;;548:16:39;;;2623:41:26::1;2645:10;2657:6:::0;2623:21:::1;:41::i;:::-;2674:25;2692:6;2674:17;:25::i;:::-;-1:-1:-1::0;585:9:39;:17;;-1:-1:-1;;;;585:17:39;;;2545:161:26:o;1202:27:27:-;;;-1:-1:-1;;;;;1202:27:27;;:::o;1271:::-;;;-1:-1:-1;;;;;1271:27:27;;:::o;1352:::-;;;-1:-1:-1;;;;;1352:27:27;;:::o;912:32::-;;;;:::o;963:225:37:-;1030:11;;-1:-1:-1;;;;;1030:11:37;1016:10;:25;1008:51;;;;-1:-1:-1;;;1008:51:37;;;;;;;;;1104:11;;;1095:7;;1074:42;;-1:-1:-1;;;;;1104:11:37;;;;1095:7;;;;1074:42;;;1136:11;;;;1126:21;;-1:-1:-1;;;;;;1126:21:37;;;-1:-1:-1;;;;;1136:11:37;;1126:21;;;;1157:24;;;963:225::o;3433:87:27:-;3501:3;3433:87;:::o;2808:1006:26:-;648:7:37;;-1:-1:-1;;;;;648:7:37;634:10;:21;626:43;;;;-1:-1:-1;;;626:43:37;;;;;;;;;2341:8:27::1;::::0;-1:-1:-1;;;2341:8:27;::::1;;;2340:9;2332:33;;;;-1:-1:-1::0;;;2332:33:27::1;;;;;;;;;2885:4:26::2;2874:15:::0;;-1:-1:-1;;;;;;;;2874:15:26;;::::2;-1:-1:-1::0;;;2874:15:26::2;2980:23:::0;;;2874:15;3040:21:::2;:19;:21::i;:::-;3013:48;;3071:25;3099:22;:20;:22::i;:::-;3071:50;;3154:27;;3136:15;;:45;3132:316;;;3197:18;3218:48;3238:27;;3218:15;;:19;;:48;;;;:::i;:::-;3197:69;;3311:50;3332:10;3344:16;3311:20;:50::i;:::-;3280:28;:81:::0;-1:-1:-1;3132:316:26::2;;;3422:15;::::0;3392:27:::2;:45:::0;3132:316:::2;3479:26;;3462:14;;:43;3458:309;;;3521:17;3541:46;3560:26;;3541:14;;:18;;:46;;;;:::i;:::-;3521:66;;3632:50;3653:9;3664:17;3632:20;:50::i;:::-;3601:28;:81:::0;-1:-1:-1;3458:309:26::2;;;3742:14;::::0;3713:26:::2;:43:::0;3458:309:::2;-1:-1:-1::0;;3777:10:26::2;:30:::0;;-1:-1:-1;;3777:30:26::2;::::0;;2808:1006::o;2055:41:27:-;;;;;;;;;;;;;;;:::o;772:20::-;;;-1:-1:-1;;;772:20:27;;;;;:::o;1419:23::-;;;-1:-1:-1;;;;;1419:23:27;;:::o;2682:108::-;2763:8;;2755:28;;;-1:-1:-1;;;2755:28:27;;;;2729:7;;-1:-1:-1;;;;;2763:8:27;;2755:26;;:28;;;;;;;;;;;;;;2763:8;2755:28;;;;;;;;;;2796:147;2901:20;;2888:48;;-1:-1:-1;;;2888:48:27;;2862:7;;-1:-1:-1;;;;;2901:20:27;;2888:44;;:48;;2933:2;;2888:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2881:55;2796:147;-1:-1:-1;;2796:147:27:o;1771:30::-;;;;:::o;292:26:37:-;;;-1:-1:-1;;;;;292:26:37;;:::o;1036:29:27:-;;;;;;;;;:::o;1071:35::-;;;;:::o;1002:28::-;;;;;;:::o;839:34::-;;;-1:-1:-1;;;839:34:27;;;;;:::o;1511:28::-;;;;:::o;1849:36::-;;;-1:-1:-1;;;;;1849:36:27;;:::o;1641:41::-;;;;:::o;1545:28::-;;;;:::o;5324:581:26:-;648:7:37;;-1:-1:-1;;;;;648:7:37;634:10;:21;626:43;;;;-1:-1:-1;;;626:43:37;;;;;;;;;5415:12:26::1;::::0;-1:-1:-1;;;;;5406:21:26;;::::1;5415:12:::0;::::1;5406:21;5402:214;;;5517:14;::::0;:26:::1;::::0;5536:6;5517:26:::1;:18;:26;:::i;:::-;5475:12;::::0;5468:45:::1;::::0;-1:-1:-1;;;5468:45:26;;-1:-1:-1;;;;;5475:12:26;;::::1;::::0;5468:30:::1;::::0;:45:::1;::::0;5507:4:::1;::::0;5468:45:::1;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:75;;5443:162;;;;-1:-1:-1::0;;;5443:162:26::1;;;;;;;;;5638:13;::::0;-1:-1:-1;;;;;5629:22:26;;::::1;5638:13:::0;::::1;5629:22;5625:218;;;5742:15;::::0;:27:::1;::::0;5762:6;5742:27:::1;:19;:27;:::i;:::-;5699:13;::::0;5692:46:::1;::::0;-1:-1:-1;;;5692:46:26;;-1:-1:-1;;;;;5699:13:26;;::::1;::::0;5692:31:::1;::::0;:46:::1;::::0;5732:4:::1;::::0;5692:46:::1;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:77;;5667:165;;;;-1:-1:-1::0;;;5667:165:26::1;;;;;;;;;5852:46;-1:-1:-1::0;;;;;5852:26:26;::::1;5879:10;5891:6:::0;5852:46:::1;:26;:46;:::i;:::-;5324:581:::0;;:::o;798:35:27:-;;;-1:-1:-1;;;798:35:27;;;;;:::o;1957:43::-;;;;:::o;1385:28::-;;;-1:-1:-1;;;;;1385:28:27;;:::o;1808:35::-;;;-1:-1:-1;;;;;1808:35:27;;:::o;879:27::-;;;-1:-1:-1;;;879:27:27;;;;;:::o;1736:29::-;;;;:::o;1579:18::-;;;;:::o;2381:158:26:-;515:9:39;;-1:-1:-1;;;515:9:39;;;;514:10;506:32;;;;-1:-1:-1;;;506:32:39;;;;;;;;;560:4;548:16;;-1:-1:-1;;;;548:16:39;-1:-1:-1;;;548:16:39;;;2458:40:26::1;2479:10;2491:6:::0;2458:20:::1;:40::i;:::-;2508:24;2525:6;2508:16;:24::i;737:220:37:-:0;648:7;;-1:-1:-1;;;;;648:7:37;634:10;:21;626:43;;;;-1:-1:-1;;;626:43:37;;;;;;;;;-1:-1:-1;;;;;819:22:37;::::1;811:48;;;;-1:-1:-1::0;;;811:48:37::1;;;;;;;;;900:7;::::0;;874:44:::1;::::0;-1:-1:-1;;;;;874:44:37;;::::1;::::0;900:7;::::1;::::0;874:44:::1;::::0;::::1;928:11;:22:::0;;-1:-1:-1;;;;;;928:22:37::1;-1:-1:-1::0;;;;;928:22:37;;;::::1;::::0;;;::::1;::::0;;737:220::o;3088:149:27:-;3194:21;;3181:49;;-1:-1:-1;;;3181:49:27;;3155:7;;-1:-1:-1;;;;;3194:21:27;;3181:45;;:49;;3227:2;;3181:49;;;;281:217:41;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;;;;;;;;;490:1;281:217;-1:-1:-1;;;281:217:41:o;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;392:115:36:-;455:7;379:6;481:13;:6;492:1;481:13;:10;:13;:::i;:::-;:19;;;;1074:157:41;1132:7;1163:5;;;1186:6;;;;1178:28;;;;-1:-1:-1;;;1178:28:41;;;;;;;;1574:183:26;1659:12;;1652:45;;-1:-1:-1;;;;;1659:12:26;1686:2;1690:6;1652:45;:33;:45;:::i;:::-;1724:14;;:26;;1743:6;1724:26;:18;:26;:::i;:::-;1707:14;:43;-1:-1:-1;;1574:183:26:o;1763:187::-;1849:13;;1842:46;;-1:-1:-1;;;;;1849:13:26;1877:2;1881:6;1842:46;:34;:46;:::i;:::-;1916:15;;:27;;1936:6;1916:27;:19;:27;:::i;:::-;1898:15;:45;-1:-1:-1;;1763:187:26:o;1222:346::-;1354:21;;1323:15;;:27;;1343:6;1323:27;:19;:27;:::i;:::-;:52;;1302:127;;;;-1:-1:-1;;;1302:127:26;;;;;;;;;1446:13;;1439:67;;-1:-1:-1;;;;;1446:13:26;1478:4;1492;1499:6;1439:67;:38;:67;:::i;:::-;1534:15;;:27;;1554:6;1534:27;:19;:27;:::i;2201:174::-;2293:27;;:39;;2325:6;2293:39;:31;:39;:::i;:::-;2263:27;:69;2347:21;;;;;;2354:6;;2362:5;;2347:21;;;;;;;;;;2201:174;:::o;645:123:36:-;713:7;739:22;759:1;739:15;:6;379;739:15;:10;:15;:::i;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;911:305:26:-;1028:20;;998:14;;:26;;1017:6;998:26;:18;:26;:::i;:::-;:50;;990:90;;;;-1:-1:-1;;;990:90:26;;;;;;;;;1097:12;;1090:66;;-1:-1:-1;;;;;1097:12:26;1128:4;1142;1149:6;1090:66;:37;:66;:::i;:::-;1183:14;;:26;;1202:6;1183:26;:18;:26;:::i;2025:170::-;2115:26;;:38;;2146:6;2115:38;:30;:38;:::i;:::-;2086:26;:67;2168:20;;;;;;2175:6;;2183:4;;2168:20;;1015:275:40;1153:130;1186:5;1228:27;;;1257:4;1263:2;1267:5;1205:68;;;;;;;;;;;1153:130;1015:275;;;;:::o;2335:1027::-;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;;;;;;;;5:130:-1;72:20;;-1:-1;;;;;19627:54;;20737:35;;20727:2;;20786:1;;20776:12;555:241;;659:2;647:9;638:7;634:23;630:32;627:2;;;-1:-1;;665:12;627:2;727:53;772:7;748:22;727:53;;803:366;;;924:2;912:9;903:7;899:23;895:32;892:2;;;-1:-1;;930:12;892:2;992:53;1037:7;1013:22;992:53;;;982:63;1082:2;1121:22;;;;344:20;;-1:-1;;;886:283;1176:257;;1288:2;1276:9;1267:7;1263:23;1259:32;1256:2;;;-1:-1;;1294:12;1256:2;223:6;217:13;20883:5;19400:13;19393:21;20861:5;20858:32;20848:2;;-1:-1;;20894:12;1440:241;;1544:2;1532:9;1523:7;1519:23;1515:32;1512:2;;;-1:-1;;1550:12;1512:2;-1:-1;344:20;;1506:175;-1:-1;1506:175;1688:263;;1803:2;1791:9;1782:7;1778:23;1774:32;1771:2;;;-1:-1;;1809:12;1771:2;-1:-1;492:13;;1765:186;-1:-1;1765:186;8573:271;;2498:5;18870:12;-1:-1;20363:101;20377:6;20374:1;20371:13;20363:101;;;2642:4;20444:11;;;;;20438:18;20425:11;;;20418:39;20392:10;20363:101;;;20479:6;20476:1;20473:13;20470:2;;;-1:-1;20535:6;20530:3;20526:16;20519:27;20470:2;-1:-1;2673:16;;;;;8707:137;-1:-1;;8707:137;8851:222;-1:-1;;;;;19627:54;;;;2178:37;;8978:2;8963:18;;8949:124;9080:349;-1:-1;;;;;19627:54;;;;2037:58;;9415:2;9400:18;;8524:37;9243:2;9228:18;;9214:215;9436:444;-1:-1;;;;;19627:54;;;2178:37;;19627:54;;;;9783:2;9768:18;;2178:37;9866:2;9851:18;;8524:37;;;;9619:2;9604:18;;9590:290;10227:210;19400:13;;19393:21;2292:34;;10348:2;10333:18;;10319:118;10444:244;10582:2;10567:18;;20649:1;20639:12;;20629:2;;20655:9;20629:2;2783:61;;;10553:135;;10695:416;10895:2;10909:47;;;3081:2;10880:18;;;19168:19;3117:31;19208:14;;;3097:52;3168:12;;;10866:245;11118:416;11318:2;11332:47;;;3419:2;11303:18;;;19168:19;-1:-1;;;19208:14;;;3435:36;3490:12;;;11289:245;11541:416;11741:2;11755:47;;;3741:1;11726:18;;;19168:19;-1:-1;;;19208:14;;;3756:32;3807:12;;;11712:245;11964:416;12164:2;12178:47;;;4058:2;12149:18;;;19168:19;4094:30;19208:14;;;4074:51;4144:12;;;12135:245;12387:416;12587:2;12601:47;;;12572:18;;;19168:19;4431:34;19208:14;;;4411:55;4485:12;;;12558:245;12810:416;13010:2;13024:47;;;4736:2;12995:18;;;19168:19;-1:-1;;;19208:14;;;4752:37;4808:12;;;12981:245;13233:416;13433:2;13447:47;;;5059:2;13418:18;;;19168:19;5095:29;19208:14;;;5075:50;5144:12;;;13404:245;13656:416;13856:2;13870:47;;;5395:1;13841:18;;;19168:19;-1:-1;;;19208:14;;;5410:32;5461:12;;;13827:245;14079:416;14279:2;14293:47;;;5712:2;14264:18;;;19168:19;5748:30;19208:14;;;5728:51;5798:12;;;14250:245;14502:416;14702:2;14716:47;;;6049:2;14687:18;;;19168:19;-1:-1;;;19208:14;;;6065:36;6120:12;;;14673:245;14925:416;15125:2;15139:47;;;6371:2;15110:18;;;19168:19;-1:-1;;;19208:14;;;6387:34;6440:12;;;15096:245;15348:416;15548:2;15562:47;;;6691:1;15533:18;;;19168:19;-1:-1;;;19208:14;;;6706:32;6757:12;;;15519:245;15771:416;15971:2;15985:47;;;7008:1;15956:18;;;19168:19;-1:-1;;;19208:14;;;7023:32;7074:12;;;15942:245;16194:416;16394:2;16408:47;;;7325:2;16379:18;;;19168:19;7361:34;19208:14;;;7341:55;-1:-1;;;7416:12;;;7409:34;7462:12;;;16365:245;16617:416;16817:2;16831:47;;;7713:1;16802:18;;;19168:19;-1:-1;;;19208:14;;;7728:32;7779:12;;;16788:245;17040:416;17240:2;17254:47;;;8030:2;17225:18;;;19168:19;-1:-1;;;19208:14;;;8046:38;8103:12;;;17211:245;17463:416;17663:2;17677:47;;;8354:2;17648:18;;;19168:19;-1:-1;;;19208:14;;;8370:38;8427:12;;;17634:245;17886:222;8524:37;;;18013:2;17998:18;;17984:124;18115:321;8524:37;;;19400:13;19393:21;18422:2;18407:18;;2292:34;18264:2;18249:18;;18235:201;18443:333;8524:37;;;18762:2;18747:18;;8524:37;18598:2;18583:18;;18569:207", "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 {SafeMath} from \"../lib/SafeMath.sol\";\nimport {SafeERC20} from \"../lib/SafeERC20.sol\";\nimport {DecimalMath} from \"../lib/DecimalMath.sol\";\nimport {Types} from \"../lib/Types.sol\";\nimport {IDODOLpToken} from \"../intf/IDODOLpToken.sol\";\nimport {IERC20} from \"../intf/IERC20.sol\";\nimport {Storage} from \"./Storage.sol\";\n\n\n/**\n * @title Settlement\n * @author DODO Breeder\n *\n * @notice Functions for assets settlement\n */\ncontract Settlement is Storage {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n // ============ Events ============\n\n event Donate(uint256 amount, bool isBaseToken);\n\n event ClaimAssets(address indexed user, uint256 baseTokenAmount, uint256 quoteTokenAmount);\n\n // ============ Assets IN/OUT Functions ============\n\n function _baseTokenTransferIn(address from, uint256 amount) internal {\n require(_BASE_BALANCE_.add(amount) <= _BASE_BALANCE_LIMIT_, \"BASE_BALANCE_LIMIT_EXCEEDED\");\n IERC20(_BASE_TOKEN_).safeTransferFrom(from, address(this), amount);\n _BASE_BALANCE_ = _BASE_BALANCE_.add(amount);\n }\n\n function _quoteTokenTransferIn(address from, uint256 amount) internal {\n require(\n _QUOTE_BALANCE_.add(amount) <= _QUOTE_BALANCE_LIMIT_,\n \"QUOTE_BALANCE_LIMIT_EXCEEDED\"\n );\n IERC20(_QUOTE_TOKEN_).safeTransferFrom(from, address(this), amount);\n _QUOTE_BALANCE_ = _QUOTE_BALANCE_.add(amount);\n }\n\n function _baseTokenTransferOut(address to, uint256 amount) internal {\n IERC20(_BASE_TOKEN_).safeTransfer(to, amount);\n _BASE_BALANCE_ = _BASE_BALANCE_.sub(amount);\n }\n\n function _quoteTokenTransferOut(address to, uint256 amount) internal {\n IERC20(_QUOTE_TOKEN_).safeTransfer(to, amount);\n _QUOTE_BALANCE_ = _QUOTE_BALANCE_.sub(amount);\n }\n\n // ============ Donate to Liquidity Pool Functions ============\n\n function _donateBaseToken(uint256 amount) internal {\n _TARGET_BASE_TOKEN_AMOUNT_ = _TARGET_BASE_TOKEN_AMOUNT_.add(amount);\n emit Donate(amount, true);\n }\n\n function _donateQuoteToken(uint256 amount) internal {\n _TARGET_QUOTE_TOKEN_AMOUNT_ = _TARGET_QUOTE_TOKEN_AMOUNT_.add(amount);\n emit Donate(amount, false);\n }\n\n function donateBaseToken(uint256 amount) external preventReentrant {\n _baseTokenTransferIn(msg.sender, amount);\n _donateBaseToken(amount);\n }\n\n function donateQuoteToken(uint256 amount) external preventReentrant {\n _quoteTokenTransferIn(msg.sender, amount);\n _donateQuoteToken(amount);\n }\n\n // ============ Final Settlement Functions ============\n\n // last step to shut down dodo\n function finalSettlement() external onlyOwner notClosed {\n _CLOSED_ = true;\n _DEPOSIT_QUOTE_ALLOWED_ = false;\n _DEPOSIT_BASE_ALLOWED_ = false;\n _TRADE_ALLOWED_ = false;\n uint256 totalBaseCapital = getTotalBaseCapital();\n uint256 totalQuoteCapital = getTotalQuoteCapital();\n\n if (_QUOTE_BALANCE_ > _TARGET_QUOTE_TOKEN_AMOUNT_) {\n uint256 spareQuote = _QUOTE_BALANCE_.sub(_TARGET_QUOTE_TOKEN_AMOUNT_);\n _BASE_CAPITAL_RECEIVE_QUOTE_ = DecimalMath.divFloor(spareQuote, totalBaseCapital);\n } else {\n _TARGET_QUOTE_TOKEN_AMOUNT_ = _QUOTE_BALANCE_;\n }\n\n if (_BASE_BALANCE_ > _TARGET_BASE_TOKEN_AMOUNT_) {\n uint256 spareBase = _BASE_BALANCE_.sub(_TARGET_BASE_TOKEN_AMOUNT_);\n _QUOTE_CAPITAL_RECEIVE_BASE_ = DecimalMath.divFloor(spareBase, totalQuoteCapital);\n } else {\n _TARGET_BASE_TOKEN_AMOUNT_ = _BASE_BALANCE_;\n }\n\n _R_STATUS_ = Types.RStatus.ONE;\n }\n\n // claim remaining assets after final settlement\n function claimAssets() external preventReentrant {\n require(_CLOSED_, \"DODO_NOT_CLOSED\");\n require(!_CLAIMED_[msg.sender], \"ALREADY_CLAIMED\");\n _CLAIMED_[msg.sender] = true;\n\n uint256 quoteCapital = getQuoteCapitalBalanceOf(msg.sender);\n uint256 baseCapital = getBaseCapitalBalanceOf(msg.sender);\n\n uint256 quoteAmount = 0;\n if (quoteCapital > 0) {\n quoteAmount = _TARGET_QUOTE_TOKEN_AMOUNT_.mul(quoteCapital).div(getTotalQuoteCapital());\n }\n uint256 baseAmount = 0;\n if (baseCapital > 0) {\n baseAmount = _TARGET_BASE_TOKEN_AMOUNT_.mul(baseCapital).div(getTotalBaseCapital());\n }\n\n _TARGET_QUOTE_TOKEN_AMOUNT_ = _TARGET_QUOTE_TOKEN_AMOUNT_.sub(quoteAmount);\n _TARGET_BASE_TOKEN_AMOUNT_ = _TARGET_BASE_TOKEN_AMOUNT_.sub(baseAmount);\n\n quoteAmount = quoteAmount.add(DecimalMath.mul(baseCapital, _BASE_CAPITAL_RECEIVE_QUOTE_));\n baseAmount = baseAmount.add(DecimalMath.mul(quoteCapital, _QUOTE_CAPITAL_RECEIVE_BASE_));\n\n _baseTokenTransferOut(msg.sender, baseAmount);\n _quoteTokenTransferOut(msg.sender, quoteAmount);\n\n IDODOLpToken(_BASE_CAPITAL_TOKEN_).burn(msg.sender, baseCapital);\n IDODOLpToken(_QUOTE_CAPITAL_TOKEN_).burn(msg.sender, quoteCapital);\n\n emit ClaimAssets(msg.sender, baseAmount, quoteAmount);\n return;\n }\n\n // in case someone transfer to contract directly\n function retrieve(address token, uint256 amount) external onlyOwner {\n if (token == _BASE_TOKEN_) {\n require(\n IERC20(_BASE_TOKEN_).balanceOf(address(this)) >= _BASE_BALANCE_.add(amount),\n \"DODO_BASE_BALANCE_NOT_ENOUGH\"\n );\n }\n if (token == _QUOTE_TOKEN_) {\n require(\n IERC20(_QUOTE_TOKEN_).balanceOf(address(this)) >= _QUOTE_BALANCE_.add(amount),\n \"DODO_QUOTE_BALANCE_NOT_ENOUGH\"\n );\n }\n IERC20(token).safeTransfer(msg.sender, amount);\n }\n}\n", "sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Settlement.sol", "ast": { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Settlement.sol", "exportedSymbols": { "Settlement": [ 9396 ] }, "id": 9397, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 8855, "literals": [ "solidity", "0.6", ".9" ], "nodeType": "PragmaDirective", "src": "78:22:26" }, { "id": 8856, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "101:33:26" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol", "file": "../lib/SafeMath.sol", "id": 8858, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 11624, "src": "136:45:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8857, "name": "SafeMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "144:8:26", "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": 8860, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 11441, "src": "182:47:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8859, "name": "SafeERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "190:9:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/DecimalMath.sol", "file": "../lib/DecimalMath.sol", "id": 8862, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 11079, "src": "230:51:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8861, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "238:11:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/Types.sol", "file": "../lib/Types.sol", "id": 8864, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 11632, "src": "282:39:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8863, "name": "Types", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "290:5:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IDODOLpToken.sol", "file": "../intf/IDODOLpToken.sol", "id": 8866, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 10537, "src": "322:54:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8865, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "330:12:26", "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": 8868, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 10608, "src": "377:42:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8867, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "385:6:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Storage.sol", "file": "./Storage.sol", "id": 8870, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 9614, "src": "420:38:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8869, "name": "Storage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "428:7:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 8872, "name": "Storage", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 9613, "src": "583:7:26", "typeDescriptions": { "typeIdentifier": "t_contract$_Storage_$9613", "typeString": "contract Storage" } }, "id": 8873, "nodeType": "InheritanceSpecifier", "src": "583:7:26" } ], "contractDependencies": [ 9613, 11166, 11296 ], "contractKind": "contract", "documentation": { "id": 8871, "nodeType": "StructuredDocumentation", "src": "461:98:26", "text": " @title Settlement\n @author DODO Breeder\n @notice Functions for assets settlement" }, "fullyImplemented": true, "id": 9396, "linearizedBaseContracts": [ 9396, 9613, 11296, 11166 ], "name": "Settlement", "nodeType": "ContractDefinition", "nodes": [ { "id": 8876, "libraryName": { "contractScope": null, "id": 8874, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 11623, "src": "603:8:26", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$11623", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "597:27:26", "typeName": { "id": 8875, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "616:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "id": 8879, "libraryName": { "contractScope": null, "id": 8877, "name": "SafeERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 11440, "src": "635:9:26", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeERC20_$11440", "typeString": "library SafeERC20" } }, "nodeType": "UsingForDirective", "src": "629:27:26", "typeName": { "contractScope": null, "id": 8878, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 10607, "src": "649:6:26", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } } }, { "anonymous": false, "documentation": null, "id": 8885, "name": "Donate", "nodeType": "EventDefinition", "parameters": { "id": 8884, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8881, "indexed": false, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8885, "src": "716:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8880, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "716:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8883, "indexed": false, "mutability": "mutable", "name": "isBaseToken", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8885, "src": "732:16:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 8882, "name": "bool", "nodeType": "ElementaryTypeName", "src": "732:4:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "715:34:26" }, "src": "703:47:26" }, { "anonymous": false, "documentation": null, "id": 8893, "name": "ClaimAssets", "nodeType": "EventDefinition", "parameters": { "id": 8892, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8887, "indexed": true, "mutability": "mutable", "name": "user", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8893, "src": "774:20:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8886, "name": "address", "nodeType": "ElementaryTypeName", "src": "774:7:26", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8889, "indexed": false, "mutability": "mutable", "name": "baseTokenAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8893, "src": "796:23:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8888, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "796:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8891, "indexed": false, "mutability": "mutable", "name": "quoteTokenAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8893, "src": "821:24:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8890, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "821:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "773:73:26" }, "src": "756:91:26" }, { "body": { "id": 8929, "nodeType": "Block", "src": "980:236:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8906, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8903, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8897, "src": "1017:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8901, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "998:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8902, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "998:18:26", "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": 8904, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "998:26:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 8905, "name": "_BASE_BALANCE_LIMIT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9439, "src": "1028:20:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "998:50:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "424153455f42414c414e43455f4c494d49545f4558434545444544", "id": 8907, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1050:29:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_73112b7b3e7782e99b674721f6033538d0f440b164e0f7d64c222cd9d5354cac", "typeString": "literal_string \"BASE_BALANCE_LIMIT_EXCEEDED\"" }, "value": "BASE_BALANCE_LIMIT_EXCEEDED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_73112b7b3e7782e99b674721f6033538d0f440b164e0f7d64c222cd9d5354cac", "typeString": "literal_string \"BASE_BALANCE_LIMIT_EXCEEDED\"" } ], "id": 8900, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "990:7:26", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 8908, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "990:90:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8909, "nodeType": "ExpressionStatement", "src": "990:90:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8914, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8895, "src": "1128:4:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8917, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1142:4:26", "typeDescriptions": { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } ], "id": 8916, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1134:7:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 8915, "name": "address", "nodeType": "ElementaryTypeName", "src": "1134:7:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 8918, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1134:13:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8919, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8897, "src": "1149:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8911, "name": "_BASE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9447, "src": "1097:12:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8910, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1090:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 8912, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1090:20:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 8913, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 11354, "src": "1090:37:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$10607_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$10607_$", "typeString": "function (contract IERC20,address,address,uint256)" } }, "id": 8920, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1090:66:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8921, "nodeType": "ExpressionStatement", "src": "1090:66:26" }, { "expression": { "argumentTypes": null, "id": 8927, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 8922, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "1166:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8925, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8897, "src": "1202:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8923, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "1183:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8924, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "1183:18:26", "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": 8926, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1183:26:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1166:43:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8928, "nodeType": "ExpressionStatement", "src": "1166:43:26" } ] }, "documentation": null, "id": 8930, "implemented": true, "kind": "function", "modifiers": [], "name": "_baseTokenTransferIn", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8898, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8895, "mutability": "mutable", "name": "from", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8930, "src": "941:12:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8894, "name": "address", "nodeType": "ElementaryTypeName", "src": "941:7:26", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8897, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8930, "src": "955:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8896, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "955:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "940:30:26" }, "returnParameters": { "id": 8899, "nodeType": "ParameterList", "parameters": [], "src": "980:0:26" }, "scope": 9396, "src": "911:305:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 8966, "nodeType": "Block", "src": "1292:276:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8943, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8940, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8934, "src": "1343:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8938, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "1323:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8939, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "1323:19:26", "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": 8941, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1323:27:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 8942, "name": "_QUOTE_BALANCE_LIMIT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9441, "src": "1354:21:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1323:52:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "51554f54455f42414c414e43455f4c494d49545f4558434545444544", "id": 8944, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1389:30:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_46871c05d43b94497f8d7f8fa48b2494d3e639610f744f02bdfb7bde16628eb4", "typeString": "literal_string \"QUOTE_BALANCE_LIMIT_EXCEEDED\"" }, "value": "QUOTE_BALANCE_LIMIT_EXCEEDED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_46871c05d43b94497f8d7f8fa48b2494d3e639610f744f02bdfb7bde16628eb4", "typeString": "literal_string \"QUOTE_BALANCE_LIMIT_EXCEEDED\"" } ], "id": 8937, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1302:7:26", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 8945, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1302:127:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8946, "nodeType": "ExpressionStatement", "src": "1302:127:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8951, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8932, "src": "1478:4:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8954, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1492:4:26", "typeDescriptions": { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } ], "id": 8953, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1484:7:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 8952, "name": "address", "nodeType": "ElementaryTypeName", "src": "1484:7:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 8955, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1484:13:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8956, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8934, "src": "1499:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8948, "name": "_QUOTE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9449, "src": "1446:13:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8947, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1439:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 8949, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1439:21:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 8950, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 11354, "src": "1439:38:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$10607_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$10607_$", "typeString": "function (contract IERC20,address,address,uint256)" } }, "id": 8957, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1439:67:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8958, "nodeType": "ExpressionStatement", "src": "1439:67:26" }, { "expression": { "argumentTypes": null, "id": 8964, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 8959, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "1516:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8962, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8934, "src": "1554:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8960, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "1534:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8961, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "1534:19:26", "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": 8963, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1534:27:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1516:45:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8965, "nodeType": "ExpressionStatement", "src": "1516:45:26" } ] }, "documentation": null, "id": 8967, "implemented": true, "kind": "function", "modifiers": [], "name": "_quoteTokenTransferIn", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8935, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8932, "mutability": "mutable", "name": "from", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8967, "src": "1253:12:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8931, "name": "address", "nodeType": "ElementaryTypeName", "src": "1253:7:26", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8934, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8967, "src": "1267:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8933, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1267:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1252:30:26" }, "returnParameters": { "id": 8936, "nodeType": "ParameterList", "parameters": [], "src": "1292:0:26" }, "scope": 9396, "src": "1222:346:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 8989, "nodeType": "Block", "src": "1642:115:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8978, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8969, "src": "1686:2:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8979, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8971, "src": "1690:6:26", "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": 8975, "name": "_BASE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9447, "src": "1659:12:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8974, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1652:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 8976, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1652:20:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 8977, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 11329, "src": "1652:33:26", "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": 8980, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1652:45:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8981, "nodeType": "ExpressionStatement", "src": "1652:45:26" }, { "expression": { "argumentTypes": null, "id": 8987, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 8982, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "1707:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8985, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8971, "src": "1743:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8983, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "1724:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8984, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "1724:18:26", "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": 8986, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1724:26:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1707:43:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8988, "nodeType": "ExpressionStatement", "src": "1707:43:26" } ] }, "documentation": null, "id": 8990, "implemented": true, "kind": "function", "modifiers": [], "name": "_baseTokenTransferOut", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8972, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8969, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8990, "src": "1605:10:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8968, "name": "address", "nodeType": "ElementaryTypeName", "src": "1605:7:26", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8971, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8990, "src": "1617:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8970, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1617:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1604:28:26" }, "returnParameters": { "id": 8973, "nodeType": "ParameterList", "parameters": [], "src": "1642:0:26" }, "scope": 9396, "src": "1574:183:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 9012, "nodeType": "Block", "src": "1832:118:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9001, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8992, "src": "1877:2:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 9002, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8994, "src": "1881:6:26", "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": 8998, "name": "_QUOTE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9449, "src": "1849:13:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8997, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1842:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 8999, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1842:21:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 9000, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 11329, "src": "1842:34:26", "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": 9003, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1842:46:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9004, "nodeType": "ExpressionStatement", "src": "1842:46:26" }, { "expression": { "argumentTypes": null, "id": 9010, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9005, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "1898:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9008, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8994, "src": "1936:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9006, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "1916:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9007, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "1916:19:26", "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": 9009, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1916:27:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1898:45:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9011, "nodeType": "ExpressionStatement", "src": "1898:45:26" } ] }, "documentation": null, "id": 9013, "implemented": true, "kind": "function", "modifiers": [], "name": "_quoteTokenTransferOut", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8995, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8992, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9013, "src": "1795:10:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8991, "name": "address", "nodeType": "ElementaryTypeName", "src": "1795:7:26", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8994, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9013, "src": "1807:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8993, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1807:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1794:28:26" }, "returnParameters": { "id": 8996, "nodeType": "ParameterList", "parameters": [], "src": "1832:0:26" }, "scope": 9396, "src": "1763:187:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 9030, "nodeType": "Block", "src": "2076:119:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9023, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9018, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "2086:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9021, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9015, "src": "2146:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9019, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "2115:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9020, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "2115:30:26", "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": 9022, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2115:38:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2086:67:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9024, "nodeType": "ExpressionStatement", "src": "2086:67:26" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9026, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9015, "src": "2175:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "hexValue": "74727565", "id": 9027, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2183:4:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 9025, "name": "Donate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8885, "src": "2168:6:26", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_bool_$returns$__$", "typeString": "function (uint256,bool)" } }, "id": 9028, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2168:20:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9029, "nodeType": "EmitStatement", "src": "2163:25:26" } ] }, "documentation": null, "id": 9031, "implemented": true, "kind": "function", "modifiers": [], "name": "_donateBaseToken", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9016, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9015, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9031, "src": "2051:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9014, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2051:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2050:16:26" }, "returnParameters": { "id": 9017, "nodeType": "ParameterList", "parameters": [], "src": "2076:0:26" }, "scope": 9396, "src": "2025:170:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 9048, "nodeType": "Block", "src": "2253:122:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9041, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9036, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "2263:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9039, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9033, "src": "2325:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9037, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "2293:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9038, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "2293:31:26", "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": 9040, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2293:39:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2263:69:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9042, "nodeType": "ExpressionStatement", "src": "2263:69:26" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9044, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9033, "src": "2354:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "hexValue": "66616c7365", "id": 9045, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2362:5:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 9043, "name": "Donate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8885, "src": "2347:6:26", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_bool_$returns$__$", "typeString": "function (uint256,bool)" } }, "id": 9046, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2347:21:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9047, "nodeType": "EmitStatement", "src": "2342:26:26" } ] }, "documentation": null, "id": 9049, "implemented": true, "kind": "function", "modifiers": [], "name": "_donateQuoteToken", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9034, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9033, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9049, "src": "2228:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9032, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2228:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2227:16:26" }, "returnParameters": { "id": 9035, "nodeType": "ParameterList", "parameters": [], "src": "2253:0:26" }, "scope": 9396, "src": "2201:174:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 9066, "nodeType": "Block", "src": "2448:91:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9057, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2479:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9058, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2479:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9059, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9051, "src": "2491:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9056, "name": "_baseTokenTransferIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8930, "src": "2458:20:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 9060, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2458:40:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9061, "nodeType": "ExpressionStatement", "src": "2458:40:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9063, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9051, "src": "2525:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9062, "name": "_donateBaseToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9031, "src": "2508:16:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 9064, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2508:24:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9065, "nodeType": "ExpressionStatement", "src": "2508:24:26" } ] }, "documentation": null, "functionSelector": "ed0aa428", "id": 9067, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 9054, "modifierName": { "argumentTypes": null, "id": 9053, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "2431:16:26", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2431:16:26" } ], "name": "donateBaseToken", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9052, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9051, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9067, "src": "2406:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9050, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2406:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2405:16:26" }, "returnParameters": { "id": 9055, "nodeType": "ParameterList", "parameters": [], "src": "2448:0:26" }, "scope": 9396, "src": "2381:158:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 9084, "nodeType": "Block", "src": "2613:93:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9075, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2645:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9076, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2645:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9077, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9069, "src": "2657:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9074, "name": "_quoteTokenTransferIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8967, "src": "2623:21:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 9078, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2623:41:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9079, "nodeType": "ExpressionStatement", "src": "2623:41:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9081, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9069, "src": "2692:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9080, "name": "_donateQuoteToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9049, "src": "2674:17:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 9082, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2674:25:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9083, "nodeType": "ExpressionStatement", "src": "2674:25:26" } ] }, "documentation": null, "functionSelector": "387b0c11", "id": 9085, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 9072, "modifierName": { "argumentTypes": null, "id": 9071, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "2596:16:26", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2596:16:26" } ], "name": "donateQuoteToken", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9070, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9069, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9085, "src": "2571:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9068, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2571:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2570:16:26" }, "returnParameters": { "id": 9073, "nodeType": "ParameterList", "parameters": [], "src": "2613:0:26" }, "scope": 9396, "src": "2545:161:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 9174, "nodeType": "Block", "src": "2864:950:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9094, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9092, "name": "_CLOSED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9425, "src": "2874:8:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 9093, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2885:4:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "2874:15:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 9095, "nodeType": "ExpressionStatement", "src": "2874:15:26" }, { "expression": { "argumentTypes": null, "id": 9098, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9096, "name": "_DEPOSIT_QUOTE_ALLOWED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9427, "src": "2899:23:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", "id": 9097, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2925:5:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "2899:31:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 9099, "nodeType": "ExpressionStatement", "src": "2899:31:26" }, { "expression": { "argumentTypes": null, "id": 9102, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9100, "name": "_DEPOSIT_BASE_ALLOWED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9429, "src": "2940:22:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", "id": 9101, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2965:5:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "2940:30:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 9103, "nodeType": "ExpressionStatement", "src": "2940:30:26" }, { "expression": { "argumentTypes": null, "id": 9106, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9104, "name": "_TRADE_ALLOWED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9431, "src": "2980:15:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", "id": 9105, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2998:5:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "2980:23:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 9107, "nodeType": "ExpressionStatement", "src": "2980:23:26" }, { "assignments": [ 9109 ], "declarations": [ { "constant": false, "id": 9109, "mutability": "mutable", "name": "totalBaseCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9174, "src": "3013:24:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9108, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3013:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9112, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 9110, "name": "getTotalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9577, "src": "3040:19:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 9111, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3040:21:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3013:48:26" }, { "assignments": [ 9114 ], "declarations": [ { "constant": false, "id": 9114, "mutability": "mutable", "name": "totalQuoteCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9174, "src": "3071:25:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9113, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3071:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9117, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 9115, "name": "getTotalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9604, "src": "3099:20:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 9116, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3099:22:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3071:50:26" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9120, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9118, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "3136:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 9119, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "3154:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3136:45:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 9141, "nodeType": "Block", "src": "3378:70:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9139, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9137, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "3392:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 9138, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "3422:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3392:45:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9140, "nodeType": "ExpressionStatement", "src": "3392:45:26" } ] }, "id": 9142, "nodeType": "IfStatement", "src": "3132:316:26", "trueBody": { "id": 9136, "nodeType": "Block", "src": "3183:189:26", "statements": [ { "assignments": [ 9122 ], "declarations": [ { "constant": false, "id": 9122, "mutability": "mutable", "name": "spareQuote", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9136, "src": "3197:18:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9121, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3197:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9127, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9125, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "3238:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9123, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "3218:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9124, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "3218:19:26", "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": 9126, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3218:48:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3197:69:26" }, { "expression": { "argumentTypes": null, "id": 9134, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9128, "name": "_BASE_CAPITAL_RECEIVE_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9473, "src": "3280:28:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9131, "name": "spareQuote", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9122, "src": "3332:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 9132, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9109, "src": "3344:16:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9129, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11078, "src": "3311:11:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$", "typeString": "type(library DecimalMath)" } }, "id": 9130, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "divFloor", "nodeType": "MemberAccess", "referencedDeclaration": 11059, "src": "3311:20:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 9133, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3311:50:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3280:81:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9135, "nodeType": "ExpressionStatement", "src": "3280:81:26" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9145, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9143, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "3462:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 9144, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "3479:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3462:43:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 9166, "nodeType": "Block", "src": "3699:68:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9164, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9162, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "3713:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 9163, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "3742:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3713:43:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9165, "nodeType": "ExpressionStatement", "src": "3713:43:26" } ] }, "id": 9167, "nodeType": "IfStatement", "src": "3458:309:26", "trueBody": { "id": 9161, "nodeType": "Block", "src": "3507:186:26", "statements": [ { "assignments": [ 9147 ], "declarations": [ { "constant": false, "id": 9147, "mutability": "mutable", "name": "spareBase", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9161, "src": "3521:17:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9146, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3521:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9152, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9150, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "3560:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9148, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "3541:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9149, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "3541:18:26", "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": 9151, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3541:46:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3521:66:26" }, { "expression": { "argumentTypes": null, "id": 9159, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9153, "name": "_QUOTE_CAPITAL_RECEIVE_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9475, "src": "3601:28:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9156, "name": "spareBase", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9147, "src": "3653:9:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 9157, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9114, "src": "3664:17:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9154, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11078, "src": "3632:11:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$", "typeString": "type(library DecimalMath)" } }, "id": 9155, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "divFloor", "nodeType": "MemberAccess", "referencedDeclaration": 11059, "src": "3632:20:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 9158, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3632:50:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3601:81:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9160, "nodeType": "ExpressionStatement", "src": "3601:81:26" } ] } }, { "expression": { "argumentTypes": null, "id": 9172, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9168, "name": "_R_STATUS_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9459, "src": "3777:10:26", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9169, "name": "Types", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11631, "src": "3790:5:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Types_$11631_$", "typeString": "type(library Types)" } }, "id": 9170, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "RStatus", "nodeType": "MemberAccess", "referencedDeclaration": 11630, "src": "3790:13:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$", "typeString": "type(enum Types.RStatus)" } }, "id": 9171, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "ONE", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3790:17:26", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "src": "3777:30:26", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "id": 9173, "nodeType": "ExpressionStatement", "src": "3777:30:26" } ] }, "documentation": null, "functionSelector": "648a4fac", "id": 9175, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 9088, "modifierName": { "argumentTypes": null, "id": 9087, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11110, "src": "2844:9:26", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2844:9:26" }, { "arguments": null, "id": 9090, "modifierName": { "argumentTypes": null, "id": 9089, "name": "notClosed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9506, "src": "2854:9:26", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2854:9:26" } ], "name": "finalSettlement", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9086, "nodeType": "ParameterList", "parameters": [], "src": "2832:2:26" }, "returnParameters": { "id": 9091, "nodeType": "ParameterList", "parameters": [], "src": "2864:0:26" }, "scope": 9396, "src": "2808:1006:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 9329, "nodeType": "Block", "src": "3922:1343:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9181, "name": "_CLOSED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9425, "src": "3940:8:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "444f444f5f4e4f545f434c4f534544", "id": 9182, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3950:17:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_fdecdbea6b0a4c5263013d9193a4b5225e5c7851ff0e83a8bf5860fa4ea7f6f6", "typeString": "literal_string \"DODO_NOT_CLOSED\"" }, "value": "DODO_NOT_CLOSED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_fdecdbea6b0a4c5263013d9193a4b5225e5c7851ff0e83a8bf5860fa4ea7f6f6", "typeString": "literal_string \"DODO_NOT_CLOSED\"" } ], "id": 9180, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "3932:7:26", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 9183, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3932:36:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9184, "nodeType": "ExpressionStatement", "src": "3932:36:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9190, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "3986:22:26", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 9186, "name": "_CLAIMED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9479, "src": "3987:9:26", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, "id": 9189, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9187, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3997:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9188, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3997:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3987:21:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "414c52454144595f434c41494d4544", "id": 9191, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4010:17:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_fc7a4f08369e04191e5d601ef52230a181560bfbd7431497090a8eabc5119861", "typeString": "literal_string \"ALREADY_CLAIMED\"" }, "value": "ALREADY_CLAIMED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_fc7a4f08369e04191e5d601ef52230a181560bfbd7431497090a8eabc5119861", "typeString": "literal_string \"ALREADY_CLAIMED\"" } ], "id": 9185, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "3978:7:26", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 9192, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3978:50:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9193, "nodeType": "ExpressionStatement", "src": "3978:50:26" }, { "expression": { "argumentTypes": null, "id": 9199, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 9194, "name": "_CLAIMED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9479, "src": "4038:9:26", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, "id": 9197, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9195, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4048:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9196, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4048:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "4038:21:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 9198, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "4062:4:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "4038:28:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 9200, "nodeType": "ExpressionStatement", "src": "4038:28:26" }, { "assignments": [ 9202 ], "declarations": [ { "constant": false, "id": 9202, "mutability": "mutable", "name": "quoteCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9329, "src": "4077:20:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9201, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4077:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9207, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9204, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4125:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9205, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4125:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 9203, "name": "getQuoteCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9592, "src": "4100:24:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 9206, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4100:36:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4077:59:26" }, { "assignments": [ 9209 ], "declarations": [ { "constant": false, "id": 9209, "mutability": "mutable", "name": "baseCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9329, "src": "4146:19:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9208, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4146:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9214, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9211, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4192:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9212, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4192:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 9210, "name": "getBaseCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9565, "src": "4168:23:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 9213, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4168:35:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4146:57:26" }, { "assignments": [ 9216 ], "declarations": [ { "constant": false, "id": 9216, "mutability": "mutable", "name": "quoteAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9329, "src": "4214:19:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9215, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4214:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9218, "initialValue": { "argumentTypes": null, "hexValue": "30", "id": 9217, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4236:1:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "4214:23:26" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9221, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9219, "name": "quoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9202, "src": "4251:12:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 9220, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4266:1:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "4251:16:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 9234, "nodeType": "IfStatement", "src": "4247:134:26", "trueBody": { "id": 9233, "nodeType": "Block", "src": "4269:112:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9231, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9222, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9216, "src": "4283:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 9228, "name": "getTotalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9604, "src": "4347:20:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 9229, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4347:22:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9225, "name": "quoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9202, "src": "4329:12:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9223, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "4297:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9224, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "4297:31:26", "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": 9226, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4297:45:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9227, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "4297:49:26", "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": 9230, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4297:73:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4283:87:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9232, "nodeType": "ExpressionStatement", "src": "4283:87:26" } ] } }, { "assignments": [ 9236 ], "declarations": [ { "constant": false, "id": 9236, "mutability": "mutable", "name": "baseAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9329, "src": "4390:18:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9235, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4390:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9238, "initialValue": { "argumentTypes": null, "hexValue": "30", "id": 9237, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4411:1:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "4390:22:26" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9241, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9239, "name": "baseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9209, "src": "4426:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 9240, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4440:1:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "4426:15:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 9254, "nodeType": "IfStatement", "src": "4422:129:26", "trueBody": { "id": 9253, "nodeType": "Block", "src": "4443:108:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9251, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9242, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9236, "src": "4457:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 9248, "name": "getTotalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9577, "src": "4518:19:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 9249, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4518:21:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9245, "name": "baseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9209, "src": "4501:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9243, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "4470:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9244, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "4470:30:26", "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": 9246, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4470:43:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9247, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "4470:47:26", "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": 9250, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4470:70:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4457:83:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9252, "nodeType": "ExpressionStatement", "src": "4457:83:26" } ] } }, { "expression": { "argumentTypes": null, "id": 9260, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9255, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "4561:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9258, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9216, "src": "4623:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9256, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "4591:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9257, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "4591:31:26", "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": 9259, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4591:44:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4561:74:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9261, "nodeType": "ExpressionStatement", "src": "4561:74:26" }, { "expression": { "argumentTypes": null, "id": 9267, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9262, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "4645:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9265, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9236, "src": "4705:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9263, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "4674:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9264, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "4674:30:26", "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": 9266, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4674:42:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4645:71:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9268, "nodeType": "ExpressionStatement", "src": "4645:71:26" }, { "expression": { "argumentTypes": null, "id": 9278, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9269, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9216, "src": "4727:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9274, "name": "baseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9209, "src": "4773:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 9275, "name": "_BASE_CAPITAL_RECEIVE_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9473, "src": "4786:28:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9272, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11078, "src": "4757:11:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$", "typeString": "type(library DecimalMath)" } }, "id": 9273, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11023, "src": "4757:15:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 9276, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4757:58:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9270, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9216, "src": "4741:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9271, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "4741:15:26", "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": 9277, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4741:75:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4727:89:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9279, "nodeType": "ExpressionStatement", "src": "4727:89:26" }, { "expression": { "argumentTypes": null, "id": 9289, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9280, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9236, "src": "4826:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9285, "name": "quoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9202, "src": "4870:12:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 9286, "name": "_QUOTE_CAPITAL_RECEIVE_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9475, "src": "4884:28:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9283, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11078, "src": "4854:11:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$", "typeString": "type(library DecimalMath)" } }, "id": 9284, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11023, "src": "4854:15:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 9287, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4854:59:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9281, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9236, "src": "4839:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9282, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "4839:14:26", "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": 9288, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4839:75:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4826:88:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9290, "nodeType": "ExpressionStatement", "src": "4826:88:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9292, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4947:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9293, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4947:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9294, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9236, "src": "4959:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9291, "name": "_baseTokenTransferOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8990, "src": "4925:21:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 9295, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4925:45:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9296, "nodeType": "ExpressionStatement", "src": "4925:45:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9298, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5003:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9299, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5003:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9300, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9216, "src": "5015:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9297, "name": "_quoteTokenTransferOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9013, "src": "4980:22:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 9301, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4980:47:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9302, "nodeType": "ExpressionStatement", "src": "4980:47:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9307, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5078:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9308, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5078:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9309, "name": "baseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9209, "src": "5090:11:26", "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": 9304, "name": "_BASE_CAPITAL_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9469, "src": "5051:20:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 9303, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10536, "src": "5038:12:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODOLpToken_$10536_$", "typeString": "type(contract IDODOLpToken)" } }, "id": 9305, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5038:34:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODOLpToken_$10536", "typeString": "contract IDODOLpToken" } }, "id": 9306, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "burn", "nodeType": "MemberAccess", "referencedDeclaration": 10523, "src": "5038:39:26", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256) external" } }, "id": 9310, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5038:64:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9311, "nodeType": "ExpressionStatement", "src": "5038:64:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9316, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5153:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9317, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5153:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9318, "name": "quoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9202, "src": "5165:12:26", "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": 9313, "name": "_QUOTE_CAPITAL_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9471, "src": "5125:21:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 9312, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10536, "src": "5112:12:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODOLpToken_$10536_$", "typeString": "type(contract IDODOLpToken)" } }, "id": 9314, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5112:35:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODOLpToken_$10536", "typeString": "contract IDODOLpToken" } }, "id": 9315, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "burn", "nodeType": "MemberAccess", "referencedDeclaration": 10523, "src": "5112:40:26", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256) external" } }, "id": 9319, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5112:66:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9320, "nodeType": "ExpressionStatement", "src": "5112:66:26" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9322, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5206:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9323, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5206:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9324, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9236, "src": "5218:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 9325, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9216, "src": "5230:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9321, "name": "ClaimAssets", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8893, "src": "5194:11:26", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,uint256,uint256)" } }, "id": 9326, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5194:48:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9327, "nodeType": "EmitStatement", "src": "5189:53:26" }, { "expression": null, "functionReturnParameters": 9179, "id": 9328, "nodeType": "Return", "src": "5252:7:26" } ] }, "documentation": null, "functionSelector": "1f3c156e", "id": 9330, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 9178, "modifierName": { "argumentTypes": null, "id": 9177, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "3905:16:26", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3905:16:26" } ], "name": "claimAssets", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9176, "nodeType": "ParameterList", "parameters": [], "src": "3893:2:26" }, "returnParameters": { "id": 9179, "nodeType": "ParameterList", "parameters": [], "src": "3922:0:26" }, "scope": 9396, "src": "3873:1392:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 9394, "nodeType": "Block", "src": "5392:513:26", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 9341, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9339, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9332, "src": "5406:5:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 9340, "name": "_BASE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9447, "src": "5415:12:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "5406:21:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 9361, "nodeType": "IfStatement", "src": "5402:214:26", "trueBody": { "id": 9360, "nodeType": "Block", "src": "5429:187:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9356, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9349, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5507:4:26", "typeDescriptions": { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } ], "id": 9348, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5499:7:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 9347, "name": "address", "nodeType": "ElementaryTypeName", "src": "5499:7:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 9350, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5499:13:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9344, "name": "_BASE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9447, "src": "5475:12:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 9343, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "5468:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 9345, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5468:20:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 9346, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 10564, "src": "5468:30:26", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, "id": 9351, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5468:45:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9354, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9334, "src": "5536:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9352, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "5517:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9353, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "5517:18:26", "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": 9355, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5517:26:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5468:75:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "444f444f5f424153455f42414c414e43455f4e4f545f454e4f554748", "id": 9357, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5561:30:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_997068fbd59291c0e94aa73a95de3c076c00f04014e63bef27a7316bb88c0e69", "typeString": "literal_string \"DODO_BASE_BALANCE_NOT_ENOUGH\"" }, "value": "DODO_BASE_BALANCE_NOT_ENOUGH" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_997068fbd59291c0e94aa73a95de3c076c00f04014e63bef27a7316bb88c0e69", "typeString": "literal_string \"DODO_BASE_BALANCE_NOT_ENOUGH\"" } ], "id": 9342, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5443:7:26", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 9358, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5443:162:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9359, "nodeType": "ExpressionStatement", "src": "5443:162:26" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 9364, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9362, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9332, "src": "5629:5:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 9363, "name": "_QUOTE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9449, "src": "5638:13:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "5629:22:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 9384, "nodeType": "IfStatement", "src": "5625:218:26", "trueBody": { "id": 9383, "nodeType": "Block", "src": "5653:190:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9379, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9372, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5732:4:26", "typeDescriptions": { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } ], "id": 9371, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5724:7:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 9370, "name": "address", "nodeType": "ElementaryTypeName", "src": "5724:7:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 9373, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5724:13:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9367, "name": "_QUOTE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9449, "src": "5699:13:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 9366, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "5692:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 9368, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5692:21:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 9369, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 10564, "src": "5692:31:26", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, "id": 9374, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5692:46:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9377, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9334, "src": "5762:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9375, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "5742:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9376, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "5742:19:26", "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": 9378, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5742:27:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5692:77:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "444f444f5f51554f54455f42414c414e43455f4e4f545f454e4f554748", "id": 9380, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5787:31:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_01a080c50343e863e17230c1a9c9900101809eaf44c06794af82120907bb21f5", "typeString": "literal_string \"DODO_QUOTE_BALANCE_NOT_ENOUGH\"" }, "value": "DODO_QUOTE_BALANCE_NOT_ENOUGH" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_01a080c50343e863e17230c1a9c9900101809eaf44c06794af82120907bb21f5", "typeString": "literal_string \"DODO_QUOTE_BALANCE_NOT_ENOUGH\"" } ], "id": 9365, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5667:7:26", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 9381, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5667:165:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9382, "nodeType": "ExpressionStatement", "src": "5667:165:26" } ] } }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9389, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5879:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9390, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5879:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9391, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9334, "src": "5891:6:26", "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": 9386, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9332, "src": "5859:5:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 9385, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "5852:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 9387, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5852:13:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 9388, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 11329, "src": "5852:26:26", "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": 9392, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5852:46:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9393, "nodeType": "ExpressionStatement", "src": "5852:46:26" } ] }, "documentation": null, "functionSelector": "c3a2a665", "id": 9395, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 9337, "modifierName": { "argumentTypes": null, "id": 9336, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11110, "src": "5382:9:26", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "5382:9:26" } ], "name": "retrieve", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9335, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9332, "mutability": "mutable", "name": "token", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9395, "src": "5342:13:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 9331, "name": "address", "nodeType": "ElementaryTypeName", "src": "5342:7:26", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 9334, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9395, "src": "5357:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9333, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5357:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5341:31:26" }, "returnParameters": { "id": 9338, "nodeType": "ParameterList", "parameters": [], "src": "5392:0:26" }, "scope": 9396, "src": "5324:581:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 9397, "src": "560:5347:26" } ], "src": "78:5830:26" }, "legacyAST": { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Settlement.sol", "exportedSymbols": { "Settlement": [ 9396 ] }, "id": 9397, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 8855, "literals": [ "solidity", "0.6", ".9" ], "nodeType": "PragmaDirective", "src": "78:22:26" }, { "id": 8856, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "101:33:26" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol", "file": "../lib/SafeMath.sol", "id": 8858, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 11624, "src": "136:45:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8857, "name": "SafeMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "144:8:26", "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": 8860, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 11441, "src": "182:47:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8859, "name": "SafeERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "190:9:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/DecimalMath.sol", "file": "../lib/DecimalMath.sol", "id": 8862, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 11079, "src": "230:51:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8861, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "238:11:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/Types.sol", "file": "../lib/Types.sol", "id": 8864, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 11632, "src": "282:39:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8863, "name": "Types", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "290:5:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IDODOLpToken.sol", "file": "../intf/IDODOLpToken.sol", "id": 8866, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 10537, "src": "322:54:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8865, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "330:12:26", "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": 8868, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 10608, "src": "377:42:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8867, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "385:6:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Storage.sol", "file": "./Storage.sol", "id": 8870, "nodeType": "ImportDirective", "scope": 9397, "sourceUnit": 9614, "src": "420:38:26", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 8869, "name": "Storage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "428:7:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 8872, "name": "Storage", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 9613, "src": "583:7:26", "typeDescriptions": { "typeIdentifier": "t_contract$_Storage_$9613", "typeString": "contract Storage" } }, "id": 8873, "nodeType": "InheritanceSpecifier", "src": "583:7:26" } ], "contractDependencies": [ 9613, 11166, 11296 ], "contractKind": "contract", "documentation": { "id": 8871, "nodeType": "StructuredDocumentation", "src": "461:98:26", "text": " @title Settlement\n @author DODO Breeder\n @notice Functions for assets settlement" }, "fullyImplemented": true, "id": 9396, "linearizedBaseContracts": [ 9396, 9613, 11296, 11166 ], "name": "Settlement", "nodeType": "ContractDefinition", "nodes": [ { "id": 8876, "libraryName": { "contractScope": null, "id": 8874, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 11623, "src": "603:8:26", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$11623", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "597:27:26", "typeName": { "id": 8875, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "616:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "id": 8879, "libraryName": { "contractScope": null, "id": 8877, "name": "SafeERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 11440, "src": "635:9:26", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeERC20_$11440", "typeString": "library SafeERC20" } }, "nodeType": "UsingForDirective", "src": "629:27:26", "typeName": { "contractScope": null, "id": 8878, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 10607, "src": "649:6:26", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } } }, { "anonymous": false, "documentation": null, "id": 8885, "name": "Donate", "nodeType": "EventDefinition", "parameters": { "id": 8884, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8881, "indexed": false, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8885, "src": "716:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8880, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "716:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8883, "indexed": false, "mutability": "mutable", "name": "isBaseToken", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8885, "src": "732:16:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 8882, "name": "bool", "nodeType": "ElementaryTypeName", "src": "732:4:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "715:34:26" }, "src": "703:47:26" }, { "anonymous": false, "documentation": null, "id": 8893, "name": "ClaimAssets", "nodeType": "EventDefinition", "parameters": { "id": 8892, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8887, "indexed": true, "mutability": "mutable", "name": "user", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8893, "src": "774:20:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8886, "name": "address", "nodeType": "ElementaryTypeName", "src": "774:7:26", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8889, "indexed": false, "mutability": "mutable", "name": "baseTokenAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8893, "src": "796:23:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8888, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "796:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8891, "indexed": false, "mutability": "mutable", "name": "quoteTokenAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8893, "src": "821:24:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8890, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "821:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "773:73:26" }, "src": "756:91:26" }, { "body": { "id": 8929, "nodeType": "Block", "src": "980:236:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8906, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8903, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8897, "src": "1017:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8901, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "998:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8902, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "998:18:26", "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": 8904, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "998:26:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 8905, "name": "_BASE_BALANCE_LIMIT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9439, "src": "1028:20:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "998:50:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "424153455f42414c414e43455f4c494d49545f4558434545444544", "id": 8907, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1050:29:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_73112b7b3e7782e99b674721f6033538d0f440b164e0f7d64c222cd9d5354cac", "typeString": "literal_string \"BASE_BALANCE_LIMIT_EXCEEDED\"" }, "value": "BASE_BALANCE_LIMIT_EXCEEDED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_73112b7b3e7782e99b674721f6033538d0f440b164e0f7d64c222cd9d5354cac", "typeString": "literal_string \"BASE_BALANCE_LIMIT_EXCEEDED\"" } ], "id": 8900, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "990:7:26", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 8908, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "990:90:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8909, "nodeType": "ExpressionStatement", "src": "990:90:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8914, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8895, "src": "1128:4:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8917, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1142:4:26", "typeDescriptions": { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } ], "id": 8916, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1134:7:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 8915, "name": "address", "nodeType": "ElementaryTypeName", "src": "1134:7:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 8918, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1134:13:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8919, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8897, "src": "1149:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8911, "name": "_BASE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9447, "src": "1097:12:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8910, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1090:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 8912, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1090:20:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 8913, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 11354, "src": "1090:37:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$10607_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$10607_$", "typeString": "function (contract IERC20,address,address,uint256)" } }, "id": 8920, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1090:66:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8921, "nodeType": "ExpressionStatement", "src": "1090:66:26" }, { "expression": { "argumentTypes": null, "id": 8927, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 8922, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "1166:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8925, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8897, "src": "1202:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8923, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "1183:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8924, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "1183:18:26", "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": 8926, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1183:26:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1166:43:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8928, "nodeType": "ExpressionStatement", "src": "1166:43:26" } ] }, "documentation": null, "id": 8930, "implemented": true, "kind": "function", "modifiers": [], "name": "_baseTokenTransferIn", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8898, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8895, "mutability": "mutable", "name": "from", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8930, "src": "941:12:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8894, "name": "address", "nodeType": "ElementaryTypeName", "src": "941:7:26", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8897, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8930, "src": "955:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8896, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "955:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "940:30:26" }, "returnParameters": { "id": 8899, "nodeType": "ParameterList", "parameters": [], "src": "980:0:26" }, "scope": 9396, "src": "911:305:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 8966, "nodeType": "Block", "src": "1292:276:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8943, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8940, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8934, "src": "1343:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8938, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "1323:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8939, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "1323:19:26", "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": 8941, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1323:27:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 8942, "name": "_QUOTE_BALANCE_LIMIT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9441, "src": "1354:21:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1323:52:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "51554f54455f42414c414e43455f4c494d49545f4558434545444544", "id": 8944, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1389:30:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_46871c05d43b94497f8d7f8fa48b2494d3e639610f744f02bdfb7bde16628eb4", "typeString": "literal_string \"QUOTE_BALANCE_LIMIT_EXCEEDED\"" }, "value": "QUOTE_BALANCE_LIMIT_EXCEEDED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_46871c05d43b94497f8d7f8fa48b2494d3e639610f744f02bdfb7bde16628eb4", "typeString": "literal_string \"QUOTE_BALANCE_LIMIT_EXCEEDED\"" } ], "id": 8937, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1302:7:26", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 8945, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1302:127:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8946, "nodeType": "ExpressionStatement", "src": "1302:127:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8951, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8932, "src": "1478:4:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8954, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1492:4:26", "typeDescriptions": { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } ], "id": 8953, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1484:7:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 8952, "name": "address", "nodeType": "ElementaryTypeName", "src": "1484:7:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 8955, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1484:13:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8956, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8934, "src": "1499:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8948, "name": "_QUOTE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9449, "src": "1446:13:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8947, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1439:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 8949, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1439:21:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 8950, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 11354, "src": "1439:38:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$10607_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$10607_$", "typeString": "function (contract IERC20,address,address,uint256)" } }, "id": 8957, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1439:67:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8958, "nodeType": "ExpressionStatement", "src": "1439:67:26" }, { "expression": { "argumentTypes": null, "id": 8964, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 8959, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "1516:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8962, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8934, "src": "1554:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8960, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "1534:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8961, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "1534:19:26", "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": 8963, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1534:27:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1516:45:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8965, "nodeType": "ExpressionStatement", "src": "1516:45:26" } ] }, "documentation": null, "id": 8967, "implemented": true, "kind": "function", "modifiers": [], "name": "_quoteTokenTransferIn", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8935, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8932, "mutability": "mutable", "name": "from", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8967, "src": "1253:12:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8931, "name": "address", "nodeType": "ElementaryTypeName", "src": "1253:7:26", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8934, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8967, "src": "1267:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8933, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1267:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1252:30:26" }, "returnParameters": { "id": 8936, "nodeType": "ParameterList", "parameters": [], "src": "1292:0:26" }, "scope": 9396, "src": "1222:346:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 8989, "nodeType": "Block", "src": "1642:115:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8978, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8969, "src": "1686:2:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8979, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8971, "src": "1690:6:26", "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": 8975, "name": "_BASE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9447, "src": "1659:12:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8974, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1652:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 8976, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1652:20:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 8977, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 11329, "src": "1652:33:26", "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": 8980, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1652:45:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8981, "nodeType": "ExpressionStatement", "src": "1652:45:26" }, { "expression": { "argumentTypes": null, "id": 8987, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 8982, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "1707:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8985, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8971, "src": "1743:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8983, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "1724:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8984, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "1724:18:26", "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": 8986, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1724:26:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1707:43:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8988, "nodeType": "ExpressionStatement", "src": "1707:43:26" } ] }, "documentation": null, "id": 8990, "implemented": true, "kind": "function", "modifiers": [], "name": "_baseTokenTransferOut", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8972, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8969, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8990, "src": "1605:10:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8968, "name": "address", "nodeType": "ElementaryTypeName", "src": "1605:7:26", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8971, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8990, "src": "1617:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8970, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1617:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1604:28:26" }, "returnParameters": { "id": 8973, "nodeType": "ParameterList", "parameters": [], "src": "1642:0:26" }, "scope": 9396, "src": "1574:183:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 9012, "nodeType": "Block", "src": "1832:118:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9001, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8992, "src": "1877:2:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 9002, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8994, "src": "1881:6:26", "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": 8998, "name": "_QUOTE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9449, "src": "1849:13:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8997, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "1842:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 8999, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1842:21:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 9000, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 11329, "src": "1842:34:26", "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": 9003, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1842:46:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9004, "nodeType": "ExpressionStatement", "src": "1842:46:26" }, { "expression": { "argumentTypes": null, "id": 9010, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9005, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "1898:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9008, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8994, "src": "1936:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9006, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "1916:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9007, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "1916:19:26", "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": 9009, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1916:27:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1898:45:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9011, "nodeType": "ExpressionStatement", "src": "1898:45:26" } ] }, "documentation": null, "id": 9013, "implemented": true, "kind": "function", "modifiers": [], "name": "_quoteTokenTransferOut", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8995, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8992, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9013, "src": "1795:10:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8991, "name": "address", "nodeType": "ElementaryTypeName", "src": "1795:7:26", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8994, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9013, "src": "1807:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8993, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1807:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1794:28:26" }, "returnParameters": { "id": 8996, "nodeType": "ParameterList", "parameters": [], "src": "1832:0:26" }, "scope": 9396, "src": "1763:187:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 9030, "nodeType": "Block", "src": "2076:119:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9023, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9018, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "2086:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9021, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9015, "src": "2146:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9019, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "2115:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9020, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "2115:30:26", "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": 9022, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2115:38:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2086:67:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9024, "nodeType": "ExpressionStatement", "src": "2086:67:26" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9026, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9015, "src": "2175:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "hexValue": "74727565", "id": 9027, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2183:4:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 9025, "name": "Donate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8885, "src": "2168:6:26", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_bool_$returns$__$", "typeString": "function (uint256,bool)" } }, "id": 9028, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2168:20:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9029, "nodeType": "EmitStatement", "src": "2163:25:26" } ] }, "documentation": null, "id": 9031, "implemented": true, "kind": "function", "modifiers": [], "name": "_donateBaseToken", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9016, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9015, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9031, "src": "2051:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9014, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2051:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2050:16:26" }, "returnParameters": { "id": 9017, "nodeType": "ParameterList", "parameters": [], "src": "2076:0:26" }, "scope": 9396, "src": "2025:170:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 9048, "nodeType": "Block", "src": "2253:122:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9041, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9036, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "2263:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9039, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9033, "src": "2325:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9037, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "2293:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9038, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "2293:31:26", "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": 9040, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2293:39:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2263:69:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9042, "nodeType": "ExpressionStatement", "src": "2263:69:26" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9044, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9033, "src": "2354:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "hexValue": "66616c7365", "id": 9045, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2362:5:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 9043, "name": "Donate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8885, "src": "2347:6:26", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_bool_$returns$__$", "typeString": "function (uint256,bool)" } }, "id": 9046, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2347:21:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9047, "nodeType": "EmitStatement", "src": "2342:26:26" } ] }, "documentation": null, "id": 9049, "implemented": true, "kind": "function", "modifiers": [], "name": "_donateQuoteToken", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9034, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9033, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9049, "src": "2228:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9032, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2228:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2227:16:26" }, "returnParameters": { "id": 9035, "nodeType": "ParameterList", "parameters": [], "src": "2253:0:26" }, "scope": 9396, "src": "2201:174:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 9066, "nodeType": "Block", "src": "2448:91:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9057, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2479:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9058, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2479:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9059, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9051, "src": "2491:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9056, "name": "_baseTokenTransferIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8930, "src": "2458:20:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 9060, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2458:40:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9061, "nodeType": "ExpressionStatement", "src": "2458:40:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9063, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9051, "src": "2525:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9062, "name": "_donateBaseToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9031, "src": "2508:16:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 9064, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2508:24:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9065, "nodeType": "ExpressionStatement", "src": "2508:24:26" } ] }, "documentation": null, "functionSelector": "ed0aa428", "id": 9067, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 9054, "modifierName": { "argumentTypes": null, "id": 9053, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "2431:16:26", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2431:16:26" } ], "name": "donateBaseToken", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9052, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9051, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9067, "src": "2406:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9050, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2406:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2405:16:26" }, "returnParameters": { "id": 9055, "nodeType": "ParameterList", "parameters": [], "src": "2448:0:26" }, "scope": 9396, "src": "2381:158:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 9084, "nodeType": "Block", "src": "2613:93:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9075, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2645:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9076, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2645:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9077, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9069, "src": "2657:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9074, "name": "_quoteTokenTransferIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8967, "src": "2623:21:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 9078, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2623:41:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9079, "nodeType": "ExpressionStatement", "src": "2623:41:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9081, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9069, "src": "2692:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9080, "name": "_donateQuoteToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9049, "src": "2674:17:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 9082, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2674:25:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9083, "nodeType": "ExpressionStatement", "src": "2674:25:26" } ] }, "documentation": null, "functionSelector": "387b0c11", "id": 9085, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 9072, "modifierName": { "argumentTypes": null, "id": 9071, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "2596:16:26", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2596:16:26" } ], "name": "donateQuoteToken", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9070, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9069, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9085, "src": "2571:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9068, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2571:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2570:16:26" }, "returnParameters": { "id": 9073, "nodeType": "ParameterList", "parameters": [], "src": "2613:0:26" }, "scope": 9396, "src": "2545:161:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 9174, "nodeType": "Block", "src": "2864:950:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9094, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9092, "name": "_CLOSED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9425, "src": "2874:8:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 9093, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2885:4:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "2874:15:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 9095, "nodeType": "ExpressionStatement", "src": "2874:15:26" }, { "expression": { "argumentTypes": null, "id": 9098, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9096, "name": "_DEPOSIT_QUOTE_ALLOWED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9427, "src": "2899:23:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", "id": 9097, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2925:5:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "2899:31:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 9099, "nodeType": "ExpressionStatement", "src": "2899:31:26" }, { "expression": { "argumentTypes": null, "id": 9102, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9100, "name": "_DEPOSIT_BASE_ALLOWED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9429, "src": "2940:22:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", "id": 9101, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2965:5:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "2940:30:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 9103, "nodeType": "ExpressionStatement", "src": "2940:30:26" }, { "expression": { "argumentTypes": null, "id": 9106, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9104, "name": "_TRADE_ALLOWED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9431, "src": "2980:15:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", "id": 9105, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2998:5:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "2980:23:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 9107, "nodeType": "ExpressionStatement", "src": "2980:23:26" }, { "assignments": [ 9109 ], "declarations": [ { "constant": false, "id": 9109, "mutability": "mutable", "name": "totalBaseCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9174, "src": "3013:24:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9108, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3013:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9112, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 9110, "name": "getTotalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9577, "src": "3040:19:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 9111, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3040:21:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3013:48:26" }, { "assignments": [ 9114 ], "declarations": [ { "constant": false, "id": 9114, "mutability": "mutable", "name": "totalQuoteCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9174, "src": "3071:25:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9113, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3071:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9117, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 9115, "name": "getTotalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9604, "src": "3099:20:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 9116, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3099:22:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3071:50:26" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9120, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9118, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "3136:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 9119, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "3154:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3136:45:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 9141, "nodeType": "Block", "src": "3378:70:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9139, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9137, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "3392:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 9138, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "3422:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3392:45:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9140, "nodeType": "ExpressionStatement", "src": "3392:45:26" } ] }, "id": 9142, "nodeType": "IfStatement", "src": "3132:316:26", "trueBody": { "id": 9136, "nodeType": "Block", "src": "3183:189:26", "statements": [ { "assignments": [ 9122 ], "declarations": [ { "constant": false, "id": 9122, "mutability": "mutable", "name": "spareQuote", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9136, "src": "3197:18:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9121, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3197:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9127, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9125, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "3238:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9123, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "3218:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9124, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "3218:19:26", "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": 9126, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3218:48:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3197:69:26" }, { "expression": { "argumentTypes": null, "id": 9134, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9128, "name": "_BASE_CAPITAL_RECEIVE_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9473, "src": "3280:28:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9131, "name": "spareQuote", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9122, "src": "3332:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 9132, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9109, "src": "3344:16:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9129, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11078, "src": "3311:11:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$", "typeString": "type(library DecimalMath)" } }, "id": 9130, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "divFloor", "nodeType": "MemberAccess", "referencedDeclaration": 11059, "src": "3311:20:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 9133, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3311:50:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3280:81:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9135, "nodeType": "ExpressionStatement", "src": "3280:81:26" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9145, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9143, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "3462:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 9144, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "3479:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3462:43:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 9166, "nodeType": "Block", "src": "3699:68:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9164, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9162, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "3713:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 9163, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "3742:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3713:43:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9165, "nodeType": "ExpressionStatement", "src": "3713:43:26" } ] }, "id": 9167, "nodeType": "IfStatement", "src": "3458:309:26", "trueBody": { "id": 9161, "nodeType": "Block", "src": "3507:186:26", "statements": [ { "assignments": [ 9147 ], "declarations": [ { "constant": false, "id": 9147, "mutability": "mutable", "name": "spareBase", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9161, "src": "3521:17:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9146, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3521:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9152, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9150, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "3560:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9148, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "3541:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9149, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "3541:18:26", "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": 9151, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3541:46:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3521:66:26" }, { "expression": { "argumentTypes": null, "id": 9159, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9153, "name": "_QUOTE_CAPITAL_RECEIVE_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9475, "src": "3601:28:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9156, "name": "spareBase", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9147, "src": "3653:9:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 9157, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9114, "src": "3664:17:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9154, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11078, "src": "3632:11:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$", "typeString": "type(library DecimalMath)" } }, "id": 9155, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "divFloor", "nodeType": "MemberAccess", "referencedDeclaration": 11059, "src": "3632:20:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 9158, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3632:50:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3601:81:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9160, "nodeType": "ExpressionStatement", "src": "3601:81:26" } ] } }, { "expression": { "argumentTypes": null, "id": 9172, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9168, "name": "_R_STATUS_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9459, "src": "3777:10:26", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9169, "name": "Types", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11631, "src": "3790:5:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Types_$11631_$", "typeString": "type(library Types)" } }, "id": 9170, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "RStatus", "nodeType": "MemberAccess", "referencedDeclaration": 11630, "src": "3790:13:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$", "typeString": "type(enum Types.RStatus)" } }, "id": 9171, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "ONE", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3790:17:26", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "src": "3777:30:26", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "id": 9173, "nodeType": "ExpressionStatement", "src": "3777:30:26" } ] }, "documentation": null, "functionSelector": "648a4fac", "id": 9175, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 9088, "modifierName": { "argumentTypes": null, "id": 9087, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11110, "src": "2844:9:26", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2844:9:26" }, { "arguments": null, "id": 9090, "modifierName": { "argumentTypes": null, "id": 9089, "name": "notClosed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9506, "src": "2854:9:26", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2854:9:26" } ], "name": "finalSettlement", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9086, "nodeType": "ParameterList", "parameters": [], "src": "2832:2:26" }, "returnParameters": { "id": 9091, "nodeType": "ParameterList", "parameters": [], "src": "2864:0:26" }, "scope": 9396, "src": "2808:1006:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 9329, "nodeType": "Block", "src": "3922:1343:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9181, "name": "_CLOSED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9425, "src": "3940:8:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "444f444f5f4e4f545f434c4f534544", "id": 9182, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3950:17:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_fdecdbea6b0a4c5263013d9193a4b5225e5c7851ff0e83a8bf5860fa4ea7f6f6", "typeString": "literal_string \"DODO_NOT_CLOSED\"" }, "value": "DODO_NOT_CLOSED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_fdecdbea6b0a4c5263013d9193a4b5225e5c7851ff0e83a8bf5860fa4ea7f6f6", "typeString": "literal_string \"DODO_NOT_CLOSED\"" } ], "id": 9180, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "3932:7:26", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 9183, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3932:36:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9184, "nodeType": "ExpressionStatement", "src": "3932:36:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9190, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "3986:22:26", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 9186, "name": "_CLAIMED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9479, "src": "3987:9:26", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, "id": 9189, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9187, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3997:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9188, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3997:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3987:21:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "414c52454144595f434c41494d4544", "id": 9191, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4010:17:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_fc7a4f08369e04191e5d601ef52230a181560bfbd7431497090a8eabc5119861", "typeString": "literal_string \"ALREADY_CLAIMED\"" }, "value": "ALREADY_CLAIMED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_fc7a4f08369e04191e5d601ef52230a181560bfbd7431497090a8eabc5119861", "typeString": "literal_string \"ALREADY_CLAIMED\"" } ], "id": 9185, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "3978:7:26", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 9192, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3978:50:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9193, "nodeType": "ExpressionStatement", "src": "3978:50:26" }, { "expression": { "argumentTypes": null, "id": 9199, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 9194, "name": "_CLAIMED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9479, "src": "4038:9:26", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, "id": 9197, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9195, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4048:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9196, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4048:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "4038:21:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 9198, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "4062:4:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "4038:28:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 9200, "nodeType": "ExpressionStatement", "src": "4038:28:26" }, { "assignments": [ 9202 ], "declarations": [ { "constant": false, "id": 9202, "mutability": "mutable", "name": "quoteCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9329, "src": "4077:20:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9201, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4077:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9207, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9204, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4125:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9205, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4125:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 9203, "name": "getQuoteCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9592, "src": "4100:24:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 9206, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4100:36:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4077:59:26" }, { "assignments": [ 9209 ], "declarations": [ { "constant": false, "id": 9209, "mutability": "mutable", "name": "baseCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9329, "src": "4146:19:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9208, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4146:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9214, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9211, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4192:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9212, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4192:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 9210, "name": "getBaseCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9565, "src": "4168:23:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 9213, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4168:35:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4146:57:26" }, { "assignments": [ 9216 ], "declarations": [ { "constant": false, "id": 9216, "mutability": "mutable", "name": "quoteAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9329, "src": "4214:19:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9215, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4214:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9218, "initialValue": { "argumentTypes": null, "hexValue": "30", "id": 9217, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4236:1:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "4214:23:26" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9221, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9219, "name": "quoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9202, "src": "4251:12:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 9220, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4266:1:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "4251:16:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 9234, "nodeType": "IfStatement", "src": "4247:134:26", "trueBody": { "id": 9233, "nodeType": "Block", "src": "4269:112:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9231, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9222, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9216, "src": "4283:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 9228, "name": "getTotalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9604, "src": "4347:20:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 9229, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4347:22:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9225, "name": "quoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9202, "src": "4329:12:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9223, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "4297:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9224, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "4297:31:26", "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": 9226, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4297:45:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9227, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "4297:49:26", "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": 9230, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4297:73:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4283:87:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9232, "nodeType": "ExpressionStatement", "src": "4283:87:26" } ] } }, { "assignments": [ 9236 ], "declarations": [ { "constant": false, "id": 9236, "mutability": "mutable", "name": "baseAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9329, "src": "4390:18:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9235, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4390:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 9238, "initialValue": { "argumentTypes": null, "hexValue": "30", "id": 9237, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4411:1:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "4390:22:26" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9241, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9239, "name": "baseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9209, "src": "4426:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 9240, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4440:1:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "4426:15:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 9254, "nodeType": "IfStatement", "src": "4422:129:26", "trueBody": { "id": 9253, "nodeType": "Block", "src": "4443:108:26", "statements": [ { "expression": { "argumentTypes": null, "id": 9251, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9242, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9236, "src": "4457:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 9248, "name": "getTotalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9577, "src": "4518:19:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 9249, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4518:21:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9245, "name": "baseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9209, "src": "4501:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9243, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "4470:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9244, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "4470:30:26", "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": 9246, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4470:43:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9247, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "4470:47:26", "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": 9250, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4470:70:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4457:83:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9252, "nodeType": "ExpressionStatement", "src": "4457:83:26" } ] } }, { "expression": { "argumentTypes": null, "id": 9260, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9255, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "4561:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9258, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9216, "src": "4623:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9256, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "4591:27:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9257, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "4591:31:26", "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": 9259, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4591:44:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4561:74:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9261, "nodeType": "ExpressionStatement", "src": "4561:74:26" }, { "expression": { "argumentTypes": null, "id": 9267, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9262, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "4645:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9265, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9236, "src": "4705:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9263, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "4674:26:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9264, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "4674:30:26", "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": 9266, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4674:42:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4645:71:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9268, "nodeType": "ExpressionStatement", "src": "4645:71:26" }, { "expression": { "argumentTypes": null, "id": 9278, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9269, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9216, "src": "4727:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9274, "name": "baseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9209, "src": "4773:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 9275, "name": "_BASE_CAPITAL_RECEIVE_QUOTE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9473, "src": "4786:28:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9272, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11078, "src": "4757:11:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$", "typeString": "type(library DecimalMath)" } }, "id": 9273, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11023, "src": "4757:15:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 9276, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4757:58:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9270, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9216, "src": "4741:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9271, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "4741:15:26", "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": 9277, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4741:75:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4727:89:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9279, "nodeType": "ExpressionStatement", "src": "4727:89:26" }, { "expression": { "argumentTypes": null, "id": 9289, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9280, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9236, "src": "4826:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9285, "name": "quoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9202, "src": "4870:12:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 9286, "name": "_QUOTE_CAPITAL_RECEIVE_BASE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9475, "src": "4884:28:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9283, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11078, "src": "4854:11:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$", "typeString": "type(library DecimalMath)" } }, "id": 9284, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11023, "src": "4854:15:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 9287, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4854:59:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9281, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9236, "src": "4839:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9282, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "4839:14:26", "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": 9288, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4839:75:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4826:88:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9290, "nodeType": "ExpressionStatement", "src": "4826:88:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9292, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4947:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9293, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4947:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9294, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9236, "src": "4959:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9291, "name": "_baseTokenTransferOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8990, "src": "4925:21:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 9295, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4925:45:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9296, "nodeType": "ExpressionStatement", "src": "4925:45:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9298, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5003:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9299, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5003:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9300, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9216, "src": "5015:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9297, "name": "_quoteTokenTransferOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9013, "src": "4980:22:26", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 9301, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4980:47:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9302, "nodeType": "ExpressionStatement", "src": "4980:47:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9307, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5078:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9308, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5078:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9309, "name": "baseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9209, "src": "5090:11:26", "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": 9304, "name": "_BASE_CAPITAL_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9469, "src": "5051:20:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 9303, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10536, "src": "5038:12:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODOLpToken_$10536_$", "typeString": "type(contract IDODOLpToken)" } }, "id": 9305, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5038:34:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODOLpToken_$10536", "typeString": "contract IDODOLpToken" } }, "id": 9306, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "burn", "nodeType": "MemberAccess", "referencedDeclaration": 10523, "src": "5038:39:26", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256) external" } }, "id": 9310, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5038:64:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9311, "nodeType": "ExpressionStatement", "src": "5038:64:26" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9316, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5153:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9317, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5153:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9318, "name": "quoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9202, "src": "5165:12:26", "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": 9313, "name": "_QUOTE_CAPITAL_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9471, "src": "5125:21:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 9312, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10536, "src": "5112:12:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODOLpToken_$10536_$", "typeString": "type(contract IDODOLpToken)" } }, "id": 9314, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5112:35:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODOLpToken_$10536", "typeString": "contract IDODOLpToken" } }, "id": 9315, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "burn", "nodeType": "MemberAccess", "referencedDeclaration": 10523, "src": "5112:40:26", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256) external" } }, "id": 9319, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5112:66:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9320, "nodeType": "ExpressionStatement", "src": "5112:66:26" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9322, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5206:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9323, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5206:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9324, "name": "baseAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9236, "src": "5218:10:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 9325, "name": "quoteAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9216, "src": "5230:11:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 9321, "name": "ClaimAssets", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8893, "src": "5194:11:26", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,uint256,uint256)" } }, "id": 9326, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5194:48:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9327, "nodeType": "EmitStatement", "src": "5189:53:26" }, { "expression": null, "functionReturnParameters": 9179, "id": 9328, "nodeType": "Return", "src": "5252:7:26" } ] }, "documentation": null, "functionSelector": "1f3c156e", "id": 9330, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 9178, "modifierName": { "argumentTypes": null, "id": 9177, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "3905:16:26", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3905:16:26" } ], "name": "claimAssets", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9176, "nodeType": "ParameterList", "parameters": [], "src": "3893:2:26" }, "returnParameters": { "id": 9179, "nodeType": "ParameterList", "parameters": [], "src": "3922:0:26" }, "scope": 9396, "src": "3873:1392:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 9394, "nodeType": "Block", "src": "5392:513:26", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 9341, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9339, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9332, "src": "5406:5:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 9340, "name": "_BASE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9447, "src": "5415:12:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "5406:21:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 9361, "nodeType": "IfStatement", "src": "5402:214:26", "trueBody": { "id": 9360, "nodeType": "Block", "src": "5429:187:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9356, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9349, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5507:4:26", "typeDescriptions": { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } ], "id": 9348, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5499:7:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 9347, "name": "address", "nodeType": "ElementaryTypeName", "src": "5499:7:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 9350, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5499:13:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9344, "name": "_BASE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9447, "src": "5475:12:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 9343, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "5468:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 9345, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5468:20:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 9346, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 10564, "src": "5468:30:26", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, "id": 9351, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5468:45:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9354, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9334, "src": "5536:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9352, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "5517:14:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9353, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "5517:18:26", "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": 9355, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5517:26:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5468:75:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "444f444f5f424153455f42414c414e43455f4e4f545f454e4f554748", "id": 9357, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5561:30:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_997068fbd59291c0e94aa73a95de3c076c00f04014e63bef27a7316bb88c0e69", "typeString": "literal_string \"DODO_BASE_BALANCE_NOT_ENOUGH\"" }, "value": "DODO_BASE_BALANCE_NOT_ENOUGH" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_997068fbd59291c0e94aa73a95de3c076c00f04014e63bef27a7316bb88c0e69", "typeString": "literal_string \"DODO_BASE_BALANCE_NOT_ENOUGH\"" } ], "id": 9342, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5443:7:26", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 9358, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5443:162:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9359, "nodeType": "ExpressionStatement", "src": "5443:162:26" } ] } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 9364, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9362, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9332, "src": "5629:5:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 9363, "name": "_QUOTE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9449, "src": "5638:13:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "5629:22:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 9384, "nodeType": "IfStatement", "src": "5625:218:26", "trueBody": { "id": 9383, "nodeType": "Block", "src": "5653:190:26", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9379, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9372, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5732:4:26", "typeDescriptions": { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } ], "id": 9371, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5724:7:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 9370, "name": "address", "nodeType": "ElementaryTypeName", "src": "5724:7:26", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 9373, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5724:13:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9367, "name": "_QUOTE_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9449, "src": "5699:13:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 9366, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "5692:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 9368, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5692:21:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 9369, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 10564, "src": "5692:31:26", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, "id": 9374, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5692:46:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9377, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9334, "src": "5762:6:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9375, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "5742:15:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9376, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "5742:19:26", "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": 9378, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5742:27:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5692:77:26", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "444f444f5f51554f54455f42414c414e43455f4e4f545f454e4f554748", "id": 9380, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5787:31:26", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_01a080c50343e863e17230c1a9c9900101809eaf44c06794af82120907bb21f5", "typeString": "literal_string \"DODO_QUOTE_BALANCE_NOT_ENOUGH\"" }, "value": "DODO_QUOTE_BALANCE_NOT_ENOUGH" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_01a080c50343e863e17230c1a9c9900101809eaf44c06794af82120907bb21f5", "typeString": "literal_string \"DODO_QUOTE_BALANCE_NOT_ENOUGH\"" } ], "id": 9365, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5667:7:26", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 9381, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5667:165:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9382, "nodeType": "ExpressionStatement", "src": "5667:165:26" } ] } }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9389, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5879:3:26", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9390, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5879:10:26", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 9391, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9334, "src": "5891:6:26", "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": 9386, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9332, "src": "5859:5:26", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 9385, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10607, "src": "5852:6:26", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$", "typeString": "type(contract IERC20)" } }, "id": 9387, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5852:13:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$10607", "typeString": "contract IERC20" } }, "id": 9388, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 11329, "src": "5852:26:26", "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": 9392, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5852:46:26", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9393, "nodeType": "ExpressionStatement", "src": "5852:46:26" } ] }, "documentation": null, "functionSelector": "c3a2a665", "id": 9395, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 9337, "modifierName": { "argumentTypes": null, "id": 9336, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11110, "src": "5382:9:26", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "5382:9:26" } ], "name": "retrieve", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 9335, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9332, "mutability": "mutable", "name": "token", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9395, "src": "5342:13:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 9331, "name": "address", "nodeType": "ElementaryTypeName", "src": "5342:7:26", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 9334, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 9395, "src": "5357:14:26", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9333, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5357:7:26", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5341:31:26" }, "returnParameters": { "id": 9338, "nodeType": "ParameterList", "parameters": [], "src": "5392:0:26" }, "scope": 9396, "src": "5324:581:26", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 9397, "src": "560:5347:26" } ], "src": "78:5830:26" }, "compiler": { "name": "solc", "version": "0.6.9+commit.3e3065ac.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.2.3", "updatedAt": "2020-11-06T08:03:35.696Z", "devdoc": { "author": "DODO Breeder", "methods": {}, "title": "Settlement" }, "userdoc": { "methods": {}, "notice": "Functions for assets settlement" } }