{ "contractName": "LiquidityProvider", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "payer", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "isBaseToken", "type": "bool" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "ChargePenalty", "type": "event" }, { "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": true, "internalType": "address", "name": "payer", "type": "address" }, { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "isBaseToken", "type": "bool" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "lpTokenAmount", "type": "uint256" } ], "name": "Deposit", "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" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "payer", "type": "address" }, { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "isBaseToken", "type": "bool" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "lpTokenAmount", "type": "uint256" } ], "name": "Withdraw", "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": "getExpectedTarget", "outputs": [ { "internalType": "uint256", "name": "baseTarget", "type": "uint256" }, { "internalType": "uint256", "name": "quoteTarget", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getMidPrice", "outputs": [ { "internalType": "uint256", "name": "midPrice", "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" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "withdrawBase", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "depositBase", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "withdrawQuote", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "depositQuote", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "withdrawAllBase", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "withdrawAllQuote", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "depositQuoteTo", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "depositBaseTo", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "withdrawQuoteTo", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "withdrawBaseTo", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" } ], "name": "withdrawAllQuoteTo", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" } ], "name": "withdrawAllBaseTo", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "lp", "type": "address" } ], "name": "getLpBaseBalance", "outputs": [ { "internalType": "uint256", "name": "lpBalance", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "lp", "type": "address" } ], "name": "getLpQuoteBalance", "outputs": [ { "internalType": "uint256", "name": "lpBalance", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "getWithdrawQuotePenalty", "outputs": [ { "internalType": "uint256", "name": "penalty", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "getWithdrawBasePenalty", "outputs": [ { "internalType": "uint256", "name": "penalty", "type": "uint256" } ], "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.6.9+commit.3e3065ac\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isBaseToken\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ChargePenalty\",\"type\":\"event\"},{\"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\":true,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isBaseToken\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpTokenAmount\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isBaseToken\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpTokenAmount\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"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\":\"depositBase\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositBaseTo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositQuote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositQuoteTo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"getExpectedTarget\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"baseTarget\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quoteTarget\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"lp\",\"type\":\"address\"}],\"name\":\"getLpBaseBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"lpBalance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"lp\",\"type\":\"address\"}],\"name\":\"getLpQuoteBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"lpBalance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMidPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"midPrice\",\"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\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"getWithdrawBasePenalty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"penalty\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"getWithdrawQuotePenalty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"penalty\",\"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\"},{\"inputs\":[],\"name\":\"withdrawAllBase\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawAllBaseTo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawAllQuote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawAllQuoteTo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawBase\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawBaseTo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawQuote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawQuoteTo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"DODO Breeder\",\"methods\":{},\"title\":\"LiquidityProvider\"},\"userdoc\":{\"methods\":{},\"notice\":\"Functions for liquidity provider operations\"}},\"settings\":{\"compilationTarget\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/LiquidityProvider.sol\":\"LiquidityProvider\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/LiquidityProvider.sol\":{\"keccak256\":\"0x1bbb3571a539c9098a617410934ef589e40c6a910f155c31ff0680b2d754c3a9\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://ec97b6eb2b09157237590eae3c7b9b34720c8cf8b392d78aa1ef41c1c543c1ed\",\"dweb:/ipfs/QmYLVFUrD3fbgHFyhWTPmqyS41SDi8kyegS4MpVMdDyr9V\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Pricing.sol\":{\"keccak256\":\"0xaec47be06aa7f8994923c80f2c2318304423666300a48f03a43265787f27c708\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e187f46639dd1127abc81439896e67e21338e9eee8707996606b0c9c8ede68a1\",\"dweb:/ipfs/QmPSfPbZuyM3haHZtWVFknZLAMqg2Jy613jQ36JGuCm7LS\"]},\"/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/DODOMath.sol\":{\"keccak256\":\"0xe3f63c53706f21ad68ebeff69321682ffa83bb0552db7e4453dff9772724f657\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://64e385f8c3fbe9e485d0b1b0f90f9621bf50fe02ee7cb95a44828a255db3581f\",\"dweb:/ipfs/QmNesw9cspw1fDDumDy1BSrCeGVij1BAfAVXpfajKHGUcn\"]},\"/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": "0x608060405234801561001057600080fd5b50612bdb806100206000396000f3fe608060405234801561001057600080fd5b50600436106103a45760003560e01c80638ff5e742116101e9578063c6b73cf91161010f578063ed0aa428116100ad578063f3ae6c5f1161007c578063f3ae6c5f1461066e578063f67ed44814610681578063f98bea1514610694578063ffa64225146106a7576103a4565b8063ed0aa4281461062d578063ee27c68914610640578063ee5150b314610648578063f2fde38b1461065b576103a4565b8063d689107c116100e9578063d689107c1461060d578063dd58b41c14610615578063eab5d20e1461061d578063ec2fd46d14610625576103a4565b8063c6b73cf9146105f5578063d47eaa37146105fd578063d4b9704614610605576103a4565b8063ab44a7a311610187578063c0ffa17811610156578063c0ffa178146105ca578063c3a2a665146105d2578063c59203af146105e5578063c5bbffe8146105ed576103a4565b8063ab44a7a31461059f578063ac1fbc98146105a7578063b2094fd3146105af578063c0a5f6ff146105b7576103a4565b80639b020fba116101c35780639b020fba14610574578063a3161a561461057c578063a598aca714610584578063aa06ce9b1461058c576103a4565b80638ff5e74214610546578063947cf92b1461054e57806395faa5f614610561576103a4565b80633960f142116102ce578063648a4fac1161026c578063796da7af1161023b578063796da7af1461051b5780637aed942d146105235780637c9b8e89146105365780638456db151461053e576103a4565b8063648a4fac146104e357806368be20ad146104eb5780636ec6a58d1461050b57806373a2ab7c14610513576103a4565b80634de4527e116102a85780634de4527e146104b85780634e71e0c8146104c057806354fd4d50146104c85780635f179f64146104d0576103a4565b80633960f142146104a05780634322ec83146104a85780634a248d2a146104b0576103a4565b806317be952e1161034657806327bed8ee1161031557806327bed8ee1461045f5780632aa82c651461047257806336a53bbb1461047a578063387b0c111461048d576103a4565b806317be952e146104255780631e34b9cc1461043a5780631f3c156e1461044d578063245c968514610457576103a4565b80630e6518e9116103825780630e6518e9146103ed578063108db744146103f557806316048bc4146104085780631769ddaa1461041d576103a4565b806304512dc4146103a95780630c9f7bd0146103d25780630cd1667d146103e5575b600080fd5b6103bc6103b736600461257d565b6106bd565b6040516103c99190612b3e565b60405180910390f35b6103bc6103e03660046125e2565b61084e565b6103bc61092d565b6103bc6109b0565b6103bc610403366004612598565b6109b6565b610410610bab565b6040516103c9919061264b565b6103bc610bba565b61042d610bc0565b6040516103c991906126cf565b6103bc61044836600461257d565b610bc9565b610455610d23565b005b6103bc610fe6565b6103bc61046d3660046125e2565b610fec565b6103bc610ffe565b6103bc61048836600461257d565b611043565b61045561049b3660046125e2565b611092565b6104106110f2565b610410611101565b610410611110565b6103bc61111f565b610455611125565b6103bc6111b3565b6103bc6104de366004612598565b6111b8565b6104556112fd565b6104fe6104f936600461257d565b611417565b6040516103c9919061269c565b6104fe61142c565b61041061143c565b6103bc61144b565b6103bc61053136600461257d565b611490565b6103bc611511565b610410611517565b6104fe611526565b6103bc61055c366004612598565b611534565b6103bc61056f36600461257d565b6116ee565b6103bc611729565b6104fe61172f565b6104fe611738565b6103bc61059a366004612598565b611748565b6103bc61186f565b610410611875565b6103bc611884565b6103bc6105c53660046125e2565b61188a565b6103bc611896565b6104556105e0366004612598565b61189c565b6103bc611a72565b6104fe611a7d565b6103bc611a8d565b6103bc611a93565b610410611a9e565b610410611aad565b6104fe611abc565b6103bc611acc565b6103bc611ad2565b61045561063b3660046125e2565b611ad8565b6103bc611b28565b6103bc6106563660046125e2565b611c19565b61045561066936600461257d565b611cb8565b6103bc61067c3660046125e2565b611d63565b6103bc61068f36600461257d565b611d6f565b6103bc6106a23660046125e2565b611da0565b6106af611dac565b6040516103c9929190612b57565b600154600090600160a01b900460ff16156106f35760405162461bcd60e51b81526004016106ea906127d3565b60405180910390fd5b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff161561072f5760405162461bcd60e51b81526004016106ea906129d2565b600061073a33611043565b9050600061074733611d6f565b905060006107548361084e565b9050828111156107765760405162461bcd60e51b81526004016106ea906129aa565b601054610789908463ffffffff611e7016565b6010556107963383611e98565b6107af856107aa858463ffffffff611e7016565b611f00565b6107b881611f37565b846001600160a01b0316336001600160a01b0316600080516020612b66833981519152600086866040516107ee939291906126b7565b60405180910390a3336001600160a01b0316600080516020612b868339815191526000836040516108209291906126a7565b60405180910390a2610838838263ffffffff611e7016565b6001805460ff60a01b1916905595945050505050565b60006012548211156108725760405162461bcd60e51b81526004016106ea906126e3565b6002600e5460ff16600281111561088557fe5b14156109245760006108a4600f54601154611e7090919063ffffffff16565b905060006108b061144b565b905060006108be8383611f8b565b905060006108d1601254600d5484611fb5565b905060006108f66108ed88601254611e7090919063ffffffff16565b600d5485611fb5565b905061091861090b828963ffffffff61205816565b839063ffffffff611e7016565b95505050505050610928565b5060005b919050565b601354604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561097257600080fd5b505afa158015610986573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109aa91906125fa565b90505b90565b60165481565b600154600090600160a01b900460ff16156109e35760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff1615610a1f5760405162461bcd60e51b81526004016106ea906129d2565b6000610a29611dac565b9150506000610a36610ffe565b905060008111610a585760405162461bcd60e51b81526004016106ea906127f6565b6000610a7a83610a6e878563ffffffff61208416565b9063ffffffff6120be16565b9050610a8533611d6f565b811115610aa45760405162461bcd60e51b81526004016106ea906128af565b6000610aaf8661084e565b9050858110610ad05760405162461bcd60e51b81526004016106ea906129aa565b601054610ae3908763ffffffff611e7016565b601055610af03383611e98565b610b04876107aa888463ffffffff611e7016565b610b0d81611f37565b6001600160a01b03871633600080516020612b668339815191526000610b398a8663ffffffff611e7016565b86604051610b49939291906126b7565b60405180910390a3336001600160a01b0316600080516020612b86833981519152600083604051610b7b9291906126a7565b60405180910390a2610b93868263ffffffff611e7016565b6001805460ff60a01b19169055979650505050505050565b6000546001600160a01b031681565b60055481565b600e5460ff1681565b600154600090600160a01b900460ff1615610bf65760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff1615610c325760405162461bcd60e51b81526004016106ea906129d2565b6000610c3d336116ee565b90506000610c4a33611490565b90506000610c5783611c19565b905082811115610c795760405162461bcd60e51b81526004016106ea906129aa565b600f54610c8c908463ffffffff611e7016565b600f55610c9933836120eb565b610cb285610cad858463ffffffff611e7016565b61211d565b610cbb81612154565b846001600160a01b0316336001600160a01b0316600080516020612b6683398151915260018686604051610cf1939291906126b7565b60405180910390a3336001600160a01b0316600080516020612b868339815191526001836040516108209291906126a7565b600154600160a01b900460ff1615610d4d5760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff16610d885760405162461bcd60e51b81526004016106ea90612b15565b3360009081526017602052604090205460ff1615610db85760405162461bcd60e51b81526004016106ea90612aec565b336000818152601760205260408120805460ff1916600117905590610ddc90611d6f565b90506000610de933611490565b905060008215610e2057610e1d610dfe610ffe565b601054610e11908663ffffffff61208416565b9063ffffffff61219d16565b90505b60008215610e4957610e46610e3361092d565b600f54610e11908663ffffffff61208416565b90505b601054610e5c908363ffffffff611e7016565b601055600f54610e72908263ffffffff611e7016565b600f81905550610e94610e8784601554611f8b565b839063ffffffff61205816565b9150610eb2610ea585601654611f8b565b829063ffffffff61205816565b9050610ebe338261211d565b610ec83383611f00565b601354604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90610efa903390879060040161265f565b600060405180830381600087803b158015610f1457600080fd5b505af1158015610f28573d6000803e3d6000fd5b5050601454604051632770a7eb60e21b81526001600160a01b039091169250639dc29fac9150610f5e903390889060040161265f565b600060405180830381600087803b158015610f7857600080fd5b505af1158015610f8c573d6000803e3d6000fd5b50505050336001600160a01b03167fbe5f7fe66d16c6a87bb5b8b08a96634fe4f1c2bac9e5e413efe41a782d4d0c438284604051610fcb929190612b57565b60405180910390a2505050506001805460ff60a01b19169055565b60105481565b6000610ff83383611748565b92915050565b601454604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561097257600080fd5b60008061104e610ffe565b9050600061105a611dac565b9150508161106d57600092505050610928565b61108a82610e118361107e88611d6f565b9063ffffffff61208416565b949350505050565b600154600160a01b900460ff16156110bc5760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790556110d933826121c7565b6110e281611f37565b506001805460ff60a01b19169055565b6006546001600160a01b031681565b6007546001600160a01b031681565b6008546001600160a01b031681565b60025481565b6001546001600160a01b0316331461114f5760405162461bcd60e51b81526004016106ea9061271a565b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b606590565b600154600090600160a01b900460ff16156111e55760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790819055600160b81b900460ff166112205760405162461bcd60e51b81526004016106ea9061279c565b600061122a611dac565b9150506000611237610ffe565b905083816112565761124f858463ffffffff61205816565b9050611273565b82156112735761127083610e11878563ffffffff61208416565b90505b61127d33866121c7565b611287868261222c565b60105461129a908663ffffffff61205816565b6010556040516001600160a01b0387169033907f18081cde2fa64894914e1080b98cca17bb6d1acf633e57f6e26ebdb945ad830b906112df906000908a9087906126b7565b60405180910390a36001805460ff60a01b1916905595945050505050565b6000546001600160a01b031633146113275760405162461bcd60e51b81526004016106ea906129f7565b600154600160b01b900460ff16156113515760405162461bcd60e51b81526004016106ea906129d2565b6001805462ffffff60b81b1960ff60b01b19909116600160b01b17169055600061137961092d565b90506000611385610ffe565b905060105460125411156113c15760006113ac601054601254611e7090919063ffffffff16565b90506113b8818461225e565b601555506113c8565b6012546010555b600f5460115411156114025760006113ed600f54601154611e7090919063ffffffff16565b90506113f9818361225e565b60165550611409565b601154600f555b5050600e805460ff19169055565b60176020526000908152604090205460ff1681565b600154600160b01b900460ff1681565b600a546001600160a01b031681565b600a5460408051634c6afee560e11b815290516000926001600160a01b0316916398d5fdca916004808301926020929190829003018186803b15801561097257600080fd5b6013546040516370a0823160e01b81526000916001600160a01b0316906370a08231906114c190859060040161264b565b60206040518083038186803b1580156114d957600080fd5b505afa1580156114ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff891906125fa565b60125481565b6001546001600160a01b031681565b600354610100900460ff1681565b600154600090600160a01b900460ff16156115615760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff161561159d5760405162461bcd60e51b81526004016106ea906129d2565b60006115a7611dac565b50905060006115b461092d565b9050600081116115d65760405162461bcd60e51b81526004016106ea90612741565b60006115ec83610a6e878563ffffffff61208416565b90506115f733611490565b8111156116165760405162461bcd60e51b81526004016106ea90612a87565b600061162186611c19565b9050858111156116435760405162461bcd60e51b81526004016106ea906129aa565b600f54611656908763ffffffff611e7016565b600f5561166333836120eb565b61167787610cad888463ffffffff611e7016565b61168081612154565b6001600160a01b03871633600080516020612b6683398151915260016116ac8a8663ffffffff611e7016565b866040516116bc939291906126b7565b60405180910390a3336001600160a01b0316600080516020612b86833981519152600183604051610b7b9291906126a7565b6000806116f961092d565b90506000611705611dac565b5090508161171857600092505050610928565b61108a82610e118361107e88611490565b60045481565b60035460ff1681565b600154600160c01b900460ff1681565b600154600090600160a01b900460ff16156117755760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790819055600160c01b900460ff166117b05760405162461bcd60e51b81526004016106ea90612765565b60006117ba611dac565b50905060006117c761092d565b905083816117e6576117df858463ffffffff61205816565b9050611803565b82156118035761180083610e11878563ffffffff61208416565b90505b61180d338661227c565b61181786826122e1565b600f5461182a908663ffffffff61205816565b600f556040516001600160a01b0387169033907f18081cde2fa64894914e1080b98cca17bb6d1acf633e57f6e26ebdb945ad830b906112df906001908a9087906126b7565b600b5481565b6014546001600160a01b031681565b600f5481565b6000610ff833836109b6565b600c5481565b6000546001600160a01b031633146118c65760405162461bcd60e51b81526004016106ea906129f7565b6008546001600160a01b038381169116141561198d576011546118ef908263ffffffff61205816565b6008546040516370a0823160e01b81526001600160a01b03909116906370a082319061191f90309060040161264b565b60206040518083038186803b15801561193757600080fd5b505afa15801561194b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061196f91906125fa565b101561198d5760405162461bcd60e51b81526004016106ea9061294c565b6009546001600160a01b0383811691161415611a54576012546119b6908263ffffffff61205816565b6009546040516370a0823160e01b81526001600160a01b03909116906370a08231906119e690309060040161264b565b60206040518083038186803b1580156119fe57600080fd5b505afa158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3691906125fa565b1015611a545760405162461bcd60e51b81526004016106ea906126e3565b611a6e6001600160a01b038316338363ffffffff61231316565b5050565b60006109aa336106bd565b600154600160b81b900460ff1681565b60155481565b60006109aa33610bc9565b6009546001600160a01b031681565b6013546001600160a01b031681565b600154600160c81b900460ff1681565b60115481565b600d5481565b600154600160a01b900460ff1615611b025760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b179055611b1f338261227c565b6110e281612154565b6000806000611b35611dac565b90925090506002600e5460ff166002811115611b4d57fe5b1415611bcf576000611b79611b71601254610e11858661208490919063ffffffff16565b60125461225e565b9050611bb2611b8a600d5483611f8b565b600d54611ba690670de0b6b3a76400009063ffffffff611e7016565b9063ffffffff61205816565b9050611bc5611bbf61144b565b8261225e565b93505050506109ad565b6000611bf5611bed601154610e11868761208490919063ffffffff16565b60115461225e565b9050611c06611b8a600d5483611f8b565b9050611bc5611c1361144b565b82611f8b565b6000601154821115611c3d5760405162461bcd60e51b81526004016106ea9061294c565b6001600e5460ff166002811115611c5057fe5b1415610924576000611c6f601054601254611e7090919063ffffffff16565b90506000611c7b61144b565b90506000611c89838361225e565b90506000611c9c601154600d5484611fb5565b905060006108f66108ed88601154611e7090919063ffffffff16565b6000546001600160a01b03163314611ce25760405162461bcd60e51b81526004016106ea906129f7565b6001600160a01b038116611d085760405162461bcd60e51b81526004016106ea90612983565b600080546040516001600160a01b03808516939216917fdcf55418cee3220104fef63f979ff3c4097ad240c0c43dcb33ce837748983e6291a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000610ff833836111b8565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a08231906114c190859060040161264b565b6000610ff83383611534565b601254601154600091829182600e5460ff166002811115611dc957fe5b1415611de057600f54601054935093505050611e6c565b6002600e5460ff166002811115611df357fe5b1415611e25576000611e0361236e565b600f54909150611e19848363ffffffff61205816565b94509450505050611e6c565b6001600e5460ff166002811115611e3857fe5b1415611e69576000611e486123d5565b9050611e5a828263ffffffff61205816565b60105494509450505050611e6c565b50505b9091565b600082821115611e925760405162461bcd60e51b81526004016106ea90612929565b50900390565b601454604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90611eca908590859060040161265f565b600060405180830381600087803b158015611ee457600080fd5b505af1158015611ef8573d6000803e3d6000fd5b505050505050565b600954611f1d906001600160a01b0316838363ffffffff61231316565b601254611f30908263ffffffff611e7016565b6012555050565b601054611f4a908263ffffffff61205816565b6010556040517fa259c93818139b6bc90fb80e8feb75122b42edaae49560f81392cf4e1946726e90611f80908390600090612b47565b60405180910390a150565b6000670de0b6b3a7640000611fa6848463ffffffff61208416565b81611fad57fe5b049392505050565b600080611fd0611fca600461107e8787611f8b565b86612433565b9050611ff6611ff1670de0b6b3a764000061107e848263ffffffff61205816565b612451565b9050600061202b61201583670de0b6b3a764000063ffffffff611e7016565b61202687600263ffffffff61208416565b612433565b905061204e86612049670de0b6b3a76400008463ffffffff61205816565b611f8b565b9695505050505050565b60008282018381101561207d5760405162461bcd60e51b81526004016106ea90612a1a565b9392505050565b60008261209357506000610ff8565b828202828482816120a057fe5b041461207d5760405162461bcd60e51b81526004016106ea90612ac9565b6000806120cb848461219d565b9050828102840380156120e357506001019050610ff8565b509050610ff8565b601354604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90611eca908590859060040161265f565b60085461213a906001600160a01b0316838363ffffffff61231316565b60115461214d908263ffffffff611e7016565b6011555050565b600f54612167908263ffffffff61205816565b600f556040517fa259c93818139b6bc90fb80e8feb75122b42edaae49560f81392cf4e1946726e90611f80908390600190612b47565b60008082116121be5760405162461bcd60e51b81526004016106ea90612887565b818381611fad57fe5b6005546012546121dd908363ffffffff61205816565b11156121fb5760405162461bcd60e51b81526004016106ea9061281b565b600954612219906001600160a01b031683308463ffffffff61248816565b601254611f30908263ffffffff61205816565b6014546040516340c10f1960e01b81526001600160a01b03909116906340c10f1990611eca908590859060040161265f565b600061207d82610e1185670de0b6b3a764000063ffffffff61208416565b600454601154612292908363ffffffff61205816565b11156122b05760405162461bcd60e51b81526004016106ea906128f2565b6008546122ce906001600160a01b031683308463ffffffff61248816565b60115461214d908263ffffffff61205816565b6013546040516340c10f1960e01b81526001600160a01b03909116906340c10f1990611eca908590859060040161265f565b6123698363a9059cbb60e01b848460405160240161233292919061265f565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526124af565b505050565b600080612388600f54601154611e7090919063ffffffff16565b9050600061239461144b565b905060006123a28383611f8b565b905060006123b5601254600d5484611fb5565b90506123cc60125482611e7090919063ffffffff16565b94505050505090565b6000806123ef601054601254611e7090919063ffffffff16565b905060006123fb61144b565b90506000612409838361225e565b9050600061241c601154600d5484611fb5565b90506123cc60115482611e7090919063ffffffff16565b600061207d82610a6e85670de0b6b3a764000063ffffffff61208416565b80600160028204015b818110156124825780915060028182858161247157fe5b04018161247a57fe5b04905061245a565b50919050565b6124a9846323b872dd60e01b85858560405160240161233293929190612678565b50505050565b60006060836001600160a01b0316836040516124cb9190612612565b6000604051808303816000865af19150503d8060008114612508576040519150601f19603f3d011682016040523d82523d6000602084013e61250d565b606091505b50915091508161252f5760405162461bcd60e51b81526004016106ea90612852565b8051156124a9578080602001905181019061254a91906125c2565b6124a95760405162461bcd60e51b81526004016106ea90612a3d565b80356001600160a01b0381168114610ff857600080fd5b60006020828403121561258e578081fd5b61207d8383612566565b600080604083850312156125aa578081fd5b6125b48484612566565b946020939093013593505050565b6000602082840312156125d3578081fd5b8151801515811461207d578182fd5b6000602082840312156125f3578081fd5b5035919050565b60006020828403121561260b578081fd5b5051919050565b60008251815b818110156126325760208186018101518583015201612618565b818111156126405782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b9115158252602082015260400190565b92151583526020830191909152604082015260600190565b60208101600383106126dd57fe5b91905290565b6020808252601d908201527f444f444f5f51554f54455f42414c414e43455f4e4f545f454e4f554748000000604082015260600190565b6020808252600d908201526c494e56414c49445f434c41494d60981b604082015260600190565b6020808252600a908201526904e4f5f424153455f4c560b41b604082015260600190565b60208082526018908201527f4445504f5349545f424153455f4e4f545f414c4c4f5745440000000000000000604082015260600190565b60208082526019908201527f4445504f5349545f51554f54455f4e4f545f414c4c4f57454400000000000000604082015260600190565b60208082526009908201526814915153951490539560ba1b604082015260600190565b6020808252600b908201526a04e4f5f51554f54455f4c560ac1b604082015260600190565b6020808252601c908201527f51554f54455f42414c414e43455f4c494d49545f455843454544454400000000604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252600e908201526d2224ab24a224a723afa2a92927a960911b604082015260600190565b60208082526023908201527f4c505f51554f54455f4341504954414c5f42414c414e43455f4e4f545f454e4f6040820152620aa8e960eb1b606082015260800190565b6020808252601b908201527f424153455f42414c414e43455f4c494d49545f45584345454445440000000000604082015260600190565b60208082526009908201526829aaa12fa2a92927a960b91b604082015260600190565b6020808252601c908201527f444f444f5f424153455f42414c414e43455f4e4f545f454e4f55474800000000604082015260600190565b6020808252600d908201526c24a72b20a624a22fa7aba722a960991b604082015260600190565b6020808252600e908201526d1411539053151657d15610d1515160921b604082015260600190565b6020808252600b908201526a1113d113d7d0d313d4d15160aa1b604082015260600190565b6020808252600990820152682727aa2fa7aba722a960b91b604082015260600190565b60208082526009908201526820a2222fa2a92927a960b91b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526022908201527f4c505f424153455f4341504954414c5f42414c414e43455f4e4f545f454e4f5560408201526108e960f31b606082015260800190565b60208082526009908201526826aaa62fa2a92927a960b91b604082015260600190565b6020808252600f908201526e1053149150511657d0d31052535151608a1b604082015260600190565b6020808252600f908201526e1113d113d7d393d517d0d313d4d151608a1b604082015260600190565b90815260200190565b9182521515602082015260400190565b91825260208201526040019056fee89c586bd81ee35a18f7eac22a732b56e589a2821497cce12a0208828540a36d581f351e2bdb9fa9021bb2a24def989f06ac236f8a92aac14bcbc618ddf3826aa2646970667358221220f817095e7822ba6073f1c4d1397cd91906e8e24ff2aa07bd7a3d88e5a48f19e964736f6c63430006090033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106103a45760003560e01c80638ff5e742116101e9578063c6b73cf91161010f578063ed0aa428116100ad578063f3ae6c5f1161007c578063f3ae6c5f1461066e578063f67ed44814610681578063f98bea1514610694578063ffa64225146106a7576103a4565b8063ed0aa4281461062d578063ee27c68914610640578063ee5150b314610648578063f2fde38b1461065b576103a4565b8063d689107c116100e9578063d689107c1461060d578063dd58b41c14610615578063eab5d20e1461061d578063ec2fd46d14610625576103a4565b8063c6b73cf9146105f5578063d47eaa37146105fd578063d4b9704614610605576103a4565b8063ab44a7a311610187578063c0ffa17811610156578063c0ffa178146105ca578063c3a2a665146105d2578063c59203af146105e5578063c5bbffe8146105ed576103a4565b8063ab44a7a31461059f578063ac1fbc98146105a7578063b2094fd3146105af578063c0a5f6ff146105b7576103a4565b80639b020fba116101c35780639b020fba14610574578063a3161a561461057c578063a598aca714610584578063aa06ce9b1461058c576103a4565b80638ff5e74214610546578063947cf92b1461054e57806395faa5f614610561576103a4565b80633960f142116102ce578063648a4fac1161026c578063796da7af1161023b578063796da7af1461051b5780637aed942d146105235780637c9b8e89146105365780638456db151461053e576103a4565b8063648a4fac146104e357806368be20ad146104eb5780636ec6a58d1461050b57806373a2ab7c14610513576103a4565b80634de4527e116102a85780634de4527e146104b85780634e71e0c8146104c057806354fd4d50146104c85780635f179f64146104d0576103a4565b80633960f142146104a05780634322ec83146104a85780634a248d2a146104b0576103a4565b806317be952e1161034657806327bed8ee1161031557806327bed8ee1461045f5780632aa82c651461047257806336a53bbb1461047a578063387b0c111461048d576103a4565b806317be952e146104255780631e34b9cc1461043a5780631f3c156e1461044d578063245c968514610457576103a4565b80630e6518e9116103825780630e6518e9146103ed578063108db744146103f557806316048bc4146104085780631769ddaa1461041d576103a4565b806304512dc4146103a95780630c9f7bd0146103d25780630cd1667d146103e5575b600080fd5b6103bc6103b736600461257d565b6106bd565b6040516103c99190612b3e565b60405180910390f35b6103bc6103e03660046125e2565b61084e565b6103bc61092d565b6103bc6109b0565b6103bc610403366004612598565b6109b6565b610410610bab565b6040516103c9919061264b565b6103bc610bba565b61042d610bc0565b6040516103c991906126cf565b6103bc61044836600461257d565b610bc9565b610455610d23565b005b6103bc610fe6565b6103bc61046d3660046125e2565b610fec565b6103bc610ffe565b6103bc61048836600461257d565b611043565b61045561049b3660046125e2565b611092565b6104106110f2565b610410611101565b610410611110565b6103bc61111f565b610455611125565b6103bc6111b3565b6103bc6104de366004612598565b6111b8565b6104556112fd565b6104fe6104f936600461257d565b611417565b6040516103c9919061269c565b6104fe61142c565b61041061143c565b6103bc61144b565b6103bc61053136600461257d565b611490565b6103bc611511565b610410611517565b6104fe611526565b6103bc61055c366004612598565b611534565b6103bc61056f36600461257d565b6116ee565b6103bc611729565b6104fe61172f565b6104fe611738565b6103bc61059a366004612598565b611748565b6103bc61186f565b610410611875565b6103bc611884565b6103bc6105c53660046125e2565b61188a565b6103bc611896565b6104556105e0366004612598565b61189c565b6103bc611a72565b6104fe611a7d565b6103bc611a8d565b6103bc611a93565b610410611a9e565b610410611aad565b6104fe611abc565b6103bc611acc565b6103bc611ad2565b61045561063b3660046125e2565b611ad8565b6103bc611b28565b6103bc6106563660046125e2565b611c19565b61045561066936600461257d565b611cb8565b6103bc61067c3660046125e2565b611d63565b6103bc61068f36600461257d565b611d6f565b6103bc6106a23660046125e2565b611da0565b6106af611dac565b6040516103c9929190612b57565b600154600090600160a01b900460ff16156106f35760405162461bcd60e51b81526004016106ea906127d3565b60405180910390fd5b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff161561072f5760405162461bcd60e51b81526004016106ea906129d2565b600061073a33611043565b9050600061074733611d6f565b905060006107548361084e565b9050828111156107765760405162461bcd60e51b81526004016106ea906129aa565b601054610789908463ffffffff611e7016565b6010556107963383611e98565b6107af856107aa858463ffffffff611e7016565b611f00565b6107b881611f37565b846001600160a01b0316336001600160a01b0316600080516020612b66833981519152600086866040516107ee939291906126b7565b60405180910390a3336001600160a01b0316600080516020612b868339815191526000836040516108209291906126a7565b60405180910390a2610838838263ffffffff611e7016565b6001805460ff60a01b1916905595945050505050565b60006012548211156108725760405162461bcd60e51b81526004016106ea906126e3565b6002600e5460ff16600281111561088557fe5b14156109245760006108a4600f54601154611e7090919063ffffffff16565b905060006108b061144b565b905060006108be8383611f8b565b905060006108d1601254600d5484611fb5565b905060006108f66108ed88601254611e7090919063ffffffff16565b600d5485611fb5565b905061091861090b828963ffffffff61205816565b839063ffffffff611e7016565b95505050505050610928565b5060005b919050565b601354604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561097257600080fd5b505afa158015610986573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109aa91906125fa565b90505b90565b60165481565b600154600090600160a01b900460ff16156109e35760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff1615610a1f5760405162461bcd60e51b81526004016106ea906129d2565b6000610a29611dac565b9150506000610a36610ffe565b905060008111610a585760405162461bcd60e51b81526004016106ea906127f6565b6000610a7a83610a6e878563ffffffff61208416565b9063ffffffff6120be16565b9050610a8533611d6f565b811115610aa45760405162461bcd60e51b81526004016106ea906128af565b6000610aaf8661084e565b9050858110610ad05760405162461bcd60e51b81526004016106ea906129aa565b601054610ae3908763ffffffff611e7016565b601055610af03383611e98565b610b04876107aa888463ffffffff611e7016565b610b0d81611f37565b6001600160a01b03871633600080516020612b668339815191526000610b398a8663ffffffff611e7016565b86604051610b49939291906126b7565b60405180910390a3336001600160a01b0316600080516020612b86833981519152600083604051610b7b9291906126a7565b60405180910390a2610b93868263ffffffff611e7016565b6001805460ff60a01b19169055979650505050505050565b6000546001600160a01b031681565b60055481565b600e5460ff1681565b600154600090600160a01b900460ff1615610bf65760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff1615610c325760405162461bcd60e51b81526004016106ea906129d2565b6000610c3d336116ee565b90506000610c4a33611490565b90506000610c5783611c19565b905082811115610c795760405162461bcd60e51b81526004016106ea906129aa565b600f54610c8c908463ffffffff611e7016565b600f55610c9933836120eb565b610cb285610cad858463ffffffff611e7016565b61211d565b610cbb81612154565b846001600160a01b0316336001600160a01b0316600080516020612b6683398151915260018686604051610cf1939291906126b7565b60405180910390a3336001600160a01b0316600080516020612b868339815191526001836040516108209291906126a7565b600154600160a01b900460ff1615610d4d5760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff16610d885760405162461bcd60e51b81526004016106ea90612b15565b3360009081526017602052604090205460ff1615610db85760405162461bcd60e51b81526004016106ea90612aec565b336000818152601760205260408120805460ff1916600117905590610ddc90611d6f565b90506000610de933611490565b905060008215610e2057610e1d610dfe610ffe565b601054610e11908663ffffffff61208416565b9063ffffffff61219d16565b90505b60008215610e4957610e46610e3361092d565b600f54610e11908663ffffffff61208416565b90505b601054610e5c908363ffffffff611e7016565b601055600f54610e72908263ffffffff611e7016565b600f81905550610e94610e8784601554611f8b565b839063ffffffff61205816565b9150610eb2610ea585601654611f8b565b829063ffffffff61205816565b9050610ebe338261211d565b610ec83383611f00565b601354604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90610efa903390879060040161265f565b600060405180830381600087803b158015610f1457600080fd5b505af1158015610f28573d6000803e3d6000fd5b5050601454604051632770a7eb60e21b81526001600160a01b039091169250639dc29fac9150610f5e903390889060040161265f565b600060405180830381600087803b158015610f7857600080fd5b505af1158015610f8c573d6000803e3d6000fd5b50505050336001600160a01b03167fbe5f7fe66d16c6a87bb5b8b08a96634fe4f1c2bac9e5e413efe41a782d4d0c438284604051610fcb929190612b57565b60405180910390a2505050506001805460ff60a01b19169055565b60105481565b6000610ff83383611748565b92915050565b601454604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561097257600080fd5b60008061104e610ffe565b9050600061105a611dac565b9150508161106d57600092505050610928565b61108a82610e118361107e88611d6f565b9063ffffffff61208416565b949350505050565b600154600160a01b900460ff16156110bc5760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790556110d933826121c7565b6110e281611f37565b506001805460ff60a01b19169055565b6006546001600160a01b031681565b6007546001600160a01b031681565b6008546001600160a01b031681565b60025481565b6001546001600160a01b0316331461114f5760405162461bcd60e51b81526004016106ea9061271a565b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b606590565b600154600090600160a01b900460ff16156111e55760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790819055600160b81b900460ff166112205760405162461bcd60e51b81526004016106ea9061279c565b600061122a611dac565b9150506000611237610ffe565b905083816112565761124f858463ffffffff61205816565b9050611273565b82156112735761127083610e11878563ffffffff61208416565b90505b61127d33866121c7565b611287868261222c565b60105461129a908663ffffffff61205816565b6010556040516001600160a01b0387169033907f18081cde2fa64894914e1080b98cca17bb6d1acf633e57f6e26ebdb945ad830b906112df906000908a9087906126b7565b60405180910390a36001805460ff60a01b1916905595945050505050565b6000546001600160a01b031633146113275760405162461bcd60e51b81526004016106ea906129f7565b600154600160b01b900460ff16156113515760405162461bcd60e51b81526004016106ea906129d2565b6001805462ffffff60b81b1960ff60b01b19909116600160b01b17169055600061137961092d565b90506000611385610ffe565b905060105460125411156113c15760006113ac601054601254611e7090919063ffffffff16565b90506113b8818461225e565b601555506113c8565b6012546010555b600f5460115411156114025760006113ed600f54601154611e7090919063ffffffff16565b90506113f9818361225e565b60165550611409565b601154600f555b5050600e805460ff19169055565b60176020526000908152604090205460ff1681565b600154600160b01b900460ff1681565b600a546001600160a01b031681565b600a5460408051634c6afee560e11b815290516000926001600160a01b0316916398d5fdca916004808301926020929190829003018186803b15801561097257600080fd5b6013546040516370a0823160e01b81526000916001600160a01b0316906370a08231906114c190859060040161264b565b60206040518083038186803b1580156114d957600080fd5b505afa1580156114ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff891906125fa565b60125481565b6001546001600160a01b031681565b600354610100900460ff1681565b600154600090600160a01b900460ff16156115615760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff161561159d5760405162461bcd60e51b81526004016106ea906129d2565b60006115a7611dac565b50905060006115b461092d565b9050600081116115d65760405162461bcd60e51b81526004016106ea90612741565b60006115ec83610a6e878563ffffffff61208416565b90506115f733611490565b8111156116165760405162461bcd60e51b81526004016106ea90612a87565b600061162186611c19565b9050858111156116435760405162461bcd60e51b81526004016106ea906129aa565b600f54611656908763ffffffff611e7016565b600f5561166333836120eb565b61167787610cad888463ffffffff611e7016565b61168081612154565b6001600160a01b03871633600080516020612b6683398151915260016116ac8a8663ffffffff611e7016565b866040516116bc939291906126b7565b60405180910390a3336001600160a01b0316600080516020612b86833981519152600183604051610b7b9291906126a7565b6000806116f961092d565b90506000611705611dac565b5090508161171857600092505050610928565b61108a82610e118361107e88611490565b60045481565b60035460ff1681565b600154600160c01b900460ff1681565b600154600090600160a01b900460ff16156117755760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b1790819055600160c01b900460ff166117b05760405162461bcd60e51b81526004016106ea90612765565b60006117ba611dac565b50905060006117c761092d565b905083816117e6576117df858463ffffffff61205816565b9050611803565b82156118035761180083610e11878563ffffffff61208416565b90505b61180d338661227c565b61181786826122e1565b600f5461182a908663ffffffff61205816565b600f556040516001600160a01b0387169033907f18081cde2fa64894914e1080b98cca17bb6d1acf633e57f6e26ebdb945ad830b906112df906001908a9087906126b7565b600b5481565b6014546001600160a01b031681565b600f5481565b6000610ff833836109b6565b600c5481565b6000546001600160a01b031633146118c65760405162461bcd60e51b81526004016106ea906129f7565b6008546001600160a01b038381169116141561198d576011546118ef908263ffffffff61205816565b6008546040516370a0823160e01b81526001600160a01b03909116906370a082319061191f90309060040161264b565b60206040518083038186803b15801561193757600080fd5b505afa15801561194b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061196f91906125fa565b101561198d5760405162461bcd60e51b81526004016106ea9061294c565b6009546001600160a01b0383811691161415611a54576012546119b6908263ffffffff61205816565b6009546040516370a0823160e01b81526001600160a01b03909116906370a08231906119e690309060040161264b565b60206040518083038186803b1580156119fe57600080fd5b505afa158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3691906125fa565b1015611a545760405162461bcd60e51b81526004016106ea906126e3565b611a6e6001600160a01b038316338363ffffffff61231316565b5050565b60006109aa336106bd565b600154600160b81b900460ff1681565b60155481565b60006109aa33610bc9565b6009546001600160a01b031681565b6013546001600160a01b031681565b600154600160c81b900460ff1681565b60115481565b600d5481565b600154600160a01b900460ff1615611b025760405162461bcd60e51b81526004016106ea906127d3565b6001805460ff60a01b1916600160a01b179055611b1f338261227c565b6110e281612154565b6000806000611b35611dac565b90925090506002600e5460ff166002811115611b4d57fe5b1415611bcf576000611b79611b71601254610e11858661208490919063ffffffff16565b60125461225e565b9050611bb2611b8a600d5483611f8b565b600d54611ba690670de0b6b3a76400009063ffffffff611e7016565b9063ffffffff61205816565b9050611bc5611bbf61144b565b8261225e565b93505050506109ad565b6000611bf5611bed601154610e11868761208490919063ffffffff16565b60115461225e565b9050611c06611b8a600d5483611f8b565b9050611bc5611c1361144b565b82611f8b565b6000601154821115611c3d5760405162461bcd60e51b81526004016106ea9061294c565b6001600e5460ff166002811115611c5057fe5b1415610924576000611c6f601054601254611e7090919063ffffffff16565b90506000611c7b61144b565b90506000611c89838361225e565b90506000611c9c601154600d5484611fb5565b905060006108f66108ed88601154611e7090919063ffffffff16565b6000546001600160a01b03163314611ce25760405162461bcd60e51b81526004016106ea906129f7565b6001600160a01b038116611d085760405162461bcd60e51b81526004016106ea90612983565b600080546040516001600160a01b03808516939216917fdcf55418cee3220104fef63f979ff3c4097ad240c0c43dcb33ce837748983e6291a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000610ff833836111b8565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a08231906114c190859060040161264b565b6000610ff83383611534565b601254601154600091829182600e5460ff166002811115611dc957fe5b1415611de057600f54601054935093505050611e6c565b6002600e5460ff166002811115611df357fe5b1415611e25576000611e0361236e565b600f54909150611e19848363ffffffff61205816565b94509450505050611e6c565b6001600e5460ff166002811115611e3857fe5b1415611e69576000611e486123d5565b9050611e5a828263ffffffff61205816565b60105494509450505050611e6c565b50505b9091565b600082821115611e925760405162461bcd60e51b81526004016106ea90612929565b50900390565b601454604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90611eca908590859060040161265f565b600060405180830381600087803b158015611ee457600080fd5b505af1158015611ef8573d6000803e3d6000fd5b505050505050565b600954611f1d906001600160a01b0316838363ffffffff61231316565b601254611f30908263ffffffff611e7016565b6012555050565b601054611f4a908263ffffffff61205816565b6010556040517fa259c93818139b6bc90fb80e8feb75122b42edaae49560f81392cf4e1946726e90611f80908390600090612b47565b60405180910390a150565b6000670de0b6b3a7640000611fa6848463ffffffff61208416565b81611fad57fe5b049392505050565b600080611fd0611fca600461107e8787611f8b565b86612433565b9050611ff6611ff1670de0b6b3a764000061107e848263ffffffff61205816565b612451565b9050600061202b61201583670de0b6b3a764000063ffffffff611e7016565b61202687600263ffffffff61208416565b612433565b905061204e86612049670de0b6b3a76400008463ffffffff61205816565b611f8b565b9695505050505050565b60008282018381101561207d5760405162461bcd60e51b81526004016106ea90612a1a565b9392505050565b60008261209357506000610ff8565b828202828482816120a057fe5b041461207d5760405162461bcd60e51b81526004016106ea90612ac9565b6000806120cb848461219d565b9050828102840380156120e357506001019050610ff8565b509050610ff8565b601354604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90611eca908590859060040161265f565b60085461213a906001600160a01b0316838363ffffffff61231316565b60115461214d908263ffffffff611e7016565b6011555050565b600f54612167908263ffffffff61205816565b600f556040517fa259c93818139b6bc90fb80e8feb75122b42edaae49560f81392cf4e1946726e90611f80908390600190612b47565b60008082116121be5760405162461bcd60e51b81526004016106ea90612887565b818381611fad57fe5b6005546012546121dd908363ffffffff61205816565b11156121fb5760405162461bcd60e51b81526004016106ea9061281b565b600954612219906001600160a01b031683308463ffffffff61248816565b601254611f30908263ffffffff61205816565b6014546040516340c10f1960e01b81526001600160a01b03909116906340c10f1990611eca908590859060040161265f565b600061207d82610e1185670de0b6b3a764000063ffffffff61208416565b600454601154612292908363ffffffff61205816565b11156122b05760405162461bcd60e51b81526004016106ea906128f2565b6008546122ce906001600160a01b031683308463ffffffff61248816565b60115461214d908263ffffffff61205816565b6013546040516340c10f1960e01b81526001600160a01b03909116906340c10f1990611eca908590859060040161265f565b6123698363a9059cbb60e01b848460405160240161233292919061265f565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526124af565b505050565b600080612388600f54601154611e7090919063ffffffff16565b9050600061239461144b565b905060006123a28383611f8b565b905060006123b5601254600d5484611fb5565b90506123cc60125482611e7090919063ffffffff16565b94505050505090565b6000806123ef601054601254611e7090919063ffffffff16565b905060006123fb61144b565b90506000612409838361225e565b9050600061241c601154600d5484611fb5565b90506123cc60115482611e7090919063ffffffff16565b600061207d82610a6e85670de0b6b3a764000063ffffffff61208416565b80600160028204015b818110156124825780915060028182858161247157fe5b04018161247a57fe5b04905061245a565b50919050565b6124a9846323b872dd60e01b85858560405160240161233293929190612678565b50505050565b60006060836001600160a01b0316836040516124cb9190612612565b6000604051808303816000865af19150503d8060008114612508576040519150601f19603f3d011682016040523d82523d6000602084013e61250d565b606091505b50915091508161252f5760405162461bcd60e51b81526004016106ea90612852565b8051156124a9578080602001905181019061254a91906125c2565b6124a95760405162461bcd60e51b81526004016106ea90612a3d565b80356001600160a01b0381168114610ff857600080fd5b60006020828403121561258e578081fd5b61207d8383612566565b600080604083850312156125aa578081fd5b6125b48484612566565b946020939093013593505050565b6000602082840312156125d3578081fd5b8151801515811461207d578182fd5b6000602082840312156125f3578081fd5b5035919050565b60006020828403121561260b578081fd5b5051919050565b60008251815b818110156126325760208186018101518583015201612618565b818111156126405782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b9115158252602082015260400190565b92151583526020830191909152604082015260600190565b60208101600383106126dd57fe5b91905290565b6020808252601d908201527f444f444f5f51554f54455f42414c414e43455f4e4f545f454e4f554748000000604082015260600190565b6020808252600d908201526c494e56414c49445f434c41494d60981b604082015260600190565b6020808252600a908201526904e4f5f424153455f4c560b41b604082015260600190565b60208082526018908201527f4445504f5349545f424153455f4e4f545f414c4c4f5745440000000000000000604082015260600190565b60208082526019908201527f4445504f5349545f51554f54455f4e4f545f414c4c4f57454400000000000000604082015260600190565b60208082526009908201526814915153951490539560ba1b604082015260600190565b6020808252600b908201526a04e4f5f51554f54455f4c560ac1b604082015260600190565b6020808252601c908201527f51554f54455f42414c414e43455f4c494d49545f455843454544454400000000604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252600e908201526d2224ab24a224a723afa2a92927a960911b604082015260600190565b60208082526023908201527f4c505f51554f54455f4341504954414c5f42414c414e43455f4e4f545f454e4f6040820152620aa8e960eb1b606082015260800190565b6020808252601b908201527f424153455f42414c414e43455f4c494d49545f45584345454445440000000000604082015260600190565b60208082526009908201526829aaa12fa2a92927a960b91b604082015260600190565b6020808252601c908201527f444f444f5f424153455f42414c414e43455f4e4f545f454e4f55474800000000604082015260600190565b6020808252600d908201526c24a72b20a624a22fa7aba722a960991b604082015260600190565b6020808252600e908201526d1411539053151657d15610d1515160921b604082015260600190565b6020808252600b908201526a1113d113d7d0d313d4d15160aa1b604082015260600190565b6020808252600990820152682727aa2fa7aba722a960b91b604082015260600190565b60208082526009908201526820a2222fa2a92927a960b91b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526022908201527f4c505f424153455f4341504954414c5f42414c414e43455f4e4f545f454e4f5560408201526108e960f31b606082015260800190565b60208082526009908201526826aaa62fa2a92927a960b91b604082015260600190565b6020808252600f908201526e1053149150511657d0d31052535151608a1b604082015260600190565b6020808252600f908201526e1113d113d7d393d517d0d313d4d151608a1b604082015260600190565b90815260200190565b9182521515602082015260400190565b91825260208201526040019056fee89c586bd81ee35a18f7eac22a732b56e589a2821497cce12a0208828540a36d581f351e2bdb9fa9021bb2a24def989f06ac236f8a92aac14bcbc618ddf3826aa2646970667358221220f817095e7822ba6073f1c4d1397cd91906e8e24ff2aa07bd7a3d88e5a48f19e964736f6c63430006090033", "immutableReferences": {}, "sourceMap": "618:11095:24:-:0;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "618:11095:24:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6601:882;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;9778:964;;;;;;;;;:::i;2949:133:27:-;;;:::i;2006:43::-;;;:::i;4161:1196:24:-;;;;;;;;;:::i;264:22:37:-;;;:::i;:::-;;;;;;;;1112:36:27;;;:::i;1604:31::-;;;:::i;:::-;;;;;;;;7489:835:24;;;;;;;;;:::i;3873:1392:26:-;;;:::i;:::-;;1688:42:27;;;:::i;1751:121:24:-;;;;;;;;;:::i;3243:135:27:-;;;:::i;9385:387:24:-;;;;;;;;;:::i;2545:161:26:-;;;;;;;;;:::i;1202:27:27:-;;;:::i;1271:::-;;;:::i;1352:::-;;;:::i;912:32::-;;;:::i;963:225:37:-;;;:::i;3433:87:27:-;;;:::i;2418:847:24:-;;;;;;;;;:::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;5363:1175:24:-;;;;;;;;;:::i;9000:379::-;;;;;;;;;:::i;1071:35:27:-;;;:::i;1002:28::-;;;:::i;839:34::-;;;:::i;3271:831:24:-;;;;;;;;;:::i;1511:28:27:-;;;:::i;1849:36::-;;;:::i;1641:41::-;;;:::i;1878:125:24:-;;;;;;;;;:::i;1545:28:27:-;;;:::i;5324:581:26:-;;;;;;;;;:::i;2251:109:24:-;;;:::i;798:35:27:-;;;:::i;1957:43::-;;;:::i;2138:107:24:-;;;:::i;1385:28:27:-;;;:::i;1808:35::-;;;:::i;879:27::-;;;:::i;1736:29::-;;;:::i;1579:18::-;;;:::i;2381:158:26:-;;;;;;;;;:::i;5504:799:25:-;;;:::i;10748:963:24:-;;;;;;;;;:::i;737:220:37:-;;;;;;;;;:::i;2009:123:24:-;;;;;;;;;:::i;3088:149:27:-;;;;;;;;;:::i;1622:123:24:-;;;;;;;;;:::i;4819:679:25:-;;;:::i;:::-;;;;;;;;;6601:882:24;515:9:39;;6720:7:24;;-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;;;1522:8:24;::::1;548:16:39::0;1522:8:24::1;1521:9;1513:33;;;;-1:-1:-1::0;;;1513:33:24::1;;;;;;;;;6743:22:::2;6768:29;6786:10;6768:17;:29::i;:::-;6743:54;;6807:15;6825:36;6850:10;6825:24;:36::i;:::-;6807:54;;6925:15;6943:39;6967:14;6943:23;:39::i;:::-;6925:57;;7011:14;7000:7;:25;;6992:52;;;;-1:-1:-1::0;;;6992:52:24::2;;;;;;;;;7107:27;::::0;:47:::2;::::0;7139:14;7107:47:::2;:31;:47;:::i;:::-;7077:27;:77:::0;7164:38:::2;7182:10;7194:7:::0;7164:17:::2;:38::i;:::-;7212:55;7235:2:::0;7239:27:::2;:14:::0;7258:7;7239:27:::2;:18;:27;:::i;:::-;7212:22;:55::i;:::-;7277:26;7295:7;7277:17;:26::i;:::-;7340:2;-1:-1:-1::0;;;;;7319:56:24::2;7328:10;-1:-1:-1::0;;;;;7319:56:24::2;-1:-1:-1::0;;;;;;;;;;;7344:5:24::2;7351:14;7367:7;7319:56;;;;;;;;;;;;;;;;;7404:10;-1:-1:-1::0;;;;;7390:41:24::2;-1:-1:-1::0;;;;;;;;;;;7416:5:24::2;7423:7;7390:41;;;;;;;;;;;;;;;;7449:27;:14:::0;7468:7;7449:27:::2;:18;:27;:::i;:::-;585:9:39::0;:17;;-1:-1:-1;;;;585:17:39;;;7442:34:24;6601:882;-1:-1:-1;;;;;6601:882:24:o;9778:964::-;9848:15;9893;;9883:6;:25;;9875:67;;;;-1:-1:-1;;;9875:67:24;;;;;;;;;9970:23;9956:10;;;;:37;;;;;;;;;9952:784;;;10009:17;10029:46;10048:26;;10029:14;;:18;;:46;;;;:::i;:::-;10009:66;;10089:13;10105:16;:14;:16::i;:::-;10089:32;;10135:18;10156:33;10172:9;10183:5;10156:15;:33::i;:::-;10135:54;;10203:19;10225:137;10284:15;;10317:3;;10338:10;10225:41;:137::i;:::-;10203:159;;10430:31;10464:149;10523:27;10543:6;10523:15;;:19;;:27;;;;:::i;:::-;10568:3;;10589:10;10464:41;:149::i;:::-;10430:183;-1:-1:-1;10634:52:24;10650:35;10430:183;10678:6;10650:35;:27;:35;:::i;:::-;10634:11;;:52;:15;:52;:::i;:::-;10627:59;;;;;;;;;9952:784;-1:-1:-1;10724:1:24;9952:784;9778:964;;;:::o;2949:133:27:-;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;4161:1196:24:-;515:9:39;;4293:7:24;;-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;;;1522:8:24;::::1;548:16:39::0;1522:8:24::1;1521:9;1513:33;;;;-1:-1:-1::0;;;1513:33:24::1;;;;;;;;;4348:19:::2;4371;:17;:19::i;:::-;4345:45;;;4400:25;4428:22;:20;:22::i;:::-;4400:50;;4488:1;4468:17;:21;4460:45;;;;-1:-1:-1::0;;;4460:45:24::2;;;;;;;;;4516:27;4546:50;4584:11:::0;4546:29:::2;:6:::0;4557:17;4546:29:::2;:10;:29;:::i;:::-;:37:::0;:50:::2;:37;:50;:::i;:::-;4516:80;;4650:36;4675:10;4650:24;:36::i;:::-;4627:19;:59;;4606:141;;;;-1:-1:-1::0;;;4606:141:24::2;;;;;;;;;4811:15;4829:31;4853:6;4829:23;:31::i;:::-;4811:49;;4888:6;4878:7;:16;4870:43;;;;-1:-1:-1::0;;;4870:43:24::2;;;;;;;;;4976:27;::::0;:39:::2;::::0;5008:6;4976:39:::2;:31;:39;:::i;:::-;4946:27;:69:::0;5025:50:::2;5043:10;5055:19:::0;5025:17:::2;:50::i;:::-;5085:47;5108:2:::0;5112:19:::2;:6:::0;5123:7;5112:19:::2;:10;:19;:::i;5085:47::-;5142:26;5160:7;5142:17;:26::i;:::-;-1:-1:-1::0;;;;;5184:73:24;::::2;5193:10;-1:-1:-1::0;;;;;;;;;;;5209:5:24::2;5216:19;:6:::0;5227:7;5216:19:::2;:10;:19;:::i;:::-;5237;5184:73;;;;;;;;;;;;;;;;;5286:10;-1:-1:-1::0;;;;;5272:41:24::2;-1:-1:-1::0;;;;;;;;;;;5298:5:24::2;5305:7;5272:41;;;;;;;;;;;;;;;;5331:19;:6:::0;5342:7;5331:19:::2;:10;:19;:::i;:::-;585:9:39::0;:17;;-1:-1:-1;;;;585:17:39;;;5324:26:24;4161:1196;-1:-1:-1;;;;;;;4161:1196:24:o;264:22:37:-;;;-1:-1:-1;;;;;264:22:37;;:::o;1112:36:27:-;;;;:::o;1604:31::-;;;;;;:::o;7489:835:24:-;515:9:39;;7575:7:24;;-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;;;1522:8:24;::::1;548:16:39::0;1522:8:24::1;1521:9;1513:33;;;;-1:-1:-1::0;;;1513:33:24::1;;;;;;;;;7594:22:::2;7619:28;7636:10;7619:16;:28::i;:::-;7594:53;;7657:15;7675:35;7699:10;7675:23;:35::i;:::-;7657:53;;7774:15;7792:38;7815:14;7792:22;:38::i;:::-;7774:56;;7859:14;7848:7;:25;;7840:52;;;;-1:-1:-1::0;;;7840:52:24::2;;;;;;;;;7954:26;::::0;:46:::2;::::0;7985:14;7954:46:::2;:30;:46;:::i;:::-;7925:26;:75:::0;8010:37:::2;8027:10;8039:7:::0;8010:16:::2;:37::i;:::-;8057:54;8079:2:::0;8083:27:::2;:14:::0;8102:7;8083:27:::2;:18;:27;:::i;:::-;8057:21;:54::i;:::-;8121:25;8138:7;8121:16;:25::i;:::-;8183:2;-1:-1:-1::0;;;;;8162:55:24::2;8171:10;-1:-1:-1::0;;;;;8162:55:24::2;-1:-1:-1::0;;;;;;;;;;;8187:4:24::2;8193:14;8209:7;8162:55;;;;;;;;;;;;;;;;;8246:10;-1:-1:-1::0;;;;;8232:40:24::2;-1:-1:-1::0;;;;;;;;;;;8258:4:24::2;8264:7;8232:40;;;;;;;;3873:1392:26::0;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;1751:121:24:-;1806:7;1832:33;1846:10;1858:6;1832:13;:33::i;:::-;1825:40;1751:121;-1:-1:-1;;1751:121:24:o;3243:135:27:-;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;;;;;;;;;;9385:387:24;9445:17;9474:25;9502:22;:20;:22::i;:::-;9474:50;;9537:19;9560;:17;:19::i;:::-;9534:45;-1:-1:-1;;9593:22:24;9589:61;;9638:1;9631:8;;;;;;9589:61;9671:68;9721:17;9671:45;9704:11;9671:28;9696:2;9671:24;:28::i;:::-;:32;:45;:32;:45;:::i;:68::-;9659:80;9385:387;-1:-1:-1;;;;9385:387:24:o;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;2418:847:24:-;515:9:39;;2555:7:24;;-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;;;1278:23:24;::::1;548:16:39::0;1278:23:24::1;1270:61;;;;-1:-1:-1::0;;;1270:61:24::1;;;;;;;;;2581:19:::2;2604;:17;:19::i;:::-;2578:45;;;2633:25;2661:22;:20;:22::i;:::-;2633:50:::0;-1:-1:-1;2711:6:24;2731:22;2727:252:::2;;2837:23;:6:::0;2848:11;2837:23:::2;:10;:23;:::i;:::-;2827:33;;2727:252;;;2881:15:::0;;2877:102:::2;;2922:46;2956:11:::0;2922:29:::2;:6:::0;2933:17;2922:29:::2;:10;:29;:::i;:46::-;2912:56;;2877:102;3011:41;3033:10;3045:6;3011:21;:41::i;:::-;3062:30;3080:2;3084:7;3062:17;:30::i;:::-;3132:27;::::0;:39:::2;::::0;3164:6;3132:39:::2;:31;:39;:::i;:::-;3102:27;:69:::0;3187:47:::2;::::0;-1:-1:-1;;;;;3187:47:24;::::2;::::0;3195:10:::2;::::0;3187:47:::2;::::0;::::2;::::0;3211:5:::2;::::0;3218:6;;3226:7;;3187:47:::2;;;;;;;;;;585:9:39::0;:17;;-1:-1:-1;;;;585:17:39;;;3251:7:24;2418:847;-1:-1:-1;;;;;2418:847:24: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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1771:30;;;;:::o;292:26:37:-;;;-1:-1:-1;;;;;292:26:37;;:::o;1036:29:27:-;;;;;;;;;:::o;5363:1175:24:-;515:9:39;;5494:7:24;;-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;;;1522:8:24;::::1;548:16:39::0;1522:8:24::1;1521:9;1513:33;;;;-1:-1:-1::0;;;1513:33:24::1;;;;;;;;;5547:18:::2;5571:19;:17;:19::i;:::-;5546:44;;;5600:24;5627:21;:19;:21::i;:::-;5600:48;;5685:1;5666:16;:20;5658:43;;;;-1:-1:-1::0;;;5658:43:24::2;;;;;;;;;5712:26;5741:48;5778:10:::0;5741:28:::2;:6:::0;5752:16;5741:28:::2;:10;:28;:::i;:48::-;5712:77;;5842:35;5866:10;5842:23;:35::i;:::-;5820:18;:57;;5799:138;;;;-1:-1:-1::0;;;5799:138:24::2;;;;;;;;;6001:15;6019:30;6042:6;6019:22;:30::i;:::-;6001:48;;6078:6;6067:7;:17;;6059:44;;;;-1:-1:-1::0;;;6059:44:24::2;;;;;;;;;6165:26;::::0;:38:::2;::::0;6196:6;6165:38:::2;:30;:38;:::i;:::-;6136:26;:67:::0;6213:48:::2;6230:10;6242:18:::0;6213:16:::2;:48::i;:::-;6271:46;6293:2:::0;6297:19:::2;:6:::0;6308:7;6297:19:::2;:10;:19;:::i;6271:46::-;6327:25;6344:7;6327:16;:25::i;:::-;-1:-1:-1::0;;;;;6368:71:24;::::2;6377:10;-1:-1:-1::0;;;;;;;;;;;6393:4:24::2;6399:19;:6:::0;6410:7;6399:19:::2;:10;:19;:::i;:::-;6420:18;6368:71;;;;;;;;;;;;;;;;;6468:10;-1:-1:-1::0;;;;;6454:40:24::2;-1:-1:-1::0;;;;;;;;;;;6480:4:24::2;6486:7;6454:40;;;;;;;;9000:379:::0;9059:17;9088:24;9115:21;:19;:21::i;:::-;9088:48;;9147:18;9171:19;:17;:19::i;:::-;-1:-1:-1;9146:44:24;-1:-1:-1;9204:21:24;9200:60;;9248:1;9241:8;;;;;;9200:60;9281:65;9329:16;9281:43;9313:10;9281:27;9305:2;9281:23;:27::i;1071:35:27:-;;;;:::o;1002:28::-;;;;;;:::o;839:34::-;;;-1:-1:-1;;;839:34:27;;;;;:::o;3271:831:24:-;515:9:39;;3406:7:24;;-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;;;1403:22:24;::::1;548:16:39::0;1403:22:24::1;1395:59;;;;-1:-1:-1::0;;;1395:59:24::1;;;;;;;;;3430:18:::2;3454:19;:17;:19::i;:::-;3429:44;;;3483:24;3510:21;:19;:21::i;:::-;3483:48:::0;-1:-1:-1;3559:6:24;3579:21;3575:246:::2;;3683:22;:6:::0;3694:10;3683:22:::2;:10;:22;:::i;:::-;3673:32;;3575:246;;;3726:14:::0;;3722:99:::2;;3766:44;3799:10:::0;3766:28:::2;:6:::0;3777:16;3766:28:::2;:10;:28;:::i;:44::-;3756:54;;3722:99;3853:40;3874:10;3886:6;3853:20;:40::i;:::-;3903:29;3920:2;3924:7;3903:16;:29::i;:::-;3971:26;::::0;:38:::2;::::0;4002:6;3971:38:::2;:30;:38;:::i;:::-;3942:26;:67:::0;4025:46:::2;::::0;-1:-1:-1;;;;;4025:46:24;::::2;::::0;4033:10:::2;::::0;4025:46:::2;::::0;::::2;::::0;4049:4:::2;::::0;4055:6;;4063:7;;4025:46:::2;;1511:28:27::0;;;;:::o;1849:36::-;;;-1:-1:-1;;;;;1849:36:27;;:::o;1641:41::-;;;;:::o;1878:125:24:-;1935:7;1961:35;1977:10;1989:6;1961:15;:35::i;1545:28:27:-;;;;:::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;2251:109:24:-;2297:7;2323:30;2342:10;2323:18;:30::i;798:35:27:-;;;-1:-1:-1;;;798:35:27;;;;;:::o;1957:43::-;;;;:::o;2138:107:24:-;2183:7;2209:29;2227:10;2209:17;:29::i;1385:28:27:-;;;-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;5504:799:25:-:0;5548:16;5577:18;5597:19;5620;:17;:19::i;:::-;5576:63;;-1:-1:-1;5576:63:25;-1:-1:-1;5667:23:25;5653:10;;;;:37;;;;;;;;;5649:648;;;5706:9;5718:134;5756:49;5789:15;;5756:28;5772:11;5756;:15;;:28;;;;:::i;:49::-;5823:15;;5718:20;:134::i;:::-;5706:146;;5870:53;5899:23;5915:3;;5920:1;5899:15;:23::i;:::-;5890:3;;5870:24;;379:6:36;;5870:24:25;:19;:24;:::i;:::-;:28;:53;:28;:53;:::i;:::-;5866:57;;5944:41;5965:16;:14;:16::i;:::-;5983:1;5944:20;:41::i;:::-;5937:48;;;;;;;5649:648;6016:9;6028:130;6066:46;6097:14;;6066:26;6081:10;6066;:14;;:26;;;;:::i;:46::-;6130:14;;6028:20;:130::i;:::-;6016:142;;6176:53;6205:23;6221:3;;6226:1;6205:15;:23::i;6176:53::-;6172:57;;6250:36;6266:16;:14;:16::i;:::-;6284:1;6250:15;:36::i;10748:963:24:-;10817:15;10862:14;;10852:6;:24;;10844:65;;;;-1:-1:-1;;;10844:65:24;;;;;;;;;10937:23;10923:10;;;;:37;;;;;;;;;10919:786;;;10976:18;10997:48;11017:27;;10997:15;;:19;;:48;;;;:::i;:::-;10976:69;;11059:13;11075:16;:14;:16::i;:::-;11059:32;;11105:18;11126:39;11147:10;11159:5;11126:20;:39::i;:::-;11105:60;;11179:18;11200:136;11259:14;;11291:3;;11312:10;11200:41;:136::i;:::-;11179:157;;11403:30;11436:148;11495:26;11514:6;11495:14;;:18;;:26;;;;:::i;737:220:37:-;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;2009:123:24:-;2065:7;2091:34;2106:10;2118:6;2091:14;:34::i;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;;;;1622:123:24;1678:7;1704:34;1719:10;1731:6;1704:14;:34::i;4819:679:25:-;4932:15;;4969:14;;4869:18;;;;;4997:10;;;;:31;;;;;;;;;4993:499;;;5052:26;;5080:27;;5044:64;;;;;;;;4993:499;5143:23;5129:10;;;;:37;;;;;;;;;5125:367;;;5182:21;5206:18;:16;:18::i;:::-;5246:26;;5182:42;;-1:-1:-1;5274:20:25;:1;5182:42;5274:20;:5;:20;:::i;:::-;5238:57;;;;;;;;;5125:367;5330:23;5316:10;;;;:37;;;;;;;;;5312:180;;;5369:20;5392:18;:16;:18::i;:::-;5369:41;-1:-1:-1;5432:19:25;:1;5369:41;5432:19;:5;:19;:::i;:::-;5453:27;;5424:57;;;;;;;;;5312:180;4819:679;;;;;:::o;934:134:41:-;992:7;1024:1;1019;:6;;1011:28;;;;-1:-1:-1;;;1011:28:41;;;;;;;;;-1:-1:-1;1056:5:41;;;934:134::o;8806:137:24:-;8895:21;;8882:54;;-1:-1:-1;;;8882:54:24;;-1:-1:-1;;;;;8895:21:24;;;;8882:40;;:54;;8923:4;;8929:6;;8882:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8806:137;;:::o;1763:187:26:-;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;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;392:115:36:-;455:7;379:6;481:13;:6;492:1;481:13;:10;:13;:::i;:::-;:19;;;;;;;392:115;-1:-1:-1;;;392:115:36:o;3310:569:35:-;3448:10;3504:12;3519:62;3539:37;3574:1;3539:30;3555:1;3558:10;3539:15;:30::i;:37::-;3578:2;3519:19;:62::i;:::-;3504:77;-1:-1:-1;3598:53:35;:46;379:6:36;3598:25:35;3504:77;379:6:36;3598:25:35;:8;:25;:::i;:46::-;:51;:53::i;:::-;3591:60;-1:-1:-1;3661:15:35;3679:56;3699:25;3591:60;379:6:36;3699:25:35;:8;:25;:::i;:::-;3726:8;:1;3732;3726:8;:5;:8;:::i;:::-;3679:19;:56::i;:::-;3661:74;-1:-1:-1;3823:49:35;3839:2;3843:28;379:6:36;3661:74:35;3843:28;:19;:28;:::i;:::-;3823:15;:49::i;:::-;3816:56;3310:569;-1:-1:-1;;;;;;3310:569:35:o;1074:157:41:-;1132:7;1163:5;;;1186:6;;;;1178:28;;;;-1:-1:-1;;;1178:28:41;;;;;;;;;1223:1;1074:157;-1:-1:-1;;;1074:157:41:o;281:217::-;339:7;362:6;358:45;;-1:-1:-1;391:1:41;384:8;;358:45;425:5;;;429:1;425;:5;:1;448:5;;;;;:10;440:32;;;;-1:-1:-1;;;440:32:41;;;;;;;;648:280;710:7;729:16;748:9;752:1;755;748:3;:9::i;:::-;729:28;-1:-1:-1;791:12:41;;;787:16;;817:13;;813:109;;-1:-1:-1;864:1:41;853:12;;-1:-1:-1;846:19:41;;813:109;-1:-1:-1;903:8:41;-1:-1:-1;896:15:41;;8665:135:24;8753:20;;8740:53;;-1:-1:-1;;;8740:53:24;;-1:-1:-1;;;;;8753:20:24;;;;8740:39;;:53;;8780:4;;8786:6;;8740:53;;;;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;2025:170::-;2115:26;;:38;;2146:6;2115:38;:30;:38;:::i;:::-;2086:26;:67;2168:20;;;;;;2175:6;;2183:4;;2168:20;;504:138:41;562:7;593:1;589;:5;581:32;;;;-1:-1:-1;;;581:32:41;;;;;;;;;634:1;630;:5;;;;1222:346:26;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;8522:137:24:-;8611:21;;8598:54;;-1:-1:-1;;;8598:54:24;;-1:-1:-1;;;;;8611:21:24;;;;8598:40;;:54;;8639:4;;8645:6;;8598:54;;;;645:123:36;713:7;739:22;759:1;739:15;:6;379;739:15;:10;:15;:::i;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;8381:135:24:-;8469:20;;8456:53;;-1:-1:-1;;;8456:53:24;;-1:-1:-1;;;;;8469:20:24;;;;8456:39;;:53;;8496:4;;8502:6;;8456:53;;;;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;2736:578:25:-;2787:21;2927:17;2947:46;2966:26;;2947:14;;:18;;:46;;;;:::i;:::-;2927:66;;3003:13;3019:16;:14;:16::i;:::-;3003:32;;3045:18;3066:33;3082:9;3093:5;3066:15;:33::i;:::-;3045:54;;3109:22;3134:121;3189:15;;3218:3;;3235:10;3134:41;:121::i;:::-;3109:146;;3272:35;3291:15;;3272:14;:18;;:35;;;;:::i;:::-;3265:42;;;;;;2736:578;:::o;4180:582::-;4231:20;4370:18;4391:48;4411:27;;4391:15;;:19;;:48;;;;:::i;:::-;4370:69;;4449:13;4465:16;:14;:16::i;:::-;4449:32;;4491:18;4512:39;4533:10;4545:5;4512:20;:39::i;:::-;4491:60;;4561:21;4585:120;4640:14;;4668:3;;4685:10;4585:41;:120::i;:::-;4561:144;;4722:33;4740:14;;4722:13;:17;;:33;;;;:::i;774:126:36:-;841:7;867:26;891:1;867:15;:6;379;867:15;:10;:15;:::i;1237:198:41:-;1318:1;1326;1322;1318:5;;:9;1352:77;1363:1;1359;:5;1352:77;;;1384:1;1380:5;;1417:1;1412;1408;1404;:5;;;;;;:9;1403:15;;;;;;1399:19;;1352:77;;;1237:198;;;;:::o;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;;;;;25745:54;;26855:35;;26845:2;;26904:1;;26894: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;27001:5;25518:13;25511:21;26979:5;26976:32;26966:2;;-1:-1;;27012: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;10963:271;;2498:5;24988:12;-1:-1;26481:101;26495:6;26492:1;26489:13;26481:101;;;2642:4;26562:11;;;;;26556:18;26543:11;;;26536:39;26510:10;26481:101;;;26597:6;26594:1;26591:13;26588:2;;;-1:-1;26653:6;26648:3;26644:16;26637:27;26588:2;-1:-1;2673:16;;;;;11097:137;-1:-1;;11097:137;11241:222;-1:-1;;;;;25745:54;;;;2178:37;;11368:2;11353:18;;11339:124;11470:349;-1:-1;;;;;25745:54;;;;2037:58;;11805:2;11790:18;;10914:37;11633:2;11618:18;;11604:215;11826:444;-1:-1;;;;;25745:54;;;2178:37;;25745:54;;;;12173:2;12158:18;;2178:37;12256:2;12241:18;;10914:37;;;;12009:2;11994:18;;11980:290;12617:210;25518:13;;25511:21;2292:34;;12738:2;12723:18;;12709:118;12834:321;25518:13;;25511:21;2292:34;;13141:2;13126:18;;10914:37;12983:2;12968:18;;12954:201;13162:432;25518:13;;25511:21;2292:34;;13497:2;13482:18;;10914:37;;;;13580:2;13565:18;;10914:37;13339:2;13324:18;;13310:284;13601:244;13739:2;13724:18;;26767:1;26757:12;;26747:2;;26773:9;26747:2;2783:61;;;13710:135;;13852:416;14052:2;14066:47;;;3081:2;14037:18;;;25286:19;3117:31;25326:14;;;3097:52;3168:12;;;14023:245;14275:416;14475:2;14489:47;;;3419:2;14460:18;;;25286:19;-1:-1;;;25326:14;;;3435:36;3490:12;;;14446:245;14698:416;14898:2;14912:47;;;3741:2;14883:18;;;25286:19;-1:-1;;;25326:14;;;3757:33;3809:12;;;14869:245;15121:416;15321:2;15335:47;;;4060:2;15306:18;;;25286:19;4096:26;25326:14;;;4076:47;4142:12;;;15292:245;15544:416;15744:2;15758:47;;;4393:2;15729:18;;;25286:19;4429:27;25326:14;;;4409:48;4476:12;;;15715:245;15967:416;16167:2;16181:47;;;4727:1;16152:18;;;25286:19;-1:-1;;;25326:14;;;4742:32;4793:12;;;16138:245;16390:416;16590:2;16604:47;;;5044:2;16575:18;;;25286:19;-1:-1;;;25326:14;;;5060:34;5113:12;;;16561:245;16813:416;17013:2;17027:47;;;5364:2;16998:18;;;25286:19;5400:30;25326:14;;;5380:51;5450:12;;;16984:245;17236:416;17436:2;17450:47;;;17421:18;;;25286:19;5737:34;25326:14;;;5717:55;5791:12;;;17407:245;17659:416;17859:2;17873:47;;;6042:2;17844:18;;;25286:19;-1:-1;;;25326:14;;;6058:37;6114:12;;;17830:245;18082:416;18282:2;18296:47;;;6365:2;18267:18;;;25286:19;6401:34;25326:14;;;6381:55;-1:-1;;;6456:12;;;6449:27;6495:12;;;18253:245;18505:416;18705:2;18719:47;;;6746:2;18690:18;;;25286:19;6782:29;25326:14;;;6762:50;6831:12;;;18676:245;18928:416;19128:2;19142:47;;;7082:1;19113:18;;;25286:19;-1:-1;;;25326:14;;;7097:32;7148:12;;;19099:245;19351:416;19551:2;19565:47;;;7399:2;19536:18;;;25286:19;7435:30;25326:14;;;7415:51;7485:12;;;19522:245;19774:416;19974:2;19988:47;;;7736:2;19959:18;;;25286:19;-1:-1;;;25326:14;;;7752:36;7807:12;;;19945:245;20197:416;20397:2;20411:47;;;8058:2;20382:18;;;25286:19;-1:-1;;;25326:14;;;8074:37;8130:12;;;20368:245;20620:416;20820:2;20834:47;;;8381:2;20805:18;;;25286:19;-1:-1;;;25326:14;;;8397:34;8450:12;;;20791:245;21043:416;21243:2;21257:47;;;8701:1;21228:18;;;25286:19;-1:-1;;;25326:14;;;8716:32;8767:12;;;21214:245;21466:416;21666:2;21680:47;;;9018:1;21651:18;;;25286:19;-1:-1;;;25326:14;;;9033:32;9084:12;;;21637:245;21889:416;22089:2;22103:47;;;9335:2;22074:18;;;25286:19;9371:34;25326:14;;;9351:55;-1:-1;;;9426:12;;;9419:34;9472:12;;;22060:245;22312:416;22512:2;22526:47;;;9723:2;22497:18;;;25286:19;9759:34;25326:14;;;9739:55;-1:-1;;;9814:12;;;9807:26;9852:12;;;22483:245;22735:416;22935:2;22949:47;;;10103:1;22920:18;;;25286:19;-1:-1;;;25326:14;;;10118:32;10169:12;;;22906:245;23158:416;23358:2;23372:47;;;10420:2;23343:18;;;25286:19;-1:-1;;;25326:14;;;10436:38;10493:12;;;23329:245;23581:416;23781:2;23795:47;;;10744:2;23766:18;;;25286:19;-1:-1;;;25326:14;;;10760:38;10817:12;;;23752:245;24004:222;10914:37;;;24131:2;24116:18;;24102:124;24233:321;10914:37;;;25518:13;25511:21;24540:2;24525:18;;2292:34;24382:2;24367:18;;24353:201;24561:333;10914:37;;;24880:2;24865:18;;10914:37;24716:2;24701:18;;24687: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 {DecimalMath} from \"../lib/DecimalMath.sol\";\nimport {DODOMath} from \"../lib/DODOMath.sol\";\nimport {Types} from \"../lib/Types.sol\";\nimport {IDODOLpToken} from \"../intf/IDODOLpToken.sol\";\nimport {Storage} from \"./Storage.sol\";\nimport {Settlement} from \"./Settlement.sol\";\nimport {Pricing} from \"./Pricing.sol\";\n\n\n/**\n * @title LiquidityProvider\n * @author DODO Breeder\n *\n * @notice Functions for liquidity provider operations\n */\ncontract LiquidityProvider is Storage, Pricing, Settlement {\n using SafeMath for uint256;\n\n // ============ Events ============\n\n event Deposit(\n address indexed payer,\n address indexed receiver,\n bool isBaseToken,\n uint256 amount,\n uint256 lpTokenAmount\n );\n\n event Withdraw(\n address indexed payer,\n address indexed receiver,\n bool isBaseToken,\n uint256 amount,\n uint256 lpTokenAmount\n );\n\n event ChargePenalty(address indexed payer, bool isBaseToken, uint256 amount);\n\n // ============ Modifiers ============\n\n modifier depositQuoteAllowed() {\n require(_DEPOSIT_QUOTE_ALLOWED_, \"DEPOSIT_QUOTE_NOT_ALLOWED\");\n _;\n }\n\n modifier depositBaseAllowed() {\n require(_DEPOSIT_BASE_ALLOWED_, \"DEPOSIT_BASE_NOT_ALLOWED\");\n _;\n }\n\n modifier dodoNotClosed() {\n require(!_CLOSED_, \"DODO_CLOSED\");\n _;\n }\n\n // ============ Routine Functions ============\n\n function withdrawBase(uint256 amount) external returns (uint256) {\n return withdrawBaseTo(msg.sender, amount);\n }\n\n function depositBase(uint256 amount) external returns (uint256) {\n return depositBaseTo(msg.sender, amount);\n }\n\n function withdrawQuote(uint256 amount) external returns (uint256) {\n return withdrawQuoteTo(msg.sender, amount);\n }\n\n function depositQuote(uint256 amount) external returns (uint256) {\n return depositQuoteTo(msg.sender, amount);\n }\n\n function withdrawAllBase() external returns (uint256) {\n return withdrawAllBaseTo(msg.sender);\n }\n\n function withdrawAllQuote() external returns (uint256) {\n return withdrawAllQuoteTo(msg.sender);\n }\n\n // ============ Deposit Functions ============\n\n function depositQuoteTo(address to, uint256 amount)\n public\n preventReentrant\n depositQuoteAllowed\n returns (uint256)\n {\n (, uint256 quoteTarget) = getExpectedTarget();\n uint256 totalQuoteCapital = getTotalQuoteCapital();\n uint256 capital = amount;\n if (totalQuoteCapital == 0) {\n // give remaining quote token to lp as a gift\n capital = amount.add(quoteTarget);\n } else if (quoteTarget > 0) {\n capital = amount.mul(totalQuoteCapital).div(quoteTarget);\n }\n\n // settlement\n _quoteTokenTransferIn(msg.sender, amount);\n _mintQuoteCapital(to, capital);\n _TARGET_QUOTE_TOKEN_AMOUNT_ = _TARGET_QUOTE_TOKEN_AMOUNT_.add(amount);\n\n emit Deposit(msg.sender, to, false, amount, capital);\n return capital;\n }\n\n function depositBaseTo(address to, uint256 amount)\n public\n preventReentrant\n depositBaseAllowed\n returns (uint256)\n {\n (uint256 baseTarget, ) = getExpectedTarget();\n uint256 totalBaseCapital = getTotalBaseCapital();\n uint256 capital = amount;\n if (totalBaseCapital == 0) {\n // give remaining base token to lp as a gift\n capital = amount.add(baseTarget);\n } else if (baseTarget > 0) {\n capital = amount.mul(totalBaseCapital).div(baseTarget);\n }\n\n // settlement\n _baseTokenTransferIn(msg.sender, amount);\n _mintBaseCapital(to, capital);\n _TARGET_BASE_TOKEN_AMOUNT_ = _TARGET_BASE_TOKEN_AMOUNT_.add(amount);\n\n emit Deposit(msg.sender, to, true, amount, capital);\n return capital;\n }\n\n // ============ Withdraw Functions ============\n\n function withdrawQuoteTo(address to, uint256 amount)\n public\n preventReentrant\n dodoNotClosed\n returns (uint256)\n {\n // calculate capital\n (, uint256 quoteTarget) = getExpectedTarget();\n uint256 totalQuoteCapital = getTotalQuoteCapital();\n require(totalQuoteCapital > 0, \"NO_QUOTE_LP\");\n\n uint256 requireQuoteCapital = amount.mul(totalQuoteCapital).divCeil(quoteTarget);\n require(\n requireQuoteCapital <= getQuoteCapitalBalanceOf(msg.sender),\n \"LP_QUOTE_CAPITAL_BALANCE_NOT_ENOUGH\"\n );\n\n // handle penalty, penalty may exceed amount\n uint256 penalty = getWithdrawQuotePenalty(amount);\n require(penalty < amount, \"PENALTY_EXCEED\");\n\n // settlement\n _TARGET_QUOTE_TOKEN_AMOUNT_ = _TARGET_QUOTE_TOKEN_AMOUNT_.sub(amount);\n _burnQuoteCapital(msg.sender, requireQuoteCapital);\n _quoteTokenTransferOut(to, amount.sub(penalty));\n _donateQuoteToken(penalty);\n\n emit Withdraw(msg.sender, to, false, amount.sub(penalty), requireQuoteCapital);\n emit ChargePenalty(msg.sender, false, penalty);\n\n return amount.sub(penalty);\n }\n\n function withdrawBaseTo(address to, uint256 amount)\n public\n preventReentrant\n dodoNotClosed\n returns (uint256)\n {\n // calculate capital\n (uint256 baseTarget, ) = getExpectedTarget();\n uint256 totalBaseCapital = getTotalBaseCapital();\n require(totalBaseCapital > 0, \"NO_BASE_LP\");\n\n uint256 requireBaseCapital = amount.mul(totalBaseCapital).divCeil(baseTarget);\n require(\n requireBaseCapital <= getBaseCapitalBalanceOf(msg.sender),\n \"LP_BASE_CAPITAL_BALANCE_NOT_ENOUGH\"\n );\n\n // handle penalty, penalty may exceed amount\n uint256 penalty = getWithdrawBasePenalty(amount);\n require(penalty <= amount, \"PENALTY_EXCEED\");\n\n // settlement\n _TARGET_BASE_TOKEN_AMOUNT_ = _TARGET_BASE_TOKEN_AMOUNT_.sub(amount);\n _burnBaseCapital(msg.sender, requireBaseCapital);\n _baseTokenTransferOut(to, amount.sub(penalty));\n _donateBaseToken(penalty);\n\n emit Withdraw(msg.sender, to, true, amount.sub(penalty), requireBaseCapital);\n emit ChargePenalty(msg.sender, true, penalty);\n\n return amount.sub(penalty);\n }\n\n // ============ Withdraw all Functions ============\n\n function withdrawAllQuoteTo(address to)\n public\n preventReentrant\n dodoNotClosed\n returns (uint256)\n {\n uint256 withdrawAmount = getLpQuoteBalance(msg.sender);\n uint256 capital = getQuoteCapitalBalanceOf(msg.sender);\n\n // handle penalty, penalty may exceed amount\n uint256 penalty = getWithdrawQuotePenalty(withdrawAmount);\n require(penalty <= withdrawAmount, \"PENALTY_EXCEED\");\n\n // settlement\n _TARGET_QUOTE_TOKEN_AMOUNT_ = _TARGET_QUOTE_TOKEN_AMOUNT_.sub(withdrawAmount);\n _burnQuoteCapital(msg.sender, capital);\n _quoteTokenTransferOut(to, withdrawAmount.sub(penalty));\n _donateQuoteToken(penalty);\n\n emit Withdraw(msg.sender, to, false, withdrawAmount, capital);\n emit ChargePenalty(msg.sender, false, penalty);\n\n return withdrawAmount.sub(penalty);\n }\n\n function withdrawAllBaseTo(address to) public preventReentrant dodoNotClosed returns (uint256) {\n uint256 withdrawAmount = getLpBaseBalance(msg.sender);\n uint256 capital = getBaseCapitalBalanceOf(msg.sender);\n\n // handle penalty, penalty may exceed amount\n uint256 penalty = getWithdrawBasePenalty(withdrawAmount);\n require(penalty <= withdrawAmount, \"PENALTY_EXCEED\");\n\n // settlement\n _TARGET_BASE_TOKEN_AMOUNT_ = _TARGET_BASE_TOKEN_AMOUNT_.sub(withdrawAmount);\n _burnBaseCapital(msg.sender, capital);\n _baseTokenTransferOut(to, withdrawAmount.sub(penalty));\n _donateBaseToken(penalty);\n\n emit Withdraw(msg.sender, to, true, withdrawAmount, capital);\n emit ChargePenalty(msg.sender, true, penalty);\n\n return withdrawAmount.sub(penalty);\n }\n\n // ============ Helper Functions ============\n\n function _mintBaseCapital(address user, uint256 amount) internal {\n IDODOLpToken(_BASE_CAPITAL_TOKEN_).mint(user, amount);\n }\n\n function _mintQuoteCapital(address user, uint256 amount) internal {\n IDODOLpToken(_QUOTE_CAPITAL_TOKEN_).mint(user, amount);\n }\n\n function _burnBaseCapital(address user, uint256 amount) internal {\n IDODOLpToken(_BASE_CAPITAL_TOKEN_).burn(user, amount);\n }\n\n function _burnQuoteCapital(address user, uint256 amount) internal {\n IDODOLpToken(_QUOTE_CAPITAL_TOKEN_).burn(user, amount);\n }\n\n // ============ Getter Functions ============\n\n function getLpBaseBalance(address lp) public view returns (uint256 lpBalance) {\n uint256 totalBaseCapital = getTotalBaseCapital();\n (uint256 baseTarget, ) = getExpectedTarget();\n if (totalBaseCapital == 0) {\n return 0;\n }\n lpBalance = getBaseCapitalBalanceOf(lp).mul(baseTarget).div(totalBaseCapital);\n return lpBalance;\n }\n\n function getLpQuoteBalance(address lp) public view returns (uint256 lpBalance) {\n uint256 totalQuoteCapital = getTotalQuoteCapital();\n (, uint256 quoteTarget) = getExpectedTarget();\n if (totalQuoteCapital == 0) {\n return 0;\n }\n lpBalance = getQuoteCapitalBalanceOf(lp).mul(quoteTarget).div(totalQuoteCapital);\n return lpBalance;\n }\n\n function getWithdrawQuotePenalty(uint256 amount) public view returns (uint256 penalty) {\n require(amount <= _QUOTE_BALANCE_, \"DODO_QUOTE_BALANCE_NOT_ENOUGH\");\n if (_R_STATUS_ == Types.RStatus.BELOW_ONE) {\n uint256 spareBase = _BASE_BALANCE_.sub(_TARGET_BASE_TOKEN_AMOUNT_);\n uint256 price = getOraclePrice();\n uint256 fairAmount = DecimalMath.mul(spareBase, price);\n uint256 targetQuote = DODOMath._SolveQuadraticFunctionForTarget(\n _QUOTE_BALANCE_,\n _K_,\n fairAmount\n );\n // if amount = _QUOTE_BALANCE_, div error\n uint256 targetQuoteWithWithdraw = DODOMath._SolveQuadraticFunctionForTarget(\n _QUOTE_BALANCE_.sub(amount),\n _K_,\n fairAmount\n );\n return targetQuote.sub(targetQuoteWithWithdraw.add(amount));\n } else {\n return 0;\n }\n }\n\n function getWithdrawBasePenalty(uint256 amount) public view returns (uint256 penalty) {\n require(amount <= _BASE_BALANCE_, \"DODO_BASE_BALANCE_NOT_ENOUGH\");\n if (_R_STATUS_ == Types.RStatus.ABOVE_ONE) {\n uint256 spareQuote = _QUOTE_BALANCE_.sub(_TARGET_QUOTE_TOKEN_AMOUNT_);\n uint256 price = getOraclePrice();\n uint256 fairAmount = DecimalMath.divFloor(spareQuote, price);\n uint256 targetBase = DODOMath._SolveQuadraticFunctionForTarget(\n _BASE_BALANCE_,\n _K_,\n fairAmount\n );\n // if amount = _BASE_BALANCE_, div error\n uint256 targetBaseWithWithdraw = DODOMath._SolveQuadraticFunctionForTarget(\n _BASE_BALANCE_.sub(amount),\n _K_,\n fairAmount\n );\n return targetBase.sub(targetBaseWithWithdraw.add(amount));\n } else {\n return 0;\n }\n }\n}\n", "sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/LiquidityProvider.sol", "ast": { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/LiquidityProvider.sol", "exportedSymbols": { "LiquidityProvider": [ 8369 ] }, "id": 8370, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 7349, "literals": [ "solidity", "0.6", ".9" ], "nodeType": "PragmaDirective", "src": "78:22:24" }, { "id": 7350, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "101:33:24" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol", "file": "../lib/SafeMath.sol", "id": 7352, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 11624, "src": "136:45:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7351, "name": "SafeMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "144:8:24", "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": 7354, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 11079, "src": "182:51:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7353, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "190:11:24", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/DODOMath.sol", "file": "../lib/DODOMath.sol", "id": 7356, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 10993, "src": "234:45:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7355, "name": "DODOMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "242:8:24", "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": 7358, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 11632, "src": "280:39:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7357, "name": "Types", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "288:5:24", "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": 7360, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 10537, "src": "320:54:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7359, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "328:12:24", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Storage.sol", "file": "./Storage.sol", "id": 7362, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 9614, "src": "375:38:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7361, "name": "Storage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "383:7:24", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Settlement.sol", "file": "./Settlement.sol", "id": 7364, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 9397, "src": "414:44:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7363, "name": "Settlement", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "422:10:24", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Pricing.sol", "file": "./Pricing.sol", "id": 7366, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 8854, "src": "459:38:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7365, "name": "Pricing", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "467:7:24", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 7368, "name": "Storage", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 9613, "src": "648:7:24", "typeDescriptions": { "typeIdentifier": "t_contract$_Storage_$9613", "typeString": "contract Storage" } }, "id": 7369, "nodeType": "InheritanceSpecifier", "src": "648:7:24" }, { "arguments": null, "baseName": { "contractScope": null, "id": 7370, "name": "Pricing", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 8853, "src": "657:7:24", "typeDescriptions": { "typeIdentifier": "t_contract$_Pricing_$8853", "typeString": "contract Pricing" } }, "id": 7371, "nodeType": "InheritanceSpecifier", "src": "657:7:24" }, { "arguments": null, "baseName": { "contractScope": null, "id": 7372, "name": "Settlement", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 9396, "src": "666:10:24", "typeDescriptions": { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } }, "id": 7373, "nodeType": "InheritanceSpecifier", "src": "666:10:24" } ], "contractDependencies": [ 8853, 9396, 9613, 11166, 11296 ], "contractKind": "contract", "documentation": { "id": 7367, "nodeType": "StructuredDocumentation", "src": "500:117:24", "text": " @title LiquidityProvider\n @author DODO Breeder\n @notice Functions for liquidity provider operations" }, "fullyImplemented": true, "id": 8369, "linearizedBaseContracts": [ 8369, 9396, 8853, 9613, 11296, 11166 ], "name": "LiquidityProvider", "nodeType": "ContractDefinition", "nodes": [ { "id": 7376, "libraryName": { "contractScope": null, "id": 7374, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 11623, "src": "689:8:24", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$11623", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "683:27:24", "typeName": { "id": 7375, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "702:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "anonymous": false, "documentation": null, "id": 7388, "name": "Deposit", "nodeType": "EventDefinition", "parameters": { "id": 7387, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7378, "indexed": true, "mutability": "mutable", "name": "payer", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7388, "src": "780:21:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7377, "name": "address", "nodeType": "ElementaryTypeName", "src": "780:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7380, "indexed": true, "mutability": "mutable", "name": "receiver", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7388, "src": "811:24:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7379, "name": "address", "nodeType": "ElementaryTypeName", "src": "811:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7382, "indexed": false, "mutability": "mutable", "name": "isBaseToken", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7388, "src": "845:16:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 7381, "name": "bool", "nodeType": "ElementaryTypeName", "src": "845:4:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7384, "indexed": false, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7388, "src": "871:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7383, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "871:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7386, "indexed": false, "mutability": "mutable", "name": "lpTokenAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7388, "src": "895:21:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7385, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "895:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "770:152:24" }, "src": "757:166:24" }, { "anonymous": false, "documentation": null, "id": 7400, "name": "Withdraw", "nodeType": "EventDefinition", "parameters": { "id": 7399, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7390, "indexed": true, "mutability": "mutable", "name": "payer", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7400, "src": "953:21:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7389, "name": "address", "nodeType": "ElementaryTypeName", "src": "953:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7392, "indexed": true, "mutability": "mutable", "name": "receiver", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7400, "src": "984:24:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7391, "name": "address", "nodeType": "ElementaryTypeName", "src": "984:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7394, "indexed": false, "mutability": "mutable", "name": "isBaseToken", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7400, "src": "1018:16:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 7393, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1018:4:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7396, "indexed": false, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7400, "src": "1044:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7395, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1044:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7398, "indexed": false, "mutability": "mutable", "name": "lpTokenAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7400, "src": "1068:21:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7397, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1068:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "943:152:24" }, "src": "929:167:24" }, { "anonymous": false, "documentation": null, "id": 7408, "name": "ChargePenalty", "nodeType": "EventDefinition", "parameters": { "id": 7407, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7402, "indexed": true, "mutability": "mutable", "name": "payer", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7408, "src": "1122:21:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7401, "name": "address", "nodeType": "ElementaryTypeName", "src": "1122:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7404, "indexed": false, "mutability": "mutable", "name": "isBaseToken", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7408, "src": "1145:16:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 7403, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1145:4:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7406, "indexed": false, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7408, "src": "1163:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7405, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1163:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1121:57:24" }, "src": "1102:77:24" }, { "body": { "id": 7416, "nodeType": "Block", "src": "1260:89:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7411, "name": "_DEPOSIT_QUOTE_ALLOWED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9427, "src": "1278:23:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4445504f5349545f51554f54455f4e4f545f414c4c4f574544", "id": 7412, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1303:27:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_3f8ca46e1665f66396f293f9a520e0b7eba90c16ed34c9b5d30b4532a06b94ae", "typeString": "literal_string \"DEPOSIT_QUOTE_NOT_ALLOWED\"" }, "value": "DEPOSIT_QUOTE_NOT_ALLOWED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_3f8ca46e1665f66396f293f9a520e0b7eba90c16ed34c9b5d30b4532a06b94ae", "typeString": "literal_string \"DEPOSIT_QUOTE_NOT_ALLOWED\"" } ], "id": 7410, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1270:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7413, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1270:61:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7414, "nodeType": "ExpressionStatement", "src": "1270:61:24" }, { "id": 7415, "nodeType": "PlaceholderStatement", "src": "1341:1:24" } ] }, "documentation": null, "id": 7417, "name": "depositQuoteAllowed", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 7409, "nodeType": "ParameterList", "parameters": [], "src": "1257:2:24" }, "src": "1229:120:24", "virtual": false, "visibility": "internal" }, { "body": { "id": 7425, "nodeType": "Block", "src": "1385:87:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7420, "name": "_DEPOSIT_BASE_ALLOWED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9429, "src": "1403:22:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4445504f5349545f424153455f4e4f545f414c4c4f574544", "id": 7421, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1427:26:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_2e520f2f988e5e849fb2744d0cdabd1103964b7b504d67387f2f6654882bc899", "typeString": "literal_string \"DEPOSIT_BASE_NOT_ALLOWED\"" }, "value": "DEPOSIT_BASE_NOT_ALLOWED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_2e520f2f988e5e849fb2744d0cdabd1103964b7b504d67387f2f6654882bc899", "typeString": "literal_string \"DEPOSIT_BASE_NOT_ALLOWED\"" } ], "id": 7419, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1395:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7422, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1395:59:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7423, "nodeType": "ExpressionStatement", "src": "1395:59:24" }, { "id": 7424, "nodeType": "PlaceholderStatement", "src": "1464:1:24" } ] }, "documentation": null, "id": 7426, "name": "depositBaseAllowed", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 7418, "nodeType": "ParameterList", "parameters": [], "src": "1382:2:24" }, "src": "1355:117:24", "virtual": false, "visibility": "internal" }, { "body": { "id": 7435, "nodeType": "Block", "src": "1503:61:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7430, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "1521:9:24", "subExpression": { "argumentTypes": null, "id": 7429, "name": "_CLOSED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9425, "src": "1522:8:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "444f444f5f434c4f534544", "id": 7431, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1532:13:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_b376000e0a4ab5aa456645b38033c091a45a656f290df894531d9e6e6accb956", "typeString": "literal_string \"DODO_CLOSED\"" }, "value": "DODO_CLOSED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_b376000e0a4ab5aa456645b38033c091a45a656f290df894531d9e6e6accb956", "typeString": "literal_string \"DODO_CLOSED\"" } ], "id": 7428, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1513:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7432, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1513:33:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7433, "nodeType": "ExpressionStatement", "src": "1513:33:24" }, { "id": 7434, "nodeType": "PlaceholderStatement", "src": "1556:1:24" } ] }, "documentation": null, "id": 7436, "name": "dodoNotClosed", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 7427, "nodeType": "ParameterList", "parameters": [], "src": "1500:2:24" }, "src": "1478:86:24", "virtual": false, "visibility": "internal" }, { "body": { "id": 7449, "nodeType": "Block", "src": "1687:58:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7444, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1719:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7445, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1719:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7446, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7438, "src": "1731:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7443, "name": "withdrawBaseTo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7908, "src": "1704:14:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (address,uint256) returns (uint256)" } }, "id": 7447, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1704:34:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7442, "id": 7448, "nodeType": "Return", "src": "1697:41:24" } ] }, "documentation": null, "functionSelector": "f98bea15", "id": 7450, "implemented": true, "kind": "function", "modifiers": [], "name": "withdrawBase", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7439, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7438, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7450, "src": "1644:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7437, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1644:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1643:16:24" }, "returnParameters": { "id": 7442, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7441, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7450, "src": "1678:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7440, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1678:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1677:9:24" }, "scope": 8369, "src": "1622:123:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 7463, "nodeType": "Block", "src": "1815:57:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7458, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1846:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7459, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1846:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7460, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7452, "src": "1858:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7457, "name": "depositBaseTo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7682, "src": "1832:13:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (address,uint256) returns (uint256)" } }, "id": 7461, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1832:33:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7456, "id": 7462, "nodeType": "Return", "src": "1825:40:24" } ] }, "documentation": null, "functionSelector": "27bed8ee", "id": 7464, "implemented": true, "kind": "function", "modifiers": [], "name": "depositBase", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7453, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7452, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7464, "src": "1772:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7451, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1772:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1771:16:24" }, "returnParameters": { "id": 7456, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7455, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7464, "src": "1806:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7454, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1806:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1805:9:24" }, "scope": 8369, "src": "1751:121:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 7477, "nodeType": "Block", "src": "1944:59:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7472, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1977:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7473, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1977:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7474, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7466, "src": "1989:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7471, "name": "withdrawQuoteTo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7795, "src": "1961:15:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (address,uint256) returns (uint256)" } }, "id": 7475, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1961:35:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7470, "id": 7476, "nodeType": "Return", "src": "1954:42:24" } ] }, "documentation": null, "functionSelector": "c0a5f6ff", "id": 7478, "implemented": true, "kind": "function", "modifiers": [], "name": "withdrawQuote", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7467, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7466, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7478, "src": "1901:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7465, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1901:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1900:16:24" }, "returnParameters": { "id": 7470, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7469, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7478, "src": "1935:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7468, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1935:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1934:9:24" }, "scope": 8369, "src": "1878:125:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 7491, "nodeType": "Block", "src": "2074:58:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7486, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2106:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7487, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2106:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7488, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7480, "src": "2118:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7485, "name": "depositQuoteTo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7598, "src": "2091:14:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (address,uint256) returns (uint256)" } }, "id": 7489, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2091:34:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7484, "id": 7490, "nodeType": "Return", "src": "2084:41:24" } ] }, "documentation": null, "functionSelector": "f3ae6c5f", "id": 7492, "implemented": true, "kind": "function", "modifiers": [], "name": "depositQuote", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7481, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7480, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7492, "src": "2031:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7479, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2031:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2030:16:24" }, "returnParameters": { "id": 7484, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7483, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7492, "src": "2065:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7482, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2065:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2064:9:24" }, "scope": 8369, "src": "2009:123:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 7502, "nodeType": "Block", "src": "2192:53:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7498, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2227:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7499, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2227:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 7497, "name": "withdrawAllBaseTo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8078, "src": "2209:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_uint256_$", "typeString": "function (address) returns (uint256)" } }, "id": 7500, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2209:29:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7496, "id": 7501, "nodeType": "Return", "src": "2202:36:24" } ] }, "documentation": null, "functionSelector": "d47eaa37", "id": 7503, "implemented": true, "kind": "function", "modifiers": [], "name": "withdrawAllBase", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7493, "nodeType": "ParameterList", "parameters": [], "src": "2162:2:24" }, "returnParameters": { "id": 7496, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7495, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7503, "src": "2183:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7494, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2183:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2182:9:24" }, "scope": 8369, "src": "2138:107:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 7513, "nodeType": "Block", "src": "2306:54:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7509, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2342:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7510, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2342:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 7508, "name": "withdrawAllQuoteTo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7993, "src": "2323:18:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_uint256_$", "typeString": "function (address) returns (uint256)" } }, "id": 7511, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2323:30:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7507, "id": 7512, "nodeType": "Return", "src": "2316:37:24" } ] }, "documentation": null, "functionSelector": "c59203af", "id": 7514, "implemented": true, "kind": "function", "modifiers": [], "name": "withdrawAllQuote", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7504, "nodeType": "ParameterList", "parameters": [], "src": "2276:2:24" }, "returnParameters": { "id": 7507, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7506, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7514, "src": "2297:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7505, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2297:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2296:9:24" }, "scope": 8369, "src": "2251:109:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 7597, "nodeType": "Block", "src": "2568:697:24", "statements": [ { "assignments": [ null, 7528 ], "declarations": [ null, { "constant": false, "id": 7528, "mutability": "mutable", "name": "quoteTarget", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7597, "src": "2581:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7527, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2581:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7531, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7529, "name": "getExpectedTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8733, "src": "2604:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$", "typeString": "function () view returns (uint256,uint256)" } }, "id": 7530, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2604:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "VariableDeclarationStatement", "src": "2578:45:24" }, { "assignments": [ 7533 ], "declarations": [ { "constant": false, "id": 7533, "mutability": "mutable", "name": "totalQuoteCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7597, "src": "2633:25:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7532, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2633:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7536, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7534, "name": "getTotalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9604, "src": "2661:20:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 7535, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2661:22:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "2633:50:24" }, { "assignments": [ 7538 ], "declarations": [ { "constant": false, "id": 7538, "mutability": "mutable", "name": "capital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7597, "src": "2693:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7537, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2693:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7540, "initialValue": { "argumentTypes": null, "id": 7539, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7518, "src": "2711:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "2693:24:24" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7543, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7541, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7533, "src": "2731:17:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 7542, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2752:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "2731:22:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7554, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7552, "name": "quoteTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7528, "src": "2881:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 7553, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2895:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "2881:15:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 7566, "nodeType": "IfStatement", "src": "2877:102:24", "trueBody": { "id": 7565, "nodeType": "Block", "src": "2898:81:24", "statements": [ { "expression": { "argumentTypes": null, "id": 7563, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7555, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7538, "src": "2912:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7561, "name": "quoteTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7528, "src": "2956:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7558, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7533, "src": "2933:17:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7556, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7518, "src": "2922:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7557, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "2922:10:24", "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": 7559, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2922:29:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7560, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "2922:33:24", "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": 7562, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2922:46:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2912:56:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7564, "nodeType": "ExpressionStatement", "src": "2912:56:24" } ] } }, "id": 7567, "nodeType": "IfStatement", "src": "2727:252:24", "trueBody": { "id": 7551, "nodeType": "Block", "src": "2755:116:24", "statements": [ { "expression": { "argumentTypes": null, "id": 7549, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7544, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7538, "src": "2827:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7547, "name": "quoteTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7528, "src": "2848:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7545, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7518, "src": "2837:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7546, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "2837:10:24", "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": 7548, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2837:23:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2827:33:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7550, "nodeType": "ExpressionStatement", "src": "2827:33:24" } ] } }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7569, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3033:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7570, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3033:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7571, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7518, "src": "3045:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7568, "name": "_quoteTokenTransferIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8967, "src": "3011:21:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7572, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3011:41:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7573, "nodeType": "ExpressionStatement", "src": "3011:41:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7575, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7516, "src": "3080:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 7576, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7538, "src": "3084:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7574, "name": "_mintQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8110, "src": "3062:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7577, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3062:30:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7578, "nodeType": "ExpressionStatement", "src": "3062:30:24" }, { "expression": { "argumentTypes": null, "id": 7584, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7579, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "3102:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7582, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7518, "src": "3164:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7580, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "3132:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7581, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "3132:31:24", "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": 7583, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3132:39:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3102:69:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7585, "nodeType": "ExpressionStatement", "src": "3102:69:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7587, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3195:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7588, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3195:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7589, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7516, "src": "3207:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "66616c7365", "id": 7590, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "3211:5:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, { "argumentTypes": null, "id": 7591, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7518, "src": "3218:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 7592, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7538, "src": "3226:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7586, "name": "Deposit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7388, "src": "3187:7:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,address,bool,uint256,uint256)" } }, "id": 7593, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3187:47:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7594, "nodeType": "EmitStatement", "src": "3182:52:24" }, { "expression": { "argumentTypes": null, "id": 7595, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7538, "src": "3251:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7526, "id": 7596, "nodeType": "Return", "src": "3244:14:24" } ] }, "documentation": null, "functionSelector": "5f179f64", "id": 7598, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 7521, "modifierName": { "argumentTypes": null, "id": 7520, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "2493:16:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2493:16:24" }, { "arguments": null, "id": 7523, "modifierName": { "argumentTypes": null, "id": 7522, "name": "depositQuoteAllowed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7417, "src": "2518:19:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2518:19:24" } ], "name": "depositQuoteTo", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7519, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7516, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7598, "src": "2442:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7515, "name": "address", "nodeType": "ElementaryTypeName", "src": "2442:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7518, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7598, "src": "2454:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7517, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2454:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2441:28:24" }, "returnParameters": { "id": 7526, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7525, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7598, "src": "2555:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7524, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2555:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2554:9:24" }, "scope": 8369, "src": "2418:847:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 7681, "nodeType": "Block", "src": "3419:683:24", "statements": [ { "assignments": [ 7612, null ], "declarations": [ { "constant": false, "id": 7612, "mutability": "mutable", "name": "baseTarget", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7681, "src": "3430:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7611, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3430:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, null ], "id": 7615, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7613, "name": "getExpectedTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8733, "src": "3454:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$", "typeString": "function () view returns (uint256,uint256)" } }, "id": 7614, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3454:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "VariableDeclarationStatement", "src": "3429:44:24" }, { "assignments": [ 7617 ], "declarations": [ { "constant": false, "id": 7617, "mutability": "mutable", "name": "totalBaseCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7681, "src": "3483:24:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7616, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3483:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7620, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7618, "name": "getTotalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9577, "src": "3510:19:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 7619, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3510:21:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3483:48:24" }, { "assignments": [ 7622 ], "declarations": [ { "constant": false, "id": 7622, "mutability": "mutable", "name": "capital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7681, "src": "3541:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7621, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3541:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7624, "initialValue": { "argumentTypes": null, "id": 7623, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7602, "src": "3559:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3541:24:24" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7627, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7625, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7617, "src": "3579:16:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 7626, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3599:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "3579:21:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7638, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7636, "name": "baseTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7612, "src": "3726:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 7637, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3739:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "3726:14:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 7650, "nodeType": "IfStatement", "src": "3722:99:24", "trueBody": { "id": 7649, "nodeType": "Block", "src": "3742:79:24", "statements": [ { "expression": { "argumentTypes": null, "id": 7647, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7639, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7622, "src": "3756:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7645, "name": "baseTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7612, "src": "3799:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7642, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7617, "src": "3777:16:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7640, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7602, "src": "3766:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7641, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "3766:10:24", "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": 7643, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3766:28:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7644, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "3766:32:24", "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": 7646, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3766:44:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3756:54:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7648, "nodeType": "ExpressionStatement", "src": "3756:54:24" } ] } }, "id": 7651, "nodeType": "IfStatement", "src": "3575:246:24", "trueBody": { "id": 7635, "nodeType": "Block", "src": "3602:114:24", "statements": [ { "expression": { "argumentTypes": null, "id": 7633, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7628, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7622, "src": "3673:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7631, "name": "baseTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7612, "src": "3694:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7629, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7602, "src": "3683:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7630, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "3683:10:24", "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": 7632, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3683:22:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3673:32:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7634, "nodeType": "ExpressionStatement", "src": "3673:32:24" } ] } }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7653, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3874:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7654, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3874:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7655, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7602, "src": "3886:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7652, "name": "_baseTokenTransferIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8930, "src": "3853:20:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7656, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3853:40:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7657, "nodeType": "ExpressionStatement", "src": "3853:40:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7659, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7600, "src": "3920:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 7660, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7622, "src": "3924:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7658, "name": "_mintBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8094, "src": "3903:16:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7661, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3903:29:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7662, "nodeType": "ExpressionStatement", "src": "3903:29:24" }, { "expression": { "argumentTypes": null, "id": 7668, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7663, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "3942:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7666, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7602, "src": "4002:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7664, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "3971:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7665, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "3971:30:24", "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": 7667, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3971:38:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3942:67:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7669, "nodeType": "ExpressionStatement", "src": "3942:67:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7671, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4033:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7672, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4033:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7673, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7600, "src": "4045:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "74727565", "id": 7674, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "4049:4:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, { "argumentTypes": null, "id": 7675, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7602, "src": "4055:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 7676, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7622, "src": "4063:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7670, "name": "Deposit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7388, "src": "4025:7:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,address,bool,uint256,uint256)" } }, "id": 7677, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4025:46:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7678, "nodeType": "EmitStatement", "src": "4020:51:24" }, { "expression": { "argumentTypes": null, "id": 7679, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7622, "src": "4088:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7610, "id": 7680, "nodeType": "Return", "src": "4081:14:24" } ] }, "documentation": null, "functionSelector": "aa06ce9b", "id": 7682, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 7605, "modifierName": { "argumentTypes": null, "id": 7604, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "3345:16:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3345:16:24" }, { "arguments": null, "id": 7607, "modifierName": { "argumentTypes": null, "id": 7606, "name": "depositBaseAllowed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7426, "src": "3370:18:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3370:18:24" } ], "name": "depositBaseTo", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7603, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7600, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7682, "src": "3294:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7599, "name": "address", "nodeType": "ElementaryTypeName", "src": "3294:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7602, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7682, "src": "3306:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7601, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3306:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "3293:28:24" }, "returnParameters": { "id": 7610, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7609, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7682, "src": "3406:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7608, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3406:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "3405:9:24" }, "scope": 8369, "src": "3271:831:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 7794, "nodeType": "Block", "src": "4306:1051:24", "statements": [ { "assignments": [ null, 7696 ], "declarations": [ null, { "constant": false, "id": 7696, "mutability": "mutable", "name": "quoteTarget", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7794, "src": "4348:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7695, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4348:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7699, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7697, "name": "getExpectedTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8733, "src": "4371:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$", "typeString": "function () view returns (uint256,uint256)" } }, "id": 7698, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4371:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "VariableDeclarationStatement", "src": "4345:45:24" }, { "assignments": [ 7701 ], "declarations": [ { "constant": false, "id": 7701, "mutability": "mutable", "name": "totalQuoteCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7794, "src": "4400:25:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7700, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4400:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7704, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7702, "name": "getTotalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9604, "src": "4428:20:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 7703, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4428:22:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4400:50:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7708, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7706, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7701, "src": "4468:17:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 7707, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4488:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "4468:21:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f5f51554f54455f4c50", "id": 7709, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4491:13:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_45201781226c6ef295dd5fc256e793e26359d1272043d931959202cf3772a527", "typeString": "literal_string \"NO_QUOTE_LP\"" }, "value": "NO_QUOTE_LP" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_45201781226c6ef295dd5fc256e793e26359d1272043d931959202cf3772a527", "typeString": "literal_string \"NO_QUOTE_LP\"" } ], "id": 7705, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "4460:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7710, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4460:45:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7711, "nodeType": "ExpressionStatement", "src": "4460:45:24" }, { "assignments": [ 7713 ], "declarations": [ { "constant": false, "id": 7713, "mutability": "mutable", "name": "requireQuoteCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7794, "src": "4516:27:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7712, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4516:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7721, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7719, "name": "quoteTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7696, "src": "4584:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7716, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7701, "src": "4557:17:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7714, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "4546:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7715, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "4546:10:24", "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": 7717, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4546:29:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7718, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "divCeil", "nodeType": "MemberAccess", "referencedDeclaration": 11536, "src": "4546:37:24", "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": 7720, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4546:50:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4516:80:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7728, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7723, "name": "requireQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7713, "src": "4627:19:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7725, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4675:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7726, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4675:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 7724, "name": "getQuoteCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9592, "src": "4650:24:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 7727, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4650:36:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4627:59:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4c505f51554f54455f4341504954414c5f42414c414e43455f4e4f545f454e4f554748", "id": 7729, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4700:37:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_5bad2f07e59b1b4b8d72ecf482313290c21067f6dbad6059e0d3f71b7d3bcc8a", "typeString": "literal_string \"LP_QUOTE_CAPITAL_BALANCE_NOT_ENOUGH\"" }, "value": "LP_QUOTE_CAPITAL_BALANCE_NOT_ENOUGH" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_5bad2f07e59b1b4b8d72ecf482313290c21067f6dbad6059e0d3f71b7d3bcc8a", "typeString": "literal_string \"LP_QUOTE_CAPITAL_BALANCE_NOT_ENOUGH\"" } ], "id": 7722, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "4606:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7730, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4606:141:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7731, "nodeType": "ExpressionStatement", "src": "4606:141:24" }, { "assignments": [ 7733 ], "declarations": [ { "constant": false, "id": 7733, "mutability": "mutable", "name": "penalty", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7794, "src": "4811:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7732, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4811:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7737, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7735, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "4853:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7734, "name": "getWithdrawQuotePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8294, "src": "4829:23:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256) view returns (uint256)" } }, "id": 7736, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4829:31:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4811:49:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7741, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7739, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7733, "src": "4878:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "argumentTypes": null, "id": 7740, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "4888:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4878:16:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "50454e414c54595f455843454544", "id": 7742, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4896:16:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" }, "value": "PENALTY_EXCEED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" } ], "id": 7738, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "4870:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7743, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4870:43:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7744, "nodeType": "ExpressionStatement", "src": "4870:43:24" }, { "expression": { "argumentTypes": null, "id": 7750, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7745, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "4946:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7748, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "5008:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7746, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "4976:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7747, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "4976:31:24", "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": 7749, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4976:39:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4946:69:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7751, "nodeType": "ExpressionStatement", "src": "4946:69:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7753, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5043:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7754, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5043:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7755, "name": "requireQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7713, "src": "5055:19:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7752, "name": "_burnQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8142, "src": "5025:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7756, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5025:50:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7757, "nodeType": "ExpressionStatement", "src": "5025:50:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7759, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7684, "src": "5108:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7762, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7733, "src": "5123:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7760, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "5112:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7761, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "5112:10:24", "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": 7763, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5112:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7758, "name": "_quoteTokenTransferOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9013, "src": "5085:22:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7764, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5085:47:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7765, "nodeType": "ExpressionStatement", "src": "5085:47:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7767, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7733, "src": "5160:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7766, "name": "_donateQuoteToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9049, "src": "5142:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 7768, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5142:26:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7769, "nodeType": "ExpressionStatement", "src": "5142:26:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7771, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5193:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7772, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5193:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7773, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7684, "src": "5205:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "66616c7365", "id": 7774, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "5209:5:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7777, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7733, "src": "5227:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7775, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "5216:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7776, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "5216:10:24", "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": 7778, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5216:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 7779, "name": "requireQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7713, "src": "5237:19:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7770, "name": "Withdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7400, "src": "5184:8:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,address,bool,uint256,uint256)" } }, "id": 7780, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5184:73:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7781, "nodeType": "EmitStatement", "src": "5179:78:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7783, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5286:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7784, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5286:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "hexValue": "66616c7365", "id": 7785, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "5298:5:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, { "argumentTypes": null, "id": 7786, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7733, "src": "5305:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7782, "name": "ChargePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7408, "src": "5272:13:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_uint256_$returns$__$", "typeString": "function (address,bool,uint256)" } }, "id": 7787, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5272:41:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7788, "nodeType": "EmitStatement", "src": "5267:46:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7791, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7733, "src": "5342:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7789, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "5331:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7790, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "5331:10:24", "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": 7792, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5331:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7694, "id": 7793, "nodeType": "Return", "src": "5324:26:24" } ] }, "documentation": null, "functionSelector": "108db744", "id": 7795, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 7689, "modifierName": { "argumentTypes": null, "id": 7688, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "4237:16:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "4237:16:24" }, { "arguments": null, "id": 7691, "modifierName": { "argumentTypes": null, "id": 7690, "name": "dodoNotClosed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7436, "src": "4262:13:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "4262:13:24" } ], "name": "withdrawQuoteTo", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7687, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7684, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7795, "src": "4186:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7683, "name": "address", "nodeType": "ElementaryTypeName", "src": "4186:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7686, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7795, "src": "4198:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7685, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4198:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "4185:28:24" }, "returnParameters": { "id": 7694, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7693, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7795, "src": "4293:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7692, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4293:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "4292:9:24" }, "scope": 8369, "src": "4161:1196:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 7907, "nodeType": "Block", "src": "5507:1031:24", "statements": [ { "assignments": [ 7809, null ], "declarations": [ { "constant": false, "id": 7809, "mutability": "mutable", "name": "baseTarget", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7907, "src": "5547:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7808, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5547:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, null ], "id": 7812, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7810, "name": "getExpectedTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8733, "src": "5571:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$", "typeString": "function () view returns (uint256,uint256)" } }, "id": 7811, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5571:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "VariableDeclarationStatement", "src": "5546:44:24" }, { "assignments": [ 7814 ], "declarations": [ { "constant": false, "id": 7814, "mutability": "mutable", "name": "totalBaseCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7907, "src": "5600:24:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7813, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5600:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7817, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7815, "name": "getTotalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9577, "src": "5627:19:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 7816, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5627:21:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "5600:48:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7821, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7819, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7814, "src": "5666:16:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 7820, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5685:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "5666:20:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f5f424153455f4c50", "id": 7822, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5688:12:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_2055d54795f762d6673f3bc8faaa342b115cddd4a9aa8ace9a8727200addf048", "typeString": "literal_string \"NO_BASE_LP\"" }, "value": "NO_BASE_LP" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_2055d54795f762d6673f3bc8faaa342b115cddd4a9aa8ace9a8727200addf048", "typeString": "literal_string \"NO_BASE_LP\"" } ], "id": 7818, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5658:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7823, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5658:43:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7824, "nodeType": "ExpressionStatement", "src": "5658:43:24" }, { "assignments": [ 7826 ], "declarations": [ { "constant": false, "id": 7826, "mutability": "mutable", "name": "requireBaseCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7907, "src": "5712:26:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7825, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5712:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7834, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7832, "name": "baseTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7809, "src": "5778:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7829, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7814, "src": "5752:16:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7827, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "5741:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7828, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "5741:10:24", "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": 7830, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5741:28:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7831, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "divCeil", "nodeType": "MemberAccess", "referencedDeclaration": 11536, "src": "5741:36:24", "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": 7833, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5741:48:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "5712:77:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7841, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7836, "name": "requireBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7826, "src": "5820:18:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7838, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5866:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7839, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5866:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 7837, "name": "getBaseCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9565, "src": "5842:23:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 7840, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5842:35:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5820:57:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4c505f424153455f4341504954414c5f42414c414e43455f4e4f545f454e4f554748", "id": 7842, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5891:36:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_e164233d6cf78234887d09e5e50c550b2c28ca6ae5f0aec3a8a1a3855da5f380", "typeString": "literal_string \"LP_BASE_CAPITAL_BALANCE_NOT_ENOUGH\"" }, "value": "LP_BASE_CAPITAL_BALANCE_NOT_ENOUGH" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_e164233d6cf78234887d09e5e50c550b2c28ca6ae5f0aec3a8a1a3855da5f380", "typeString": "literal_string \"LP_BASE_CAPITAL_BALANCE_NOT_ENOUGH\"" } ], "id": 7835, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5799:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7843, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5799:138:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7844, "nodeType": "ExpressionStatement", "src": "5799:138:24" }, { "assignments": [ 7846 ], "declarations": [ { "constant": false, "id": 7846, "mutability": "mutable", "name": "penalty", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7907, "src": "6001:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7845, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6001:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7850, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7848, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "6042:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7847, "name": "getWithdrawBasePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8368, "src": "6019:22:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256) view returns (uint256)" } }, "id": 7849, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6019:30:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "6001:48:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7854, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7852, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7846, "src": "6067:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 7853, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "6078:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "6067:17:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "50454e414c54595f455843454544", "id": 7855, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6086:16:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" }, "value": "PENALTY_EXCEED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" } ], "id": 7851, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "6059:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7856, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6059:44:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7857, "nodeType": "ExpressionStatement", "src": "6059:44:24" }, { "expression": { "argumentTypes": null, "id": 7863, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7858, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "6136:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7861, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "6196:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7859, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "6165:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7860, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "6165:30:24", "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": 7862, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6165:38:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "6136:67:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7864, "nodeType": "ExpressionStatement", "src": "6136:67:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7866, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6230:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7867, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "6230:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7868, "name": "requireBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7826, "src": "6242:18:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7865, "name": "_burnBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8126, "src": "6213:16:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7869, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6213:48:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7870, "nodeType": "ExpressionStatement", "src": "6213:48:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7872, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7797, "src": "6293:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7875, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7846, "src": "6308:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7873, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "6297:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7874, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "6297:10:24", "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": 7876, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6297:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7871, "name": "_baseTokenTransferOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8990, "src": "6271:21:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7877, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6271:46:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7878, "nodeType": "ExpressionStatement", "src": "6271:46:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7880, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7846, "src": "6344:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7879, "name": "_donateBaseToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9031, "src": "6327:16:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 7881, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6327:25:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7882, "nodeType": "ExpressionStatement", "src": "6327:25:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7884, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6377:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7885, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "6377:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7886, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7797, "src": "6389:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "74727565", "id": 7887, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "6393:4:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7890, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7846, "src": "6410:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7888, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "6399:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7889, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "6399:10:24", "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": 7891, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6399:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 7892, "name": "requireBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7826, "src": "6420:18:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7883, "name": "Withdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7400, "src": "6368:8:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,address,bool,uint256,uint256)" } }, "id": 7893, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6368:71:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7894, "nodeType": "EmitStatement", "src": "6363:76:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7896, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6468:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7897, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "6468:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "hexValue": "74727565", "id": 7898, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "6480:4:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, { "argumentTypes": null, "id": 7899, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7846, "src": "6486:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7895, "name": "ChargePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7408, "src": "6454:13:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_uint256_$returns$__$", "typeString": "function (address,bool,uint256)" } }, "id": 7900, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6454:40:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7901, "nodeType": "EmitStatement", "src": "6449:45:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7904, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7846, "src": "6523:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7902, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "6512:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7903, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "6512:10:24", "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": 7905, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6512:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7807, "id": 7906, "nodeType": "Return", "src": "6505:26:24" } ] }, "documentation": null, "functionSelector": "947cf92b", "id": 7908, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 7802, "modifierName": { "argumentTypes": null, "id": 7801, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "5438:16:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "5438:16:24" }, { "arguments": null, "id": 7804, "modifierName": { "argumentTypes": null, "id": 7803, "name": "dodoNotClosed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7436, "src": "5463:13:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "5463:13:24" } ], "name": "withdrawBaseTo", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7800, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7797, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7908, "src": "5387:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7796, "name": "address", "nodeType": "ElementaryTypeName", "src": "5387:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7799, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7908, "src": "5399:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7798, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5399:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5386:28:24" }, "returnParameters": { "id": 7807, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7806, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7908, "src": "5494:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7805, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5494:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5493:9:24" }, "scope": 8369, "src": "5363:1175:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 7992, "nodeType": "Block", "src": "6733:750:24", "statements": [ { "assignments": [ 7920 ], "declarations": [ { "constant": false, "id": 7920, "mutability": "mutable", "name": "withdrawAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7992, "src": "6743:22:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7919, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6743:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7925, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7922, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6786:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7923, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "6786:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 7921, "name": "getLpQuoteBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8220, "src": "6768:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 7924, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6768:29:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "6743:54:24" }, { "assignments": [ 7927 ], "declarations": [ { "constant": false, "id": 7927, "mutability": "mutable", "name": "capital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7992, "src": "6807:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7926, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6807:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7932, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7929, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6850:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7930, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "6850:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 7928, "name": "getQuoteCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9592, "src": "6825:24:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 7931, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6825:36:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "6807:54:24" }, { "assignments": [ 7934 ], "declarations": [ { "constant": false, "id": 7934, "mutability": "mutable", "name": "penalty", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7992, "src": "6925:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7933, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6925:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7938, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7936, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7920, "src": "6967:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7935, "name": "getWithdrawQuotePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8294, "src": "6943:23:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256) view returns (uint256)" } }, "id": 7937, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6943:39:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "6925:57:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7942, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7940, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7934, "src": "7000:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 7941, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7920, "src": "7011:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "7000:25:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "50454e414c54595f455843454544", "id": 7943, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7027:16:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" }, "value": "PENALTY_EXCEED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" } ], "id": 7939, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "6992:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7944, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6992:52:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7945, "nodeType": "ExpressionStatement", "src": "6992:52:24" }, { "expression": { "argumentTypes": null, "id": 7951, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7946, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "7077:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7949, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7920, "src": "7139:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7947, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "7107:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7948, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "7107:31:24", "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": 7950, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7107:47:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "7077:77:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7952, "nodeType": "ExpressionStatement", "src": "7077:77:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7954, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "7182:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7955, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7182:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7956, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7927, "src": "7194:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7953, "name": "_burnQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8142, "src": "7164:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7957, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7164:38:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7958, "nodeType": "ExpressionStatement", "src": "7164:38:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7960, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7910, "src": "7235:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7963, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7934, "src": "7258:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7961, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7920, "src": "7239:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7962, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "7239:18:24", "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": 7964, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7239:27:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7959, "name": "_quoteTokenTransferOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9013, "src": "7212:22:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7965, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7212:55:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7966, "nodeType": "ExpressionStatement", "src": "7212:55:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7968, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7934, "src": "7295:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7967, "name": "_donateQuoteToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9049, "src": "7277:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 7969, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7277:26:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7970, "nodeType": "ExpressionStatement", "src": "7277:26:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7972, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "7328:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7973, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7328:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7974, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7910, "src": "7340:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "66616c7365", "id": 7975, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "7344:5:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, { "argumentTypes": null, "id": 7976, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7920, "src": "7351:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 7977, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7927, "src": "7367:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7971, "name": "Withdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7400, "src": "7319:8:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,address,bool,uint256,uint256)" } }, "id": 7978, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7319:56:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7979, "nodeType": "EmitStatement", "src": "7314:61:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7981, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "7404:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7982, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7404:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "hexValue": "66616c7365", "id": 7983, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "7416:5:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, { "argumentTypes": null, "id": 7984, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7934, "src": "7423:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7980, "name": "ChargePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7408, "src": "7390:13:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_uint256_$returns$__$", "typeString": "function (address,bool,uint256)" } }, "id": 7985, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7390:41:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7986, "nodeType": "EmitStatement", "src": "7385:46:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7989, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7934, "src": "7468:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7987, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7920, "src": "7449:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7988, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "7449:18:24", "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": 7990, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7449:27:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7918, "id": 7991, "nodeType": "Return", "src": "7442:34:24" } ] }, "documentation": null, "functionSelector": "04512dc4", "id": 7993, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 7913, "modifierName": { "argumentTypes": null, "id": 7912, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "6664:16:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "6664:16:24" }, { "arguments": null, "id": 7915, "modifierName": { "argumentTypes": null, "id": 7914, "name": "dodoNotClosed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7436, "src": "6689:13:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "6689:13:24" } ], "name": "withdrawAllQuoteTo", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7911, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7910, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7993, "src": "6629:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7909, "name": "address", "nodeType": "ElementaryTypeName", "src": "6629:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "6628:12:24" }, "returnParameters": { "id": 7918, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7917, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7993, "src": "6720:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7916, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6720:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6719:9:24" }, "scope": 8369, "src": "6601:882:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 8077, "nodeType": "Block", "src": "7584:740:24", "statements": [ { "assignments": [ 8005 ], "declarations": [ { "constant": false, "id": 8005, "mutability": "mutable", "name": "withdrawAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8077, "src": "7594:22:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8004, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7594:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8010, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8007, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "7636:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 8008, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7636:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 8006, "name": "getLpBaseBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8181, "src": "7619:16:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 8009, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7619:28:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "7594:53:24" }, { "assignments": [ 8012 ], "declarations": [ { "constant": false, "id": 8012, "mutability": "mutable", "name": "capital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8077, "src": "7657:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8011, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7657:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8017, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8014, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "7699:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 8015, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7699:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 8013, "name": "getBaseCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9565, "src": "7675:23:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 8016, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7675:35:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "7657:53:24" }, { "assignments": [ 8019 ], "declarations": [ { "constant": false, "id": 8019, "mutability": "mutable", "name": "penalty", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8077, "src": "7774:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8018, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7774:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8023, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8021, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8005, "src": "7815:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 8020, "name": "getWithdrawBasePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8368, "src": "7792:22:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256) view returns (uint256)" } }, "id": 8022, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7792:38:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "7774:56:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8027, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8025, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8019, "src": "7848:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 8026, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8005, "src": "7859:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "7848:25:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "50454e414c54595f455843454544", "id": 8028, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7875:16:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" }, "value": "PENALTY_EXCEED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" } ], "id": 8024, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "7840:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 8029, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7840:52:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8030, "nodeType": "ExpressionStatement", "src": "7840:52:24" }, { "expression": { "argumentTypes": null, "id": 8036, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 8031, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "7925:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8034, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8005, "src": "7985:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8032, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "7954:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8033, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "7954:30:24", "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": 8035, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7954:46:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "7925:75:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8037, "nodeType": "ExpressionStatement", "src": "7925:75:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8039, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8027:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 8040, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8027:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 8041, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8012, "src": "8039:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 8038, "name": "_burnBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8126, "src": "8010:16:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 8042, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8010:37:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8043, "nodeType": "ExpressionStatement", "src": "8010:37:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8045, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7995, "src": "8079:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8048, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8019, "src": "8102:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8046, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8005, "src": "8083:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8047, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "8083:18:24", "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": 8049, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8083:27:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 8044, "name": "_baseTokenTransferOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8990, "src": "8057:21:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 8050, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8057:54:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8051, "nodeType": "ExpressionStatement", "src": "8057:54:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8053, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8019, "src": "8138:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 8052, "name": "_donateBaseToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9031, "src": "8121:16:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 8054, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8121:25:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8055, "nodeType": "ExpressionStatement", "src": "8121:25:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8057, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8171:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 8058, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8171:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 8059, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7995, "src": "8183:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "74727565", "id": 8060, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "8187:4:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, { "argumentTypes": null, "id": 8061, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8005, "src": "8193:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8062, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8012, "src": "8209:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 8056, "name": "Withdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7400, "src": "8162:8:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,address,bool,uint256,uint256)" } }, "id": 8063, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8162:55:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8064, "nodeType": "EmitStatement", "src": "8157:60:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8066, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8246:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 8067, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8246:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "hexValue": "74727565", "id": 8068, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "8258:4:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, { "argumentTypes": null, "id": 8069, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8019, "src": "8264:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 8065, "name": "ChargePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7408, "src": "8232:13:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_uint256_$returns$__$", "typeString": "function (address,bool,uint256)" } }, "id": 8070, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8232:40:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8071, "nodeType": "EmitStatement", "src": "8227:45:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8074, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8019, "src": "8309:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8072, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8005, "src": "8290:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8073, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "8290:18:24", "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": 8075, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8290:27:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 8003, "id": 8076, "nodeType": "Return", "src": "8283:34:24" } ] }, "documentation": null, "functionSelector": "1e34b9cc", "id": 8078, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 7998, "modifierName": { "argumentTypes": null, "id": 7997, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "7535:16:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "7535:16:24" }, { "arguments": null, "id": 8000, "modifierName": { "argumentTypes": null, "id": 7999, "name": "dodoNotClosed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7436, "src": "7552:13:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "7552:13:24" } ], "name": "withdrawAllBaseTo", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7996, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7995, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8078, "src": "7516:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7994, "name": "address", "nodeType": "ElementaryTypeName", "src": "7516:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "7515:12:24" }, "returnParameters": { "id": 8003, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8002, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8078, "src": "7575:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8001, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7575:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "7574:9:24" }, "scope": 8369, "src": "7489:835:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 8093, "nodeType": "Block", "src": "8446:70:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8089, "name": "user", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8080, "src": "8496:4:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8090, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8082, "src": "8502:6:24", "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": 8086, "name": "_BASE_CAPITAL_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9469, "src": "8469:20:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8085, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10536, "src": "8456:12:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODOLpToken_$10536_$", "typeString": "type(contract IDODOLpToken)" } }, "id": 8087, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8456:34:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODOLpToken_$10536", "typeString": "contract IDODOLpToken" } }, "id": 8088, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mint", "nodeType": "MemberAccess", "referencedDeclaration": 10516, "src": "8456:39:24", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256) external" } }, "id": 8091, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8456:53:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8092, "nodeType": "ExpressionStatement", "src": "8456:53:24" } ] }, "documentation": null, "id": 8094, "implemented": true, "kind": "function", "modifiers": [], "name": "_mintBaseCapital", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8083, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8080, "mutability": "mutable", "name": "user", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8094, "src": "8407:12:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8079, "name": "address", "nodeType": "ElementaryTypeName", "src": "8407:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8082, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8094, "src": "8421:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8081, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8421:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "8406:30:24" }, "returnParameters": { "id": 8084, "nodeType": "ParameterList", "parameters": [], "src": "8446:0:24" }, "scope": 8369, "src": "8381:135:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 8109, "nodeType": "Block", "src": "8588:71:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8105, "name": "user", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8096, "src": "8639:4:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8106, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8098, "src": "8645:6:24", "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": 8102, "name": "_QUOTE_CAPITAL_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9471, "src": "8611:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8101, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10536, "src": "8598:12:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODOLpToken_$10536_$", "typeString": "type(contract IDODOLpToken)" } }, "id": 8103, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8598:35:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODOLpToken_$10536", "typeString": "contract IDODOLpToken" } }, "id": 8104, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mint", "nodeType": "MemberAccess", "referencedDeclaration": 10516, "src": "8598:40:24", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256) external" } }, "id": 8107, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8598:54:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8108, "nodeType": "ExpressionStatement", "src": "8598:54:24" } ] }, "documentation": null, "id": 8110, "implemented": true, "kind": "function", "modifiers": [], "name": "_mintQuoteCapital", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8099, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8096, "mutability": "mutable", "name": "user", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8110, "src": "8549:12:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8095, "name": "address", "nodeType": "ElementaryTypeName", "src": "8549:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8098, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8110, "src": "8563:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8097, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8563:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "8548:30:24" }, "returnParameters": { "id": 8100, "nodeType": "ParameterList", "parameters": [], "src": "8588:0:24" }, "scope": 8369, "src": "8522:137:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 8125, "nodeType": "Block", "src": "8730:70:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8121, "name": "user", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8112, "src": "8780:4:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8122, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8114, "src": "8786:6:24", "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": 8118, "name": "_BASE_CAPITAL_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9469, "src": "8753:20:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8117, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10536, "src": "8740:12:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODOLpToken_$10536_$", "typeString": "type(contract IDODOLpToken)" } }, "id": 8119, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8740:34:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODOLpToken_$10536", "typeString": "contract IDODOLpToken" } }, "id": 8120, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "burn", "nodeType": "MemberAccess", "referencedDeclaration": 10523, "src": "8740:39:24", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256) external" } }, "id": 8123, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8740:53:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8124, "nodeType": "ExpressionStatement", "src": "8740:53:24" } ] }, "documentation": null, "id": 8126, "implemented": true, "kind": "function", "modifiers": [], "name": "_burnBaseCapital", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8115, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8112, "mutability": "mutable", "name": "user", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8126, "src": "8691:12:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8111, "name": "address", "nodeType": "ElementaryTypeName", "src": "8691:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8114, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8126, "src": "8705:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8113, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8705:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "8690:30:24" }, "returnParameters": { "id": 8116, "nodeType": "ParameterList", "parameters": [], "src": "8730:0:24" }, "scope": 8369, "src": "8665:135:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 8141, "nodeType": "Block", "src": "8872:71:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8137, "name": "user", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8128, "src": "8923:4:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8138, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8130, "src": "8929:6:24", "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": 8134, "name": "_QUOTE_CAPITAL_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9471, "src": "8895:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8133, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10536, "src": "8882:12:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODOLpToken_$10536_$", "typeString": "type(contract IDODOLpToken)" } }, "id": 8135, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8882:35:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODOLpToken_$10536", "typeString": "contract IDODOLpToken" } }, "id": 8136, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "burn", "nodeType": "MemberAccess", "referencedDeclaration": 10523, "src": "8882:40:24", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256) external" } }, "id": 8139, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8882:54:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8140, "nodeType": "ExpressionStatement", "src": "8882:54:24" } ] }, "documentation": null, "id": 8142, "implemented": true, "kind": "function", "modifiers": [], "name": "_burnQuoteCapital", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8131, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8128, "mutability": "mutable", "name": "user", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8142, "src": "8833:12:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8127, "name": "address", "nodeType": "ElementaryTypeName", "src": "8833:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8130, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8142, "src": "8847:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8129, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8847:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "8832:30:24" }, "returnParameters": { "id": 8132, "nodeType": "ParameterList", "parameters": [], "src": "8872:0:24" }, "scope": 8369, "src": "8806:137:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 8180, "nodeType": "Block", "src": "9078:301:24", "statements": [ { "assignments": [ 8150 ], "declarations": [ { "constant": false, "id": 8150, "mutability": "mutable", "name": "totalBaseCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8180, "src": "9088:24:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8149, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9088:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8153, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 8151, "name": "getTotalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9577, "src": "9115:19:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 8152, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9115:21:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "9088:48:24" }, { "assignments": [ 8155, null ], "declarations": [ { "constant": false, "id": 8155, "mutability": "mutable", "name": "baseTarget", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8180, "src": "9147:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8154, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9147:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, null ], "id": 8158, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 8156, "name": "getExpectedTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8733, "src": "9171:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$", "typeString": "function () view returns (uint256,uint256)" } }, "id": 8157, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9171:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "VariableDeclarationStatement", "src": "9146:44:24" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8161, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8159, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8150, "src": "9204:16:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 8160, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9224:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "9204:21:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 8165, "nodeType": "IfStatement", "src": "9200:60:24", "trueBody": { "id": 8164, "nodeType": "Block", "src": "9227:33:24", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "30", "id": 8162, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9248:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 8148, "id": 8163, "nodeType": "Return", "src": "9241:8:24" } ] } }, { "expression": { "argumentTypes": null, "id": 8176, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 8166, "name": "lpBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8147, "src": "9269:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8174, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8150, "src": "9329:16:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8171, "name": "baseTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8155, "src": "9313:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8168, "name": "lp", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8144, "src": "9305:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8167, "name": "getBaseCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9565, "src": "9281:23:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 8169, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9281:27:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8170, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "9281:31:24", "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": 8172, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9281:43:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8173, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "9281:47:24", "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": 8175, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9281:65:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "9269:77:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8177, "nodeType": "ExpressionStatement", "src": "9269:77:24" }, { "expression": { "argumentTypes": null, "id": 8178, "name": "lpBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8147, "src": "9363:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 8148, "id": 8179, "nodeType": "Return", "src": "9356:16:24" } ] }, "documentation": null, "functionSelector": "95faa5f6", "id": 8181, "implemented": true, "kind": "function", "modifiers": [], "name": "getLpBaseBalance", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8145, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8144, "mutability": "mutable", "name": "lp", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8181, "src": "9026:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8143, "name": "address", "nodeType": "ElementaryTypeName", "src": "9026:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "9025:12:24" }, "returnParameters": { "id": 8148, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8147, "mutability": "mutable", "name": "lpBalance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8181, "src": "9059:17:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8146, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9059:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "9058:19:24" }, "scope": 8369, "src": "9000:379:24", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { "id": 8219, "nodeType": "Block", "src": "9464:308:24", "statements": [ { "assignments": [ 8189 ], "declarations": [ { "constant": false, "id": 8189, "mutability": "mutable", "name": "totalQuoteCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8219, "src": "9474:25:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8188, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9474:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8192, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 8190, "name": "getTotalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9604, "src": "9502:20:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 8191, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9502:22:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "9474:50:24" }, { "assignments": [ null, 8194 ], "declarations": [ null, { "constant": false, "id": 8194, "mutability": "mutable", "name": "quoteTarget", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8219, "src": "9537:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8193, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9537:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8197, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 8195, "name": "getExpectedTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8733, "src": "9560:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$", "typeString": "function () view returns (uint256,uint256)" } }, "id": 8196, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9560:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "VariableDeclarationStatement", "src": "9534:45:24" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8200, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8198, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8189, "src": "9593:17:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 8199, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9614:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "9593:22:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 8204, "nodeType": "IfStatement", "src": "9589:61:24", "trueBody": { "id": 8203, "nodeType": "Block", "src": "9617:33:24", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "30", "id": 8201, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9638:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 8187, "id": 8202, "nodeType": "Return", "src": "9631:8:24" } ] } }, { "expression": { "argumentTypes": null, "id": 8215, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 8205, "name": "lpBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8186, "src": "9659:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8213, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8189, "src": "9721:17:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8210, "name": "quoteTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8194, "src": "9704:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8207, "name": "lp", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8183, "src": "9696:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8206, "name": "getQuoteCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9592, "src": "9671:24:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 8208, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9671:28:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8209, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "9671:32:24", "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": 8211, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9671:45:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8212, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "9671:49:24", "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": 8214, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9671:68:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "9659:80:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8216, "nodeType": "ExpressionStatement", "src": "9659:80:24" }, { "expression": { "argumentTypes": null, "id": 8217, "name": "lpBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8186, "src": "9756:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 8187, "id": 8218, "nodeType": "Return", "src": "9749:16:24" } ] }, "documentation": null, "functionSelector": "36a53bbb", "id": 8220, "implemented": true, "kind": "function", "modifiers": [], "name": "getLpQuoteBalance", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8184, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8183, "mutability": "mutable", "name": "lp", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8220, "src": "9412:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8182, "name": "address", "nodeType": "ElementaryTypeName", "src": "9412:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "9411:12:24" }, "returnParameters": { "id": 8187, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8186, "mutability": "mutable", "name": "lpBalance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8220, "src": "9445:17:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8185, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9445:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "9444:19:24" }, "scope": 8369, "src": "9385:387:24", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { "id": 8293, "nodeType": "Block", "src": "9865:877:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8230, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8228, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8222, "src": "9883:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 8229, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "9893:15:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "9883:25:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "444f444f5f51554f54455f42414c414e43455f4e4f545f454e4f554748", "id": 8231, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9910:31:24", "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": 8227, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "9875:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 8232, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9875:67:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8233, "nodeType": "ExpressionStatement", "src": "9875:67:24" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" }, "id": 8238, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8234, "name": "_R_STATUS_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9459, "src": "9956:10:24", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8235, "name": "Types", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11631, "src": "9970:5:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Types_$11631_$", "typeString": "type(library Types)" } }, "id": 8236, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "RStatus", "nodeType": "MemberAccess", "referencedDeclaration": 11630, "src": "9970:13:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$", "typeString": "type(enum Types.RStatus)" } }, "id": 8237, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "BELOW_ONE", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "9970:23:24", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "src": "9956:37:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 8291, "nodeType": "Block", "src": "10703:33:24", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "30", "id": 8289, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10724:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 8226, "id": 8290, "nodeType": "Return", "src": "10717:8:24" } ] }, "id": 8292, "nodeType": "IfStatement", "src": "9952:784:24", "trueBody": { "id": 8288, "nodeType": "Block", "src": "9995:702:24", "statements": [ { "assignments": [ 8240 ], "declarations": [ { "constant": false, "id": 8240, "mutability": "mutable", "name": "spareBase", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8288, "src": "10009:17:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8239, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10009:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8245, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8243, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "10048:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8241, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "10029:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8242, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "10029:18:24", "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": 8244, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10029:46:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "10009:66:24" }, { "assignments": [ 8247 ], "declarations": [ { "constant": false, "id": 8247, "mutability": "mutable", "name": "price", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8288, "src": "10089:13:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8246, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10089:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8250, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 8248, "name": "getOraclePrice", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9550, "src": "10105:14:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 8249, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10105:16:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "10089:32:24" }, { "assignments": [ 8252 ], "declarations": [ { "constant": false, "id": 8252, "mutability": "mutable", "name": "fairAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8288, "src": "10135:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8251, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10135:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8258, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8255, "name": "spareBase", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8240, "src": "10172:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8256, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8247, "src": "10183:5:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8253, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11078, "src": "10156:11:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$", "typeString": "type(library DecimalMath)" } }, "id": 8254, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11023, "src": "10156:15:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 8257, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10156:33:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "10135:54:24" }, { "assignments": [ 8260 ], "declarations": [ { "constant": false, "id": 8260, "mutability": "mutable", "name": "targetQuote", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8288, "src": "10203:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8259, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10203:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8267, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8263, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "10284:15:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8264, "name": "_K_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9457, "src": "10317:3:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8265, "name": "fairAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8252, "src": "10338:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8261, "name": "DODOMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10992, "src": "10225:8:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DODOMath_$10992_$", "typeString": "type(library DODOMath)" } }, "id": 8262, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_SolveQuadraticFunctionForTarget", "nodeType": "MemberAccess", "referencedDeclaration": 10991, "src": "10225:41:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" } }, "id": 8266, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10225:137:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "10203:159:24" }, { "assignments": [ 8269 ], "declarations": [ { "constant": false, "id": 8269, "mutability": "mutable", "name": "targetQuoteWithWithdraw", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8288, "src": "10430:31:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8268, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10430:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8279, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8274, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8222, "src": "10543:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8272, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "10523:15:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8273, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "10523:19:24", "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": 8275, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10523:27:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8276, "name": "_K_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9457, "src": "10568:3:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8277, "name": "fairAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8252, "src": "10589:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8270, "name": "DODOMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10992, "src": "10464:8:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DODOMath_$10992_$", "typeString": "type(library DODOMath)" } }, "id": 8271, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_SolveQuadraticFunctionForTarget", "nodeType": "MemberAccess", "referencedDeclaration": 10991, "src": "10464:41:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" } }, "id": 8278, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10464:149:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "10430:183:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8284, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8222, "src": "10678:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8282, "name": "targetQuoteWithWithdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8269, "src": "10650:23:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8283, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "10650:27:24", "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": 8285, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10650:35:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8280, "name": "targetQuote", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8260, "src": "10634:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8281, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "10634:15:24", "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": 8286, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10634:52:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 8226, "id": 8287, "nodeType": "Return", "src": "10627:59:24" } ] } } ] }, "documentation": null, "functionSelector": "0c9f7bd0", "id": 8294, "implemented": true, "kind": "function", "modifiers": [], "name": "getWithdrawQuotePenalty", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8223, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8222, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8294, "src": "9811:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8221, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9811:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "9810:16:24" }, "returnParameters": { "id": 8226, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8225, "mutability": "mutable", "name": "penalty", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8294, "src": "9848:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8224, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9848:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "9847:17:24" }, "scope": 8369, "src": "9778:964:24", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { "id": 8367, "nodeType": "Block", "src": "10834:877:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8304, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8302, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8296, "src": "10852:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 8303, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "10862:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "10852:24:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "444f444f5f424153455f42414c414e43455f4e4f545f454e4f554748", "id": 8305, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10878:30:24", "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": 8301, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "10844:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 8306, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10844:65:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8307, "nodeType": "ExpressionStatement", "src": "10844:65:24" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" }, "id": 8312, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8308, "name": "_R_STATUS_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9459, "src": "10923:10:24", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8309, "name": "Types", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11631, "src": "10937:5:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Types_$11631_$", "typeString": "type(library Types)" } }, "id": 8310, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "RStatus", "nodeType": "MemberAccess", "referencedDeclaration": 11630, "src": "10937:13:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$", "typeString": "type(enum Types.RStatus)" } }, "id": 8311, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "ABOVE_ONE", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "10937:23:24", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "src": "10923:37:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 8365, "nodeType": "Block", "src": "11672:33:24", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "30", "id": 8363, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "11693:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 8300, "id": 8364, "nodeType": "Return", "src": "11686:8:24" } ] }, "id": 8366, "nodeType": "IfStatement", "src": "10919:786:24", "trueBody": { "id": 8362, "nodeType": "Block", "src": "10962:704:24", "statements": [ { "assignments": [ 8314 ], "declarations": [ { "constant": false, "id": 8314, "mutability": "mutable", "name": "spareQuote", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8362, "src": "10976:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8313, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10976:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8319, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8317, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "11017:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8315, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "10997:15:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8316, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "10997:19:24", "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": 8318, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10997:48:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "10976:69:24" }, { "assignments": [ 8321 ], "declarations": [ { "constant": false, "id": 8321, "mutability": "mutable", "name": "price", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8362, "src": "11059:13:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8320, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11059:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8324, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 8322, "name": "getOraclePrice", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9550, "src": "11075:14:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 8323, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11075:16:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "11059:32:24" }, { "assignments": [ 8326 ], "declarations": [ { "constant": false, "id": 8326, "mutability": "mutable", "name": "fairAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8362, "src": "11105:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8325, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11105:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8332, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8329, "name": "spareQuote", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8314, "src": "11147:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8330, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8321, "src": "11159:5:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8327, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11078, "src": "11126:11:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$", "typeString": "type(library DecimalMath)" } }, "id": 8328, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "divFloor", "nodeType": "MemberAccess", "referencedDeclaration": 11059, "src": "11126:20:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 8331, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11126:39:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "11105:60:24" }, { "assignments": [ 8334 ], "declarations": [ { "constant": false, "id": 8334, "mutability": "mutable", "name": "targetBase", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8362, "src": "11179:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8333, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11179:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8341, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8337, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "11259:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8338, "name": "_K_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9457, "src": "11291:3:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8339, "name": "fairAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8326, "src": "11312:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8335, "name": "DODOMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10992, "src": "11200:8:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DODOMath_$10992_$", "typeString": "type(library DODOMath)" } }, "id": 8336, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_SolveQuadraticFunctionForTarget", "nodeType": "MemberAccess", "referencedDeclaration": 10991, "src": "11200:41:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" } }, "id": 8340, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11200:136:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "11179:157:24" }, { "assignments": [ 8343 ], "declarations": [ { "constant": false, "id": 8343, "mutability": "mutable", "name": "targetBaseWithWithdraw", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8362, "src": "11403:30:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8342, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11403:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8353, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8348, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8296, "src": "11514:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8346, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "11495:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8347, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "11495:18:24", "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": 8349, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11495:26:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8350, "name": "_K_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9457, "src": "11539:3:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8351, "name": "fairAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8326, "src": "11560:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8344, "name": "DODOMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10992, "src": "11436:8:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DODOMath_$10992_$", "typeString": "type(library DODOMath)" } }, "id": 8345, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_SolveQuadraticFunctionForTarget", "nodeType": "MemberAccess", "referencedDeclaration": 10991, "src": "11436:41:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" } }, "id": 8352, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11436:148:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "11403:181:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8358, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8296, "src": "11647:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8356, "name": "targetBaseWithWithdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8343, "src": "11620:22:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8357, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "11620:26:24", "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": 8359, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11620:34:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8354, "name": "targetBase", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8334, "src": "11605:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8355, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "11605:14:24", "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": 8360, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11605:50:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 8300, "id": 8361, "nodeType": "Return", "src": "11598:57:24" } ] } } ] }, "documentation": null, "functionSelector": "ee5150b3", "id": 8368, "implemented": true, "kind": "function", "modifiers": [], "name": "getWithdrawBasePenalty", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8297, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8296, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8368, "src": "10780:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8295, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10780:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "10779:16:24" }, "returnParameters": { "id": 8300, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8299, "mutability": "mutable", "name": "penalty", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8368, "src": "10817:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8298, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10817:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "10816:17:24" }, "scope": 8369, "src": "10748:963:24", "stateMutability": "view", "virtual": false, "visibility": "public" } ], "scope": 8370, "src": "618:11095:24" } ], "src": "78:11636:24" }, "legacyAST": { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/LiquidityProvider.sol", "exportedSymbols": { "LiquidityProvider": [ 8369 ] }, "id": 8370, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 7349, "literals": [ "solidity", "0.6", ".9" ], "nodeType": "PragmaDirective", "src": "78:22:24" }, { "id": 7350, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "101:33:24" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol", "file": "../lib/SafeMath.sol", "id": 7352, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 11624, "src": "136:45:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7351, "name": "SafeMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "144:8:24", "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": 7354, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 11079, "src": "182:51:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7353, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "190:11:24", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/DODOMath.sol", "file": "../lib/DODOMath.sol", "id": 7356, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 10993, "src": "234:45:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7355, "name": "DODOMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "242:8:24", "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": 7358, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 11632, "src": "280:39:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7357, "name": "Types", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "288:5:24", "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": 7360, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 10537, "src": "320:54:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7359, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "328:12:24", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Storage.sol", "file": "./Storage.sol", "id": 7362, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 9614, "src": "375:38:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7361, "name": "Storage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "383:7:24", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Settlement.sol", "file": "./Settlement.sol", "id": 7364, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 9397, "src": "414:44:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7363, "name": "Settlement", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "422:10:24", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Pricing.sol", "file": "./Pricing.sol", "id": 7366, "nodeType": "ImportDirective", "scope": 8370, "sourceUnit": 8854, "src": "459:38:24", "symbolAliases": [ { "foreign": { "argumentTypes": null, "id": 7365, "name": "Pricing", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": null, "src": "467:7:24", "typeDescriptions": { "typeIdentifier": null, "typeString": null } }, "local": null } ], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 7368, "name": "Storage", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 9613, "src": "648:7:24", "typeDescriptions": { "typeIdentifier": "t_contract$_Storage_$9613", "typeString": "contract Storage" } }, "id": 7369, "nodeType": "InheritanceSpecifier", "src": "648:7:24" }, { "arguments": null, "baseName": { "contractScope": null, "id": 7370, "name": "Pricing", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 8853, "src": "657:7:24", "typeDescriptions": { "typeIdentifier": "t_contract$_Pricing_$8853", "typeString": "contract Pricing" } }, "id": 7371, "nodeType": "InheritanceSpecifier", "src": "657:7:24" }, { "arguments": null, "baseName": { "contractScope": null, "id": 7372, "name": "Settlement", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 9396, "src": "666:10:24", "typeDescriptions": { "typeIdentifier": "t_contract$_Settlement_$9396", "typeString": "contract Settlement" } }, "id": 7373, "nodeType": "InheritanceSpecifier", "src": "666:10:24" } ], "contractDependencies": [ 8853, 9396, 9613, 11166, 11296 ], "contractKind": "contract", "documentation": { "id": 7367, "nodeType": "StructuredDocumentation", "src": "500:117:24", "text": " @title LiquidityProvider\n @author DODO Breeder\n @notice Functions for liquidity provider operations" }, "fullyImplemented": true, "id": 8369, "linearizedBaseContracts": [ 8369, 9396, 8853, 9613, 11296, 11166 ], "name": "LiquidityProvider", "nodeType": "ContractDefinition", "nodes": [ { "id": 7376, "libraryName": { "contractScope": null, "id": 7374, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 11623, "src": "689:8:24", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$11623", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "683:27:24", "typeName": { "id": 7375, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "702:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "anonymous": false, "documentation": null, "id": 7388, "name": "Deposit", "nodeType": "EventDefinition", "parameters": { "id": 7387, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7378, "indexed": true, "mutability": "mutable", "name": "payer", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7388, "src": "780:21:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7377, "name": "address", "nodeType": "ElementaryTypeName", "src": "780:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7380, "indexed": true, "mutability": "mutable", "name": "receiver", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7388, "src": "811:24:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7379, "name": "address", "nodeType": "ElementaryTypeName", "src": "811:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7382, "indexed": false, "mutability": "mutable", "name": "isBaseToken", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7388, "src": "845:16:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 7381, "name": "bool", "nodeType": "ElementaryTypeName", "src": "845:4:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7384, "indexed": false, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7388, "src": "871:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7383, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "871:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7386, "indexed": false, "mutability": "mutable", "name": "lpTokenAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7388, "src": "895:21:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7385, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "895:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "770:152:24" }, "src": "757:166:24" }, { "anonymous": false, "documentation": null, "id": 7400, "name": "Withdraw", "nodeType": "EventDefinition", "parameters": { "id": 7399, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7390, "indexed": true, "mutability": "mutable", "name": "payer", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7400, "src": "953:21:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7389, "name": "address", "nodeType": "ElementaryTypeName", "src": "953:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7392, "indexed": true, "mutability": "mutable", "name": "receiver", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7400, "src": "984:24:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7391, "name": "address", "nodeType": "ElementaryTypeName", "src": "984:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7394, "indexed": false, "mutability": "mutable", "name": "isBaseToken", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7400, "src": "1018:16:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 7393, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1018:4:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7396, "indexed": false, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7400, "src": "1044:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7395, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1044:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7398, "indexed": false, "mutability": "mutable", "name": "lpTokenAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7400, "src": "1068:21:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7397, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1068:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "943:152:24" }, "src": "929:167:24" }, { "anonymous": false, "documentation": null, "id": 7408, "name": "ChargePenalty", "nodeType": "EventDefinition", "parameters": { "id": 7407, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7402, "indexed": true, "mutability": "mutable", "name": "payer", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7408, "src": "1122:21:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7401, "name": "address", "nodeType": "ElementaryTypeName", "src": "1122:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7404, "indexed": false, "mutability": "mutable", "name": "isBaseToken", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7408, "src": "1145:16:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 7403, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1145:4:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7406, "indexed": false, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7408, "src": "1163:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7405, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1163:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1121:57:24" }, "src": "1102:77:24" }, { "body": { "id": 7416, "nodeType": "Block", "src": "1260:89:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7411, "name": "_DEPOSIT_QUOTE_ALLOWED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9427, "src": "1278:23:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4445504f5349545f51554f54455f4e4f545f414c4c4f574544", "id": 7412, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1303:27:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_3f8ca46e1665f66396f293f9a520e0b7eba90c16ed34c9b5d30b4532a06b94ae", "typeString": "literal_string \"DEPOSIT_QUOTE_NOT_ALLOWED\"" }, "value": "DEPOSIT_QUOTE_NOT_ALLOWED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_3f8ca46e1665f66396f293f9a520e0b7eba90c16ed34c9b5d30b4532a06b94ae", "typeString": "literal_string \"DEPOSIT_QUOTE_NOT_ALLOWED\"" } ], "id": 7410, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1270:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7413, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1270:61:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7414, "nodeType": "ExpressionStatement", "src": "1270:61:24" }, { "id": 7415, "nodeType": "PlaceholderStatement", "src": "1341:1:24" } ] }, "documentation": null, "id": 7417, "name": "depositQuoteAllowed", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 7409, "nodeType": "ParameterList", "parameters": [], "src": "1257:2:24" }, "src": "1229:120:24", "virtual": false, "visibility": "internal" }, { "body": { "id": 7425, "nodeType": "Block", "src": "1385:87:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7420, "name": "_DEPOSIT_BASE_ALLOWED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9429, "src": "1403:22:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4445504f5349545f424153455f4e4f545f414c4c4f574544", "id": 7421, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1427:26:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_2e520f2f988e5e849fb2744d0cdabd1103964b7b504d67387f2f6654882bc899", "typeString": "literal_string \"DEPOSIT_BASE_NOT_ALLOWED\"" }, "value": "DEPOSIT_BASE_NOT_ALLOWED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_2e520f2f988e5e849fb2744d0cdabd1103964b7b504d67387f2f6654882bc899", "typeString": "literal_string \"DEPOSIT_BASE_NOT_ALLOWED\"" } ], "id": 7419, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1395:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7422, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1395:59:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7423, "nodeType": "ExpressionStatement", "src": "1395:59:24" }, { "id": 7424, "nodeType": "PlaceholderStatement", "src": "1464:1:24" } ] }, "documentation": null, "id": 7426, "name": "depositBaseAllowed", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 7418, "nodeType": "ParameterList", "parameters": [], "src": "1382:2:24" }, "src": "1355:117:24", "virtual": false, "visibility": "internal" }, { "body": { "id": 7435, "nodeType": "Block", "src": "1503:61:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7430, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "1521:9:24", "subExpression": { "argumentTypes": null, "id": 7429, "name": "_CLOSED_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9425, "src": "1522:8:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "444f444f5f434c4f534544", "id": 7431, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1532:13:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_b376000e0a4ab5aa456645b38033c091a45a656f290df894531d9e6e6accb956", "typeString": "literal_string \"DODO_CLOSED\"" }, "value": "DODO_CLOSED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_b376000e0a4ab5aa456645b38033c091a45a656f290df894531d9e6e6accb956", "typeString": "literal_string \"DODO_CLOSED\"" } ], "id": 7428, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1513:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7432, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1513:33:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7433, "nodeType": "ExpressionStatement", "src": "1513:33:24" }, { "id": 7434, "nodeType": "PlaceholderStatement", "src": "1556:1:24" } ] }, "documentation": null, "id": 7436, "name": "dodoNotClosed", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 7427, "nodeType": "ParameterList", "parameters": [], "src": "1500:2:24" }, "src": "1478:86:24", "virtual": false, "visibility": "internal" }, { "body": { "id": 7449, "nodeType": "Block", "src": "1687:58:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7444, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1719:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7445, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1719:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7446, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7438, "src": "1731:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7443, "name": "withdrawBaseTo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7908, "src": "1704:14:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (address,uint256) returns (uint256)" } }, "id": 7447, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1704:34:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7442, "id": 7448, "nodeType": "Return", "src": "1697:41:24" } ] }, "documentation": null, "functionSelector": "f98bea15", "id": 7450, "implemented": true, "kind": "function", "modifiers": [], "name": "withdrawBase", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7439, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7438, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7450, "src": "1644:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7437, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1644:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1643:16:24" }, "returnParameters": { "id": 7442, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7441, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7450, "src": "1678:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7440, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1678:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1677:9:24" }, "scope": 8369, "src": "1622:123:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 7463, "nodeType": "Block", "src": "1815:57:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7458, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1846:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7459, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1846:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7460, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7452, "src": "1858:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7457, "name": "depositBaseTo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7682, "src": "1832:13:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (address,uint256) returns (uint256)" } }, "id": 7461, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1832:33:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7456, "id": 7462, "nodeType": "Return", "src": "1825:40:24" } ] }, "documentation": null, "functionSelector": "27bed8ee", "id": 7464, "implemented": true, "kind": "function", "modifiers": [], "name": "depositBase", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7453, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7452, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7464, "src": "1772:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7451, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1772:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1771:16:24" }, "returnParameters": { "id": 7456, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7455, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7464, "src": "1806:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7454, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1806:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1805:9:24" }, "scope": 8369, "src": "1751:121:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 7477, "nodeType": "Block", "src": "1944:59:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7472, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1977:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7473, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1977:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7474, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7466, "src": "1989:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7471, "name": "withdrawQuoteTo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7795, "src": "1961:15:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (address,uint256) returns (uint256)" } }, "id": 7475, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1961:35:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7470, "id": 7476, "nodeType": "Return", "src": "1954:42:24" } ] }, "documentation": null, "functionSelector": "c0a5f6ff", "id": 7478, "implemented": true, "kind": "function", "modifiers": [], "name": "withdrawQuote", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7467, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7466, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7478, "src": "1901:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7465, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1901:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1900:16:24" }, "returnParameters": { "id": 7470, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7469, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7478, "src": "1935:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7468, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1935:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1934:9:24" }, "scope": 8369, "src": "1878:125:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 7491, "nodeType": "Block", "src": "2074:58:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7486, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2106:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7487, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2106:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7488, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7480, "src": "2118:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7485, "name": "depositQuoteTo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7598, "src": "2091:14:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (address,uint256) returns (uint256)" } }, "id": 7489, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2091:34:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7484, "id": 7490, "nodeType": "Return", "src": "2084:41:24" } ] }, "documentation": null, "functionSelector": "f3ae6c5f", "id": 7492, "implemented": true, "kind": "function", "modifiers": [], "name": "depositQuote", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7481, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7480, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7492, "src": "2031:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7479, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2031:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2030:16:24" }, "returnParameters": { "id": 7484, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7483, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7492, "src": "2065:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7482, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2065:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2064:9:24" }, "scope": 8369, "src": "2009:123:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 7502, "nodeType": "Block", "src": "2192:53:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7498, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2227:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7499, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2227:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 7497, "name": "withdrawAllBaseTo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8078, "src": "2209:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_uint256_$", "typeString": "function (address) returns (uint256)" } }, "id": 7500, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2209:29:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7496, "id": 7501, "nodeType": "Return", "src": "2202:36:24" } ] }, "documentation": null, "functionSelector": "d47eaa37", "id": 7503, "implemented": true, "kind": "function", "modifiers": [], "name": "withdrawAllBase", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7493, "nodeType": "ParameterList", "parameters": [], "src": "2162:2:24" }, "returnParameters": { "id": 7496, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7495, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7503, "src": "2183:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7494, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2183:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2182:9:24" }, "scope": 8369, "src": "2138:107:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 7513, "nodeType": "Block", "src": "2306:54:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7509, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2342:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7510, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2342:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 7508, "name": "withdrawAllQuoteTo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7993, "src": "2323:18:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_uint256_$", "typeString": "function (address) returns (uint256)" } }, "id": 7511, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2323:30:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7507, "id": 7512, "nodeType": "Return", "src": "2316:37:24" } ] }, "documentation": null, "functionSelector": "c59203af", "id": 7514, "implemented": true, "kind": "function", "modifiers": [], "name": "withdrawAllQuote", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7504, "nodeType": "ParameterList", "parameters": [], "src": "2276:2:24" }, "returnParameters": { "id": 7507, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7506, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7514, "src": "2297:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7505, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2297:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2296:9:24" }, "scope": 8369, "src": "2251:109:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 7597, "nodeType": "Block", "src": "2568:697:24", "statements": [ { "assignments": [ null, 7528 ], "declarations": [ null, { "constant": false, "id": 7528, "mutability": "mutable", "name": "quoteTarget", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7597, "src": "2581:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7527, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2581:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7531, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7529, "name": "getExpectedTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8733, "src": "2604:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$", "typeString": "function () view returns (uint256,uint256)" } }, "id": 7530, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2604:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "VariableDeclarationStatement", "src": "2578:45:24" }, { "assignments": [ 7533 ], "declarations": [ { "constant": false, "id": 7533, "mutability": "mutable", "name": "totalQuoteCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7597, "src": "2633:25:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7532, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2633:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7536, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7534, "name": "getTotalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9604, "src": "2661:20:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 7535, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2661:22:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "2633:50:24" }, { "assignments": [ 7538 ], "declarations": [ { "constant": false, "id": 7538, "mutability": "mutable", "name": "capital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7597, "src": "2693:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7537, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2693:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7540, "initialValue": { "argumentTypes": null, "id": 7539, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7518, "src": "2711:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "2693:24:24" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7543, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7541, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7533, "src": "2731:17:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 7542, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2752:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "2731:22:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7554, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7552, "name": "quoteTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7528, "src": "2881:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 7553, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2895:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "2881:15:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 7566, "nodeType": "IfStatement", "src": "2877:102:24", "trueBody": { "id": 7565, "nodeType": "Block", "src": "2898:81:24", "statements": [ { "expression": { "argumentTypes": null, "id": 7563, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7555, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7538, "src": "2912:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7561, "name": "quoteTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7528, "src": "2956:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7558, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7533, "src": "2933:17:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7556, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7518, "src": "2922:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7557, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "2922:10:24", "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": 7559, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2922:29:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7560, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "2922:33:24", "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": 7562, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2922:46:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2912:56:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7564, "nodeType": "ExpressionStatement", "src": "2912:56:24" } ] } }, "id": 7567, "nodeType": "IfStatement", "src": "2727:252:24", "trueBody": { "id": 7551, "nodeType": "Block", "src": "2755:116:24", "statements": [ { "expression": { "argumentTypes": null, "id": 7549, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7544, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7538, "src": "2827:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7547, "name": "quoteTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7528, "src": "2848:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7545, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7518, "src": "2837:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7546, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "2837:10:24", "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": 7548, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2837:23:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2827:33:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7550, "nodeType": "ExpressionStatement", "src": "2827:33:24" } ] } }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7569, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3033:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7570, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3033:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7571, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7518, "src": "3045:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7568, "name": "_quoteTokenTransferIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8967, "src": "3011:21:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7572, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3011:41:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7573, "nodeType": "ExpressionStatement", "src": "3011:41:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7575, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7516, "src": "3080:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 7576, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7538, "src": "3084:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7574, "name": "_mintQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8110, "src": "3062:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7577, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3062:30:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7578, "nodeType": "ExpressionStatement", "src": "3062:30:24" }, { "expression": { "argumentTypes": null, "id": 7584, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7579, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "3102:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7582, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7518, "src": "3164:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7580, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "3132:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7581, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "3132:31:24", "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": 7583, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3132:39:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3102:69:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7585, "nodeType": "ExpressionStatement", "src": "3102:69:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7587, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3195:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7588, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3195:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7589, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7516, "src": "3207:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "66616c7365", "id": 7590, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "3211:5:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, { "argumentTypes": null, "id": 7591, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7518, "src": "3218:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 7592, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7538, "src": "3226:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7586, "name": "Deposit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7388, "src": "3187:7:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,address,bool,uint256,uint256)" } }, "id": 7593, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3187:47:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7594, "nodeType": "EmitStatement", "src": "3182:52:24" }, { "expression": { "argumentTypes": null, "id": 7595, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7538, "src": "3251:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7526, "id": 7596, "nodeType": "Return", "src": "3244:14:24" } ] }, "documentation": null, "functionSelector": "5f179f64", "id": 7598, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 7521, "modifierName": { "argumentTypes": null, "id": 7520, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "2493:16:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2493:16:24" }, { "arguments": null, "id": 7523, "modifierName": { "argumentTypes": null, "id": 7522, "name": "depositQuoteAllowed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7417, "src": "2518:19:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2518:19:24" } ], "name": "depositQuoteTo", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7519, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7516, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7598, "src": "2442:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7515, "name": "address", "nodeType": "ElementaryTypeName", "src": "2442:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7518, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7598, "src": "2454:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7517, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2454:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2441:28:24" }, "returnParameters": { "id": 7526, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7525, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7598, "src": "2555:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7524, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2555:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2554:9:24" }, "scope": 8369, "src": "2418:847:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 7681, "nodeType": "Block", "src": "3419:683:24", "statements": [ { "assignments": [ 7612, null ], "declarations": [ { "constant": false, "id": 7612, "mutability": "mutable", "name": "baseTarget", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7681, "src": "3430:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7611, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3430:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, null ], "id": 7615, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7613, "name": "getExpectedTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8733, "src": "3454:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$", "typeString": "function () view returns (uint256,uint256)" } }, "id": 7614, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3454:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "VariableDeclarationStatement", "src": "3429:44:24" }, { "assignments": [ 7617 ], "declarations": [ { "constant": false, "id": 7617, "mutability": "mutable", "name": "totalBaseCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7681, "src": "3483:24:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7616, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3483:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7620, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7618, "name": "getTotalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9577, "src": "3510:19:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 7619, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3510:21:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3483:48:24" }, { "assignments": [ 7622 ], "declarations": [ { "constant": false, "id": 7622, "mutability": "mutable", "name": "capital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7681, "src": "3541:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7621, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3541:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7624, "initialValue": { "argumentTypes": null, "id": 7623, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7602, "src": "3559:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3541:24:24" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7627, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7625, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7617, "src": "3579:16:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 7626, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3599:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "3579:21:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7638, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7636, "name": "baseTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7612, "src": "3726:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 7637, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3739:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "3726:14:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 7650, "nodeType": "IfStatement", "src": "3722:99:24", "trueBody": { "id": 7649, "nodeType": "Block", "src": "3742:79:24", "statements": [ { "expression": { "argumentTypes": null, "id": 7647, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7639, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7622, "src": "3756:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7645, "name": "baseTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7612, "src": "3799:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7642, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7617, "src": "3777:16:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7640, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7602, "src": "3766:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7641, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "3766:10:24", "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": 7643, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3766:28:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7644, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "3766:32:24", "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": 7646, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3766:44:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3756:54:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7648, "nodeType": "ExpressionStatement", "src": "3756:54:24" } ] } }, "id": 7651, "nodeType": "IfStatement", "src": "3575:246:24", "trueBody": { "id": 7635, "nodeType": "Block", "src": "3602:114:24", "statements": [ { "expression": { "argumentTypes": null, "id": 7633, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7628, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7622, "src": "3673:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7631, "name": "baseTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7612, "src": "3694:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7629, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7602, "src": "3683:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7630, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "3683:10:24", "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": 7632, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3683:22:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3673:32:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7634, "nodeType": "ExpressionStatement", "src": "3673:32:24" } ] } }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7653, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3874:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7654, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3874:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7655, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7602, "src": "3886:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7652, "name": "_baseTokenTransferIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8930, "src": "3853:20:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7656, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3853:40:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7657, "nodeType": "ExpressionStatement", "src": "3853:40:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7659, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7600, "src": "3920:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 7660, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7622, "src": "3924:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7658, "name": "_mintBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8094, "src": "3903:16:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7661, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3903:29:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7662, "nodeType": "ExpressionStatement", "src": "3903:29:24" }, { "expression": { "argumentTypes": null, "id": 7668, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7663, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "3942:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7666, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7602, "src": "4002:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7664, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "3971:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7665, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "3971:30:24", "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": 7667, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3971:38:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3942:67:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7669, "nodeType": "ExpressionStatement", "src": "3942:67:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7671, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4033:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7672, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4033:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7673, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7600, "src": "4045:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "74727565", "id": 7674, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "4049:4:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, { "argumentTypes": null, "id": 7675, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7602, "src": "4055:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 7676, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7622, "src": "4063:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7670, "name": "Deposit", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7388, "src": "4025:7:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,address,bool,uint256,uint256)" } }, "id": 7677, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4025:46:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7678, "nodeType": "EmitStatement", "src": "4020:51:24" }, { "expression": { "argumentTypes": null, "id": 7679, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7622, "src": "4088:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7610, "id": 7680, "nodeType": "Return", "src": "4081:14:24" } ] }, "documentation": null, "functionSelector": "aa06ce9b", "id": 7682, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 7605, "modifierName": { "argumentTypes": null, "id": 7604, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "3345:16:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3345:16:24" }, { "arguments": null, "id": 7607, "modifierName": { "argumentTypes": null, "id": 7606, "name": "depositBaseAllowed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7426, "src": "3370:18:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3370:18:24" } ], "name": "depositBaseTo", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7603, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7600, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7682, "src": "3294:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7599, "name": "address", "nodeType": "ElementaryTypeName", "src": "3294:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7602, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7682, "src": "3306:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7601, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3306:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "3293:28:24" }, "returnParameters": { "id": 7610, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7609, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7682, "src": "3406:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7608, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3406:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "3405:9:24" }, "scope": 8369, "src": "3271:831:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 7794, "nodeType": "Block", "src": "4306:1051:24", "statements": [ { "assignments": [ null, 7696 ], "declarations": [ null, { "constant": false, "id": 7696, "mutability": "mutable", "name": "quoteTarget", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7794, "src": "4348:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7695, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4348:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7699, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7697, "name": "getExpectedTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8733, "src": "4371:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$", "typeString": "function () view returns (uint256,uint256)" } }, "id": 7698, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4371:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "VariableDeclarationStatement", "src": "4345:45:24" }, { "assignments": [ 7701 ], "declarations": [ { "constant": false, "id": 7701, "mutability": "mutable", "name": "totalQuoteCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7794, "src": "4400:25:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7700, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4400:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7704, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7702, "name": "getTotalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9604, "src": "4428:20:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 7703, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4428:22:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4400:50:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7708, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7706, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7701, "src": "4468:17:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 7707, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4488:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "4468:21:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f5f51554f54455f4c50", "id": 7709, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4491:13:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_45201781226c6ef295dd5fc256e793e26359d1272043d931959202cf3772a527", "typeString": "literal_string \"NO_QUOTE_LP\"" }, "value": "NO_QUOTE_LP" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_45201781226c6ef295dd5fc256e793e26359d1272043d931959202cf3772a527", "typeString": "literal_string \"NO_QUOTE_LP\"" } ], "id": 7705, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "4460:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7710, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4460:45:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7711, "nodeType": "ExpressionStatement", "src": "4460:45:24" }, { "assignments": [ 7713 ], "declarations": [ { "constant": false, "id": 7713, "mutability": "mutable", "name": "requireQuoteCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7794, "src": "4516:27:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7712, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4516:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7721, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7719, "name": "quoteTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7696, "src": "4584:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7716, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7701, "src": "4557:17:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7714, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "4546:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7715, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "4546:10:24", "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": 7717, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4546:29:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7718, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "divCeil", "nodeType": "MemberAccess", "referencedDeclaration": 11536, "src": "4546:37:24", "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": 7720, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4546:50:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4516:80:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7728, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7723, "name": "requireQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7713, "src": "4627:19:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7725, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4675:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7726, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4675:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 7724, "name": "getQuoteCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9592, "src": "4650:24:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 7727, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4650:36:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4627:59:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4c505f51554f54455f4341504954414c5f42414c414e43455f4e4f545f454e4f554748", "id": 7729, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4700:37:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_5bad2f07e59b1b4b8d72ecf482313290c21067f6dbad6059e0d3f71b7d3bcc8a", "typeString": "literal_string \"LP_QUOTE_CAPITAL_BALANCE_NOT_ENOUGH\"" }, "value": "LP_QUOTE_CAPITAL_BALANCE_NOT_ENOUGH" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_5bad2f07e59b1b4b8d72ecf482313290c21067f6dbad6059e0d3f71b7d3bcc8a", "typeString": "literal_string \"LP_QUOTE_CAPITAL_BALANCE_NOT_ENOUGH\"" } ], "id": 7722, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "4606:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7730, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4606:141:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7731, "nodeType": "ExpressionStatement", "src": "4606:141:24" }, { "assignments": [ 7733 ], "declarations": [ { "constant": false, "id": 7733, "mutability": "mutable", "name": "penalty", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7794, "src": "4811:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7732, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4811:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7737, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7735, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "4853:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7734, "name": "getWithdrawQuotePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8294, "src": "4829:23:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256) view returns (uint256)" } }, "id": 7736, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4829:31:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4811:49:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7741, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7739, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7733, "src": "4878:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "argumentTypes": null, "id": 7740, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "4888:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4878:16:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "50454e414c54595f455843454544", "id": 7742, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4896:16:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" }, "value": "PENALTY_EXCEED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" } ], "id": 7738, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "4870:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7743, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4870:43:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7744, "nodeType": "ExpressionStatement", "src": "4870:43:24" }, { "expression": { "argumentTypes": null, "id": 7750, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7745, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "4946:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7748, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "5008:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7746, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "4976:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7747, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "4976:31:24", "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": 7749, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4976:39:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4946:69:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7751, "nodeType": "ExpressionStatement", "src": "4946:69:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7753, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5043:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7754, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5043:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7755, "name": "requireQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7713, "src": "5055:19:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7752, "name": "_burnQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8142, "src": "5025:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7756, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5025:50:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7757, "nodeType": "ExpressionStatement", "src": "5025:50:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7759, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7684, "src": "5108:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7762, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7733, "src": "5123:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7760, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "5112:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7761, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "5112:10:24", "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": 7763, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5112:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7758, "name": "_quoteTokenTransferOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9013, "src": "5085:22:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7764, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5085:47:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7765, "nodeType": "ExpressionStatement", "src": "5085:47:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7767, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7733, "src": "5160:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7766, "name": "_donateQuoteToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9049, "src": "5142:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 7768, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5142:26:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7769, "nodeType": "ExpressionStatement", "src": "5142:26:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7771, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5193:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7772, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5193:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7773, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7684, "src": "5205:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "66616c7365", "id": 7774, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "5209:5:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7777, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7733, "src": "5227:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7775, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "5216:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7776, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "5216:10:24", "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": 7778, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5216:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 7779, "name": "requireQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7713, "src": "5237:19:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7770, "name": "Withdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7400, "src": "5184:8:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,address,bool,uint256,uint256)" } }, "id": 7780, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5184:73:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7781, "nodeType": "EmitStatement", "src": "5179:78:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7783, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5286:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7784, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5286:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "hexValue": "66616c7365", "id": 7785, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "5298:5:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, { "argumentTypes": null, "id": 7786, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7733, "src": "5305:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7782, "name": "ChargePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7408, "src": "5272:13:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_uint256_$returns$__$", "typeString": "function (address,bool,uint256)" } }, "id": 7787, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5272:41:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7788, "nodeType": "EmitStatement", "src": "5267:46:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7791, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7733, "src": "5342:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7789, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7686, "src": "5331:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7790, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "5331:10:24", "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": 7792, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5331:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7694, "id": 7793, "nodeType": "Return", "src": "5324:26:24" } ] }, "documentation": null, "functionSelector": "108db744", "id": 7795, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 7689, "modifierName": { "argumentTypes": null, "id": 7688, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "4237:16:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "4237:16:24" }, { "arguments": null, "id": 7691, "modifierName": { "argumentTypes": null, "id": 7690, "name": "dodoNotClosed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7436, "src": "4262:13:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "4262:13:24" } ], "name": "withdrawQuoteTo", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7687, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7684, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7795, "src": "4186:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7683, "name": "address", "nodeType": "ElementaryTypeName", "src": "4186:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7686, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7795, "src": "4198:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7685, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4198:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "4185:28:24" }, "returnParameters": { "id": 7694, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7693, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7795, "src": "4293:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7692, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4293:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "4292:9:24" }, "scope": 8369, "src": "4161:1196:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 7907, "nodeType": "Block", "src": "5507:1031:24", "statements": [ { "assignments": [ 7809, null ], "declarations": [ { "constant": false, "id": 7809, "mutability": "mutable", "name": "baseTarget", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7907, "src": "5547:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7808, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5547:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, null ], "id": 7812, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7810, "name": "getExpectedTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8733, "src": "5571:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$", "typeString": "function () view returns (uint256,uint256)" } }, "id": 7811, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5571:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "VariableDeclarationStatement", "src": "5546:44:24" }, { "assignments": [ 7814 ], "declarations": [ { "constant": false, "id": 7814, "mutability": "mutable", "name": "totalBaseCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7907, "src": "5600:24:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7813, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5600:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7817, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 7815, "name": "getTotalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9577, "src": "5627:19:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 7816, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5627:21:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "5600:48:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7821, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7819, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7814, "src": "5666:16:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 7820, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5685:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "5666:20:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f5f424153455f4c50", "id": 7822, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5688:12:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_2055d54795f762d6673f3bc8faaa342b115cddd4a9aa8ace9a8727200addf048", "typeString": "literal_string \"NO_BASE_LP\"" }, "value": "NO_BASE_LP" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_2055d54795f762d6673f3bc8faaa342b115cddd4a9aa8ace9a8727200addf048", "typeString": "literal_string \"NO_BASE_LP\"" } ], "id": 7818, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5658:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7823, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5658:43:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7824, "nodeType": "ExpressionStatement", "src": "5658:43:24" }, { "assignments": [ 7826 ], "declarations": [ { "constant": false, "id": 7826, "mutability": "mutable", "name": "requireBaseCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7907, "src": "5712:26:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7825, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5712:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7834, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7832, "name": "baseTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7809, "src": "5778:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7829, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7814, "src": "5752:16:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7827, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "5741:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7828, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "5741:10:24", "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": 7830, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5741:28:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7831, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "divCeil", "nodeType": "MemberAccess", "referencedDeclaration": 11536, "src": "5741:36:24", "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": 7833, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5741:48:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "5712:77:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7841, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7836, "name": "requireBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7826, "src": "5820:18:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7838, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "5866:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7839, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5866:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 7837, "name": "getBaseCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9565, "src": "5842:23:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 7840, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5842:35:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5820:57:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4c505f424153455f4341504954414c5f42414c414e43455f4e4f545f454e4f554748", "id": 7842, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5891:36:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_e164233d6cf78234887d09e5e50c550b2c28ca6ae5f0aec3a8a1a3855da5f380", "typeString": "literal_string \"LP_BASE_CAPITAL_BALANCE_NOT_ENOUGH\"" }, "value": "LP_BASE_CAPITAL_BALANCE_NOT_ENOUGH" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_e164233d6cf78234887d09e5e50c550b2c28ca6ae5f0aec3a8a1a3855da5f380", "typeString": "literal_string \"LP_BASE_CAPITAL_BALANCE_NOT_ENOUGH\"" } ], "id": 7835, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5799:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7843, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5799:138:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7844, "nodeType": "ExpressionStatement", "src": "5799:138:24" }, { "assignments": [ 7846 ], "declarations": [ { "constant": false, "id": 7846, "mutability": "mutable", "name": "penalty", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7907, "src": "6001:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7845, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6001:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7850, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7848, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "6042:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7847, "name": "getWithdrawBasePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8368, "src": "6019:22:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256) view returns (uint256)" } }, "id": 7849, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6019:30:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "6001:48:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7854, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7852, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7846, "src": "6067:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 7853, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "6078:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "6067:17:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "50454e414c54595f455843454544", "id": 7855, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6086:16:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" }, "value": "PENALTY_EXCEED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" } ], "id": 7851, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "6059:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7856, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6059:44:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7857, "nodeType": "ExpressionStatement", "src": "6059:44:24" }, { "expression": { "argumentTypes": null, "id": 7863, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7858, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "6136:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7861, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "6196:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7859, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "6165:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7860, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "6165:30:24", "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": 7862, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6165:38:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "6136:67:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7864, "nodeType": "ExpressionStatement", "src": "6136:67:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7866, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6230:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7867, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "6230:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7868, "name": "requireBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7826, "src": "6242:18:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7865, "name": "_burnBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8126, "src": "6213:16:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7869, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6213:48:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7870, "nodeType": "ExpressionStatement", "src": "6213:48:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7872, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7797, "src": "6293:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7875, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7846, "src": "6308:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7873, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "6297:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7874, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "6297:10:24", "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": 7876, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6297:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7871, "name": "_baseTokenTransferOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8990, "src": "6271:21:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7877, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6271:46:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7878, "nodeType": "ExpressionStatement", "src": "6271:46:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7880, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7846, "src": "6344:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7879, "name": "_donateBaseToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9031, "src": "6327:16:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 7881, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6327:25:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7882, "nodeType": "ExpressionStatement", "src": "6327:25:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7884, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6377:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7885, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "6377:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7886, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7797, "src": "6389:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "74727565", "id": 7887, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "6393:4:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7890, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7846, "src": "6410:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7888, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "6399:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7889, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "6399:10:24", "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": 7891, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6399:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 7892, "name": "requireBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7826, "src": "6420:18:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7883, "name": "Withdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7400, "src": "6368:8:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,address,bool,uint256,uint256)" } }, "id": 7893, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6368:71:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7894, "nodeType": "EmitStatement", "src": "6363:76:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7896, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6468:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7897, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "6468:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "hexValue": "74727565", "id": 7898, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "6480:4:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, { "argumentTypes": null, "id": 7899, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7846, "src": "6486:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7895, "name": "ChargePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7408, "src": "6454:13:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_uint256_$returns$__$", "typeString": "function (address,bool,uint256)" } }, "id": 7900, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6454:40:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7901, "nodeType": "EmitStatement", "src": "6449:45:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7904, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7846, "src": "6523:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7902, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7799, "src": "6512:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7903, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "6512:10:24", "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": 7905, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6512:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7807, "id": 7906, "nodeType": "Return", "src": "6505:26:24" } ] }, "documentation": null, "functionSelector": "947cf92b", "id": 7908, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 7802, "modifierName": { "argumentTypes": null, "id": 7801, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "5438:16:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "5438:16:24" }, { "arguments": null, "id": 7804, "modifierName": { "argumentTypes": null, "id": 7803, "name": "dodoNotClosed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7436, "src": "5463:13:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "5463:13:24" } ], "name": "withdrawBaseTo", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7800, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7797, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7908, "src": "5387:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7796, "name": "address", "nodeType": "ElementaryTypeName", "src": "5387:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7799, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7908, "src": "5399:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7798, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5399:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5386:28:24" }, "returnParameters": { "id": 7807, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7806, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7908, "src": "5494:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7805, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5494:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5493:9:24" }, "scope": 8369, "src": "5363:1175:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 7992, "nodeType": "Block", "src": "6733:750:24", "statements": [ { "assignments": [ 7920 ], "declarations": [ { "constant": false, "id": 7920, "mutability": "mutable", "name": "withdrawAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7992, "src": "6743:22:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7919, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6743:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7925, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7922, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6786:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7923, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "6786:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 7921, "name": "getLpQuoteBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8220, "src": "6768:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 7924, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6768:29:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "6743:54:24" }, { "assignments": [ 7927 ], "declarations": [ { "constant": false, "id": 7927, "mutability": "mutable", "name": "capital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7992, "src": "6807:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7926, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6807:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7932, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7929, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6850:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7930, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "6850:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 7928, "name": "getQuoteCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9592, "src": "6825:24:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 7931, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6825:36:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "6807:54:24" }, { "assignments": [ 7934 ], "declarations": [ { "constant": false, "id": 7934, "mutability": "mutable", "name": "penalty", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7992, "src": "6925:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7933, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6925:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 7938, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7936, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7920, "src": "6967:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7935, "name": "getWithdrawQuotePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8294, "src": "6943:23:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256) view returns (uint256)" } }, "id": 7937, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6943:39:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "6925:57:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 7942, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 7940, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7934, "src": "7000:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 7941, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7920, "src": "7011:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "7000:25:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "50454e414c54595f455843454544", "id": 7943, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7027:16:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" }, "value": "PENALTY_EXCEED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" } ], "id": 7939, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "6992:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 7944, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6992:52:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7945, "nodeType": "ExpressionStatement", "src": "6992:52:24" }, { "expression": { "argumentTypes": null, "id": 7951, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 7946, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "7077:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7949, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7920, "src": "7139:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7947, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "7107:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7948, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "7107:31:24", "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": 7950, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7107:47:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "7077:77:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7952, "nodeType": "ExpressionStatement", "src": "7077:77:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7954, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "7182:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7955, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7182:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7956, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7927, "src": "7194:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7953, "name": "_burnQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8142, "src": "7164:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7957, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7164:38:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7958, "nodeType": "ExpressionStatement", "src": "7164:38:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7960, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7910, "src": "7235:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7963, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7934, "src": "7258:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7961, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7920, "src": "7239:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7962, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "7239:18:24", "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": 7964, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7239:27:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7959, "name": "_quoteTokenTransferOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9013, "src": "7212:22:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 7965, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7212:55:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7966, "nodeType": "ExpressionStatement", "src": "7212:55:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7968, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7934, "src": "7295:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7967, "name": "_donateQuoteToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9049, "src": "7277:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 7969, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7277:26:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7970, "nodeType": "ExpressionStatement", "src": "7277:26:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7972, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "7328:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7973, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7328:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 7974, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7910, "src": "7340:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "66616c7365", "id": 7975, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "7344:5:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, { "argumentTypes": null, "id": 7976, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7920, "src": "7351:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 7977, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7927, "src": "7367:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7971, "name": "Withdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7400, "src": "7319:8:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,address,bool,uint256,uint256)" } }, "id": 7978, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7319:56:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7979, "nodeType": "EmitStatement", "src": "7314:61:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 7981, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "7404:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 7982, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7404:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "hexValue": "66616c7365", "id": 7983, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "7416:5:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, { "argumentTypes": null, "id": 7984, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7934, "src": "7423:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 7980, "name": "ChargePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7408, "src": "7390:13:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_uint256_$returns$__$", "typeString": "function (address,bool,uint256)" } }, "id": 7985, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7390:41:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7986, "nodeType": "EmitStatement", "src": "7385:46:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7989, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7934, "src": "7468:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7987, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7920, "src": "7449:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 7988, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "7449:18:24", "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": 7990, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7449:27:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 7918, "id": 7991, "nodeType": "Return", "src": "7442:34:24" } ] }, "documentation": null, "functionSelector": "04512dc4", "id": 7993, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 7913, "modifierName": { "argumentTypes": null, "id": 7912, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "6664:16:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "6664:16:24" }, { "arguments": null, "id": 7915, "modifierName": { "argumentTypes": null, "id": 7914, "name": "dodoNotClosed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7436, "src": "6689:13:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "6689:13:24" } ], "name": "withdrawAllQuoteTo", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7911, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7910, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7993, "src": "6629:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7909, "name": "address", "nodeType": "ElementaryTypeName", "src": "6629:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "6628:12:24" }, "returnParameters": { "id": 7918, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7917, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7993, "src": "6720:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7916, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6720:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6719:9:24" }, "scope": 8369, "src": "6601:882:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 8077, "nodeType": "Block", "src": "7584:740:24", "statements": [ { "assignments": [ 8005 ], "declarations": [ { "constant": false, "id": 8005, "mutability": "mutable", "name": "withdrawAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8077, "src": "7594:22:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8004, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7594:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8010, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8007, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "7636:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 8008, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7636:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 8006, "name": "getLpBaseBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8181, "src": "7619:16:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 8009, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7619:28:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "7594:53:24" }, { "assignments": [ 8012 ], "declarations": [ { "constant": false, "id": 8012, "mutability": "mutable", "name": "capital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8077, "src": "7657:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8011, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7657:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8017, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8014, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "7699:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 8015, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7699:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 8013, "name": "getBaseCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9565, "src": "7675:23:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 8016, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7675:35:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "7657:53:24" }, { "assignments": [ 8019 ], "declarations": [ { "constant": false, "id": 8019, "mutability": "mutable", "name": "penalty", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8077, "src": "7774:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8018, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7774:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8023, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8021, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8005, "src": "7815:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 8020, "name": "getWithdrawBasePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8368, "src": "7792:22:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256) view returns (uint256)" } }, "id": 8022, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7792:38:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "7774:56:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8027, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8025, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8019, "src": "7848:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 8026, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8005, "src": "7859:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "7848:25:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "50454e414c54595f455843454544", "id": 8028, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7875:16:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" }, "value": "PENALTY_EXCEED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_af45c887a0c55e74d3b6ab9848241dbf6ed28c9c1025c29eecc72eb9398254c6", "typeString": "literal_string \"PENALTY_EXCEED\"" } ], "id": 8024, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "7840:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 8029, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7840:52:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8030, "nodeType": "ExpressionStatement", "src": "7840:52:24" }, { "expression": { "argumentTypes": null, "id": 8036, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 8031, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "7925:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8034, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8005, "src": "7985:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8032, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "7954:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8033, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "7954:30:24", "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": 8035, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7954:46:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "7925:75:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8037, "nodeType": "ExpressionStatement", "src": "7925:75:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8039, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8027:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 8040, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8027:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 8041, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8012, "src": "8039:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 8038, "name": "_burnBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8126, "src": "8010:16:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 8042, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8010:37:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8043, "nodeType": "ExpressionStatement", "src": "8010:37:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8045, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7995, "src": "8079:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8048, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8019, "src": "8102:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8046, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8005, "src": "8083:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8047, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "8083:18:24", "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": 8049, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8083:27:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 8044, "name": "_baseTokenTransferOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8990, "src": "8057:21:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 8050, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8057:54:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8051, "nodeType": "ExpressionStatement", "src": "8057:54:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8053, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8019, "src": "8138:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 8052, "name": "_donateBaseToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9031, "src": "8121:16:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 8054, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8121:25:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8055, "nodeType": "ExpressionStatement", "src": "8121:25:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8057, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8171:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 8058, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8171:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 8059, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7995, "src": "8183:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "hexValue": "74727565", "id": 8060, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "8187:4:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, { "argumentTypes": null, "id": 8061, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8005, "src": "8193:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8062, "name": "capital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8012, "src": "8209:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 8056, "name": "Withdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7400, "src": "8162:8:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,address,bool,uint256,uint256)" } }, "id": 8063, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8162:55:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8064, "nodeType": "EmitStatement", "src": "8157:60:24" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8066, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8246:3:24", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 8067, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8246:10:24", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "hexValue": "74727565", "id": 8068, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "8258:4:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, { "argumentTypes": null, "id": 8069, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8019, "src": "8264:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 8065, "name": "ChargePenalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7408, "src": "8232:13:24", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_uint256_$returns$__$", "typeString": "function (address,bool,uint256)" } }, "id": 8070, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8232:40:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8071, "nodeType": "EmitStatement", "src": "8227:45:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8074, "name": "penalty", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8019, "src": "8309:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8072, "name": "withdrawAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8005, "src": "8290:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8073, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "8290:18:24", "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": 8075, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8290:27:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 8003, "id": 8076, "nodeType": "Return", "src": "8283:34:24" } ] }, "documentation": null, "functionSelector": "1e34b9cc", "id": 8078, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 7998, "modifierName": { "argumentTypes": null, "id": 7997, "name": "preventReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11295, "src": "7535:16:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "7535:16:24" }, { "arguments": null, "id": 8000, "modifierName": { "argumentTypes": null, "id": 7999, "name": "dodoNotClosed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7436, "src": "7552:13:24", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "7552:13:24" } ], "name": "withdrawAllBaseTo", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7996, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7995, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8078, "src": "7516:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7994, "name": "address", "nodeType": "ElementaryTypeName", "src": "7516:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "7515:12:24" }, "returnParameters": { "id": 8003, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8002, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8078, "src": "7575:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8001, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7575:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "7574:9:24" }, "scope": 8369, "src": "7489:835:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 8093, "nodeType": "Block", "src": "8446:70:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8089, "name": "user", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8080, "src": "8496:4:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8090, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8082, "src": "8502:6:24", "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": 8086, "name": "_BASE_CAPITAL_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9469, "src": "8469:20:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8085, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10536, "src": "8456:12:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODOLpToken_$10536_$", "typeString": "type(contract IDODOLpToken)" } }, "id": 8087, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8456:34:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODOLpToken_$10536", "typeString": "contract IDODOLpToken" } }, "id": 8088, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mint", "nodeType": "MemberAccess", "referencedDeclaration": 10516, "src": "8456:39:24", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256) external" } }, "id": 8091, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8456:53:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8092, "nodeType": "ExpressionStatement", "src": "8456:53:24" } ] }, "documentation": null, "id": 8094, "implemented": true, "kind": "function", "modifiers": [], "name": "_mintBaseCapital", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8083, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8080, "mutability": "mutable", "name": "user", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8094, "src": "8407:12:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8079, "name": "address", "nodeType": "ElementaryTypeName", "src": "8407:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8082, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8094, "src": "8421:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8081, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8421:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "8406:30:24" }, "returnParameters": { "id": 8084, "nodeType": "ParameterList", "parameters": [], "src": "8446:0:24" }, "scope": 8369, "src": "8381:135:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 8109, "nodeType": "Block", "src": "8588:71:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8105, "name": "user", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8096, "src": "8639:4:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8106, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8098, "src": "8645:6:24", "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": 8102, "name": "_QUOTE_CAPITAL_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9471, "src": "8611:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8101, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10536, "src": "8598:12:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODOLpToken_$10536_$", "typeString": "type(contract IDODOLpToken)" } }, "id": 8103, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8598:35:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODOLpToken_$10536", "typeString": "contract IDODOLpToken" } }, "id": 8104, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mint", "nodeType": "MemberAccess", "referencedDeclaration": 10516, "src": "8598:40:24", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256) external" } }, "id": 8107, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8598:54:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8108, "nodeType": "ExpressionStatement", "src": "8598:54:24" } ] }, "documentation": null, "id": 8110, "implemented": true, "kind": "function", "modifiers": [], "name": "_mintQuoteCapital", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8099, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8096, "mutability": "mutable", "name": "user", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8110, "src": "8549:12:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8095, "name": "address", "nodeType": "ElementaryTypeName", "src": "8549:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8098, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8110, "src": "8563:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8097, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8563:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "8548:30:24" }, "returnParameters": { "id": 8100, "nodeType": "ParameterList", "parameters": [], "src": "8588:0:24" }, "scope": 8369, "src": "8522:137:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 8125, "nodeType": "Block", "src": "8730:70:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8121, "name": "user", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8112, "src": "8780:4:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8122, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8114, "src": "8786:6:24", "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": 8118, "name": "_BASE_CAPITAL_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9469, "src": "8753:20:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8117, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10536, "src": "8740:12:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODOLpToken_$10536_$", "typeString": "type(contract IDODOLpToken)" } }, "id": 8119, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8740:34:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODOLpToken_$10536", "typeString": "contract IDODOLpToken" } }, "id": 8120, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "burn", "nodeType": "MemberAccess", "referencedDeclaration": 10523, "src": "8740:39:24", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256) external" } }, "id": 8123, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8740:53:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8124, "nodeType": "ExpressionStatement", "src": "8740:53:24" } ] }, "documentation": null, "id": 8126, "implemented": true, "kind": "function", "modifiers": [], "name": "_burnBaseCapital", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8115, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8112, "mutability": "mutable", "name": "user", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8126, "src": "8691:12:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8111, "name": "address", "nodeType": "ElementaryTypeName", "src": "8691:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8114, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8126, "src": "8705:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8113, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8705:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "8690:30:24" }, "returnParameters": { "id": 8116, "nodeType": "ParameterList", "parameters": [], "src": "8730:0:24" }, "scope": 8369, "src": "8665:135:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 8141, "nodeType": "Block", "src": "8872:71:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8137, "name": "user", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8128, "src": "8923:4:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 8138, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8130, "src": "8929:6:24", "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": 8134, "name": "_QUOTE_CAPITAL_TOKEN_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9471, "src": "8895:21:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8133, "name": "IDODOLpToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10536, "src": "8882:12:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IDODOLpToken_$10536_$", "typeString": "type(contract IDODOLpToken)" } }, "id": 8135, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8882:35:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IDODOLpToken_$10536", "typeString": "contract IDODOLpToken" } }, "id": 8136, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "burn", "nodeType": "MemberAccess", "referencedDeclaration": 10523, "src": "8882:40:24", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256) external" } }, "id": 8139, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8882:54:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8140, "nodeType": "ExpressionStatement", "src": "8882:54:24" } ] }, "documentation": null, "id": 8142, "implemented": true, "kind": "function", "modifiers": [], "name": "_burnQuoteCapital", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8131, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8128, "mutability": "mutable", "name": "user", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8142, "src": "8833:12:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8127, "name": "address", "nodeType": "ElementaryTypeName", "src": "8833:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 8130, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8142, "src": "8847:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8129, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8847:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "8832:30:24" }, "returnParameters": { "id": 8132, "nodeType": "ParameterList", "parameters": [], "src": "8872:0:24" }, "scope": 8369, "src": "8806:137:24", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 8180, "nodeType": "Block", "src": "9078:301:24", "statements": [ { "assignments": [ 8150 ], "declarations": [ { "constant": false, "id": 8150, "mutability": "mutable", "name": "totalBaseCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8180, "src": "9088:24:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8149, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9088:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8153, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 8151, "name": "getTotalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9577, "src": "9115:19:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 8152, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9115:21:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "9088:48:24" }, { "assignments": [ 8155, null ], "declarations": [ { "constant": false, "id": 8155, "mutability": "mutable", "name": "baseTarget", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8180, "src": "9147:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8154, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9147:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, null ], "id": 8158, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 8156, "name": "getExpectedTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8733, "src": "9171:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$", "typeString": "function () view returns (uint256,uint256)" } }, "id": 8157, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9171:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "VariableDeclarationStatement", "src": "9146:44:24" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8161, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8159, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8150, "src": "9204:16:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 8160, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9224:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "9204:21:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 8165, "nodeType": "IfStatement", "src": "9200:60:24", "trueBody": { "id": 8164, "nodeType": "Block", "src": "9227:33:24", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "30", "id": 8162, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9248:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 8148, "id": 8163, "nodeType": "Return", "src": "9241:8:24" } ] } }, { "expression": { "argumentTypes": null, "id": 8176, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 8166, "name": "lpBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8147, "src": "9269:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8174, "name": "totalBaseCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8150, "src": "9329:16:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8171, "name": "baseTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8155, "src": "9313:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8168, "name": "lp", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8144, "src": "9305:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8167, "name": "getBaseCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9565, "src": "9281:23:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 8169, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9281:27:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8170, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "9281:31:24", "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": 8172, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9281:43:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8173, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "9281:47:24", "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": 8175, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9281:65:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "9269:77:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8177, "nodeType": "ExpressionStatement", "src": "9269:77:24" }, { "expression": { "argumentTypes": null, "id": 8178, "name": "lpBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8147, "src": "9363:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 8148, "id": 8179, "nodeType": "Return", "src": "9356:16:24" } ] }, "documentation": null, "functionSelector": "95faa5f6", "id": 8181, "implemented": true, "kind": "function", "modifiers": [], "name": "getLpBaseBalance", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8145, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8144, "mutability": "mutable", "name": "lp", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8181, "src": "9026:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8143, "name": "address", "nodeType": "ElementaryTypeName", "src": "9026:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "9025:12:24" }, "returnParameters": { "id": 8148, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8147, "mutability": "mutable", "name": "lpBalance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8181, "src": "9059:17:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8146, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9059:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "9058:19:24" }, "scope": 8369, "src": "9000:379:24", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { "id": 8219, "nodeType": "Block", "src": "9464:308:24", "statements": [ { "assignments": [ 8189 ], "declarations": [ { "constant": false, "id": 8189, "mutability": "mutable", "name": "totalQuoteCapital", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8219, "src": "9474:25:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8188, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9474:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8192, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 8190, "name": "getTotalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9604, "src": "9502:20:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 8191, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9502:22:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "9474:50:24" }, { "assignments": [ null, 8194 ], "declarations": [ null, { "constant": false, "id": 8194, "mutability": "mutable", "name": "quoteTarget", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8219, "src": "9537:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8193, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9537:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8197, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 8195, "name": "getExpectedTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8733, "src": "9560:17:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$", "typeString": "function () view returns (uint256,uint256)" } }, "id": 8196, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9560:19:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "nodeType": "VariableDeclarationStatement", "src": "9534:45:24" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8200, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8198, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8189, "src": "9593:17:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 8199, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9614:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "9593:22:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 8204, "nodeType": "IfStatement", "src": "9589:61:24", "trueBody": { "id": 8203, "nodeType": "Block", "src": "9617:33:24", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "30", "id": 8201, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9638:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 8187, "id": 8202, "nodeType": "Return", "src": "9631:8:24" } ] } }, { "expression": { "argumentTypes": null, "id": 8215, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 8205, "name": "lpBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8186, "src": "9659:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8213, "name": "totalQuoteCapital", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8189, "src": "9721:17:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8210, "name": "quoteTarget", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8194, "src": "9704:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8207, "name": "lp", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8183, "src": "9696:2:24", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 8206, "name": "getQuoteCapitalBalanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9592, "src": "9671:24:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 8208, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9671:28:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8209, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11478, "src": "9671:32:24", "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": 8211, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9671:45:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8212, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 11499, "src": "9671:49:24", "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": 8214, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9671:68:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "9659:80:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8216, "nodeType": "ExpressionStatement", "src": "9659:80:24" }, { "expression": { "argumentTypes": null, "id": 8217, "name": "lpBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8186, "src": "9756:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 8187, "id": 8218, "nodeType": "Return", "src": "9749:16:24" } ] }, "documentation": null, "functionSelector": "36a53bbb", "id": 8220, "implemented": true, "kind": "function", "modifiers": [], "name": "getLpQuoteBalance", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8184, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8183, "mutability": "mutable", "name": "lp", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8220, "src": "9412:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8182, "name": "address", "nodeType": "ElementaryTypeName", "src": "9412:7:24", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "9411:12:24" }, "returnParameters": { "id": 8187, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8186, "mutability": "mutable", "name": "lpBalance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8220, "src": "9445:17:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8185, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9445:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "9444:19:24" }, "scope": 8369, "src": "9385:387:24", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { "id": 8293, "nodeType": "Block", "src": "9865:877:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8230, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8228, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8222, "src": "9883:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 8229, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "9893:15:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "9883:25:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "444f444f5f51554f54455f42414c414e43455f4e4f545f454e4f554748", "id": 8231, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9910:31:24", "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": 8227, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "9875:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 8232, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9875:67:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8233, "nodeType": "ExpressionStatement", "src": "9875:67:24" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" }, "id": 8238, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8234, "name": "_R_STATUS_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9459, "src": "9956:10:24", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8235, "name": "Types", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11631, "src": "9970:5:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Types_$11631_$", "typeString": "type(library Types)" } }, "id": 8236, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "RStatus", "nodeType": "MemberAccess", "referencedDeclaration": 11630, "src": "9970:13:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$", "typeString": "type(enum Types.RStatus)" } }, "id": 8237, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "BELOW_ONE", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "9970:23:24", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "src": "9956:37:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 8291, "nodeType": "Block", "src": "10703:33:24", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "30", "id": 8289, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10724:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 8226, "id": 8290, "nodeType": "Return", "src": "10717:8:24" } ] }, "id": 8292, "nodeType": "IfStatement", "src": "9952:784:24", "trueBody": { "id": 8288, "nodeType": "Block", "src": "9995:702:24", "statements": [ { "assignments": [ 8240 ], "declarations": [ { "constant": false, "id": 8240, "mutability": "mutable", "name": "spareBase", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8288, "src": "10009:17:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8239, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10009:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8245, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8243, "name": "_TARGET_BASE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9461, "src": "10048:26:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8241, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "10029:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8242, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "10029:18:24", "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": 8244, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10029:46:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "10009:66:24" }, { "assignments": [ 8247 ], "declarations": [ { "constant": false, "id": 8247, "mutability": "mutable", "name": "price", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8288, "src": "10089:13:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8246, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10089:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8250, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 8248, "name": "getOraclePrice", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9550, "src": "10105:14:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 8249, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10105:16:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "10089:32:24" }, { "assignments": [ 8252 ], "declarations": [ { "constant": false, "id": 8252, "mutability": "mutable", "name": "fairAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8288, "src": "10135:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8251, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10135:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8258, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8255, "name": "spareBase", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8240, "src": "10172:9:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8256, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8247, "src": "10183:5:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8253, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11078, "src": "10156:11:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$", "typeString": "type(library DecimalMath)" } }, "id": 8254, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 11023, "src": "10156:15:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 8257, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10156:33:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "10135:54:24" }, { "assignments": [ 8260 ], "declarations": [ { "constant": false, "id": 8260, "mutability": "mutable", "name": "targetQuote", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8288, "src": "10203:19:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8259, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10203:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8267, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8263, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "10284:15:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8264, "name": "_K_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9457, "src": "10317:3:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8265, "name": "fairAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8252, "src": "10338:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8261, "name": "DODOMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10992, "src": "10225:8:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DODOMath_$10992_$", "typeString": "type(library DODOMath)" } }, "id": 8262, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_SolveQuadraticFunctionForTarget", "nodeType": "MemberAccess", "referencedDeclaration": 10991, "src": "10225:41:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" } }, "id": 8266, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10225:137:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "10203:159:24" }, { "assignments": [ 8269 ], "declarations": [ { "constant": false, "id": 8269, "mutability": "mutable", "name": "targetQuoteWithWithdraw", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8288, "src": "10430:31:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8268, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10430:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8279, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8274, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8222, "src": "10543:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8272, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "10523:15:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8273, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "10523:19:24", "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": 8275, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10523:27:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8276, "name": "_K_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9457, "src": "10568:3:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8277, "name": "fairAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8252, "src": "10589:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8270, "name": "DODOMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10992, "src": "10464:8:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DODOMath_$10992_$", "typeString": "type(library DODOMath)" } }, "id": 8271, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_SolveQuadraticFunctionForTarget", "nodeType": "MemberAccess", "referencedDeclaration": 10991, "src": "10464:41:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" } }, "id": 8278, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10464:149:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "10430:183:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8284, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8222, "src": "10678:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8282, "name": "targetQuoteWithWithdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8269, "src": "10650:23:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8283, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "10650:27:24", "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": 8285, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10650:35:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8280, "name": "targetQuote", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8260, "src": "10634:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8281, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "10634:15:24", "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": 8286, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10634:52:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 8226, "id": 8287, "nodeType": "Return", "src": "10627:59:24" } ] } } ] }, "documentation": null, "functionSelector": "0c9f7bd0", "id": 8294, "implemented": true, "kind": "function", "modifiers": [], "name": "getWithdrawQuotePenalty", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8223, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8222, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8294, "src": "9811:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8221, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9811:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "9810:16:24" }, "returnParameters": { "id": 8226, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8225, "mutability": "mutable", "name": "penalty", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8294, "src": "9848:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8224, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9848:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "9847:17:24" }, "scope": 8369, "src": "9778:964:24", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { "id": 8367, "nodeType": "Block", "src": "10834:877:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8304, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8302, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8296, "src": "10852:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 8303, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "10862:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "10852:24:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "444f444f5f424153455f42414c414e43455f4e4f545f454e4f554748", "id": 8305, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10878:30:24", "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": 8301, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "10844:7:24", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 8306, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10844:65:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 8307, "nodeType": "ExpressionStatement", "src": "10844:65:24" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" }, "id": 8312, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 8308, "name": "_R_STATUS_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9459, "src": "10923:10:24", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 8309, "name": "Types", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11631, "src": "10937:5:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Types_$11631_$", "typeString": "type(library Types)" } }, "id": 8310, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "RStatus", "nodeType": "MemberAccess", "referencedDeclaration": 11630, "src": "10937:13:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$", "typeString": "type(enum Types.RStatus)" } }, "id": 8311, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "ABOVE_ONE", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "10937:23:24", "typeDescriptions": { "typeIdentifier": "t_enum$_RStatus_$11630", "typeString": "enum Types.RStatus" } }, "src": "10923:37:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 8365, "nodeType": "Block", "src": "11672:33:24", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "30", "id": 8363, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "11693:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 8300, "id": 8364, "nodeType": "Return", "src": "11686:8:24" } ] }, "id": 8366, "nodeType": "IfStatement", "src": "10919:786:24", "trueBody": { "id": 8362, "nodeType": "Block", "src": "10962:704:24", "statements": [ { "assignments": [ 8314 ], "declarations": [ { "constant": false, "id": 8314, "mutability": "mutable", "name": "spareQuote", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8362, "src": "10976:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8313, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10976:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8319, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8317, "name": "_TARGET_QUOTE_TOKEN_AMOUNT_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9463, "src": "11017:27:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8315, "name": "_QUOTE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9467, "src": "10997:15:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8316, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "10997:19:24", "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": 8318, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "10997:48:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "10976:69:24" }, { "assignments": [ 8321 ], "declarations": [ { "constant": false, "id": 8321, "mutability": "mutable", "name": "price", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8362, "src": "11059:13:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8320, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11059:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8324, "initialValue": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 8322, "name": "getOraclePrice", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9550, "src": "11075:14:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 8323, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11075:16:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "11059:32:24" }, { "assignments": [ 8326 ], "declarations": [ { "constant": false, "id": 8326, "mutability": "mutable", "name": "fairAmount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8362, "src": "11105:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8325, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11105:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8332, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8329, "name": "spareQuote", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8314, "src": "11147:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8330, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8321, "src": "11159:5:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8327, "name": "DecimalMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11078, "src": "11126:11:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$", "typeString": "type(library DecimalMath)" } }, "id": 8328, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "divFloor", "nodeType": "MemberAccess", "referencedDeclaration": 11059, "src": "11126:20:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 8331, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11126:39:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "11105:60:24" }, { "assignments": [ 8334 ], "declarations": [ { "constant": false, "id": 8334, "mutability": "mutable", "name": "targetBase", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8362, "src": "11179:18:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8333, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11179:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8341, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8337, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "11259:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8338, "name": "_K_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9457, "src": "11291:3:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8339, "name": "fairAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8326, "src": "11312:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8335, "name": "DODOMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10992, "src": "11200:8:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DODOMath_$10992_$", "typeString": "type(library DODOMath)" } }, "id": 8336, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_SolveQuadraticFunctionForTarget", "nodeType": "MemberAccess", "referencedDeclaration": 10991, "src": "11200:41:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" } }, "id": 8340, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11200:136:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "11179:157:24" }, { "assignments": [ 8343 ], "declarations": [ { "constant": false, "id": 8343, "mutability": "mutable", "name": "targetBaseWithWithdraw", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8362, "src": "11403:30:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8342, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11403:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 8353, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8348, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8296, "src": "11514:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8346, "name": "_BASE_BALANCE_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9465, "src": "11495:14:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8347, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "11495:18:24", "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": 8349, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11495:26:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8350, "name": "_K_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9457, "src": "11539:3:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 8351, "name": "fairAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8326, "src": "11560:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8344, "name": "DODOMath", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 10992, "src": "11436:8:24", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DODOMath_$10992_$", "typeString": "type(library DODOMath)" } }, "id": 8345, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_SolveQuadraticFunctionForTarget", "nodeType": "MemberAccess", "referencedDeclaration": 10991, "src": "11436:41:24", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" } }, "id": 8352, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11436:148:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "11403:181:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 8358, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8296, "src": "11647:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8356, "name": "targetBaseWithWithdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8343, "src": "11620:22:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8357, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 11582, "src": "11620:26:24", "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": 8359, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11620:34:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 8354, "name": "targetBase", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8334, "src": "11605:10:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8355, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 11557, "src": "11605:14:24", "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": 8360, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11605:50:24", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 8300, "id": 8361, "nodeType": "Return", "src": "11598:57:24" } ] } } ] }, "documentation": null, "functionSelector": "ee5150b3", "id": 8368, "implemented": true, "kind": "function", "modifiers": [], "name": "getWithdrawBasePenalty", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 8297, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8296, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8368, "src": "10780:14:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8295, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10780:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "10779:16:24" }, "returnParameters": { "id": 8300, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8299, "mutability": "mutable", "name": "penalty", "nodeType": "VariableDeclaration", "overrides": null, "scope": 8368, "src": "10817:15:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8298, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10817:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "10816:17:24" }, "scope": 8369, "src": "10748:963:24", "stateMutability": "view", "virtual": false, "visibility": "public" } ], "scope": 8370, "src": "618:11095:24" } ], "src": "78:11636:24" }, "compiler": { "name": "solc", "version": "0.6.9+commit.3e3065ac.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.2.3", "updatedAt": "2020-11-06T08:03:35.683Z", "devdoc": { "author": "DODO Breeder", "methods": {}, "title": "LiquidityProvider" }, "userdoc": { "methods": {}, "notice": "Functions for liquidity provider operations" } }