20610 lines
981 KiB
JSON
20610 lines
981 KiB
JSON
{
|
|
"contractName": "Trader",
|
|
"abi": [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "buyer",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "receiveBase",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "payQuote",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "BuyBaseToken",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "maintainer",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "bool",
|
|
"name": "isBaseToken",
|
|
"type": "bool"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "ChargeMaintainerFee",
|
|
"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": 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": "seller",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "payBase",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "receiveQuote",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "SellBaseToken",
|
|
"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"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "minReceiveQuote",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "data",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"name": "sellBaseToken",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "maxPayQuote",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "data",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"name": "buyBaseToken",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "querySellBaseToken",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "receiveQuote",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "queryBuyBaseToken",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "payQuote",
|
|
"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\":\"buyer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"receiveBase\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"payQuote\",\"type\":\"uint256\"}],\"name\":\"BuyBaseToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"maintainer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isBaseToken\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ChargeMaintainerFee\",\"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\":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\":\"seller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"payBase\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"receiveQuote\",\"type\":\"uint256\"}],\"name\":\"SellBaseToken\",\"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\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxPayQuote\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"buyBaseToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"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\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"queryBuyBaseToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"payQuote\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"querySellBaseToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"receiveQuote\",\"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\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minReceiveQuote\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"sellBaseToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"DODO Breeder\",\"methods\":{},\"title\":\"Trader\"},\"userdoc\":{\"methods\":{},\"notice\":\"Functions for trader operations\"}},\"settings\":{\"compilationTarget\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Trader.sol\":\"Trader\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/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/impl/Trader.sol\":{\"keccak256\":\"0x5646e8b46c11ec0405e6111d3ef46019235694c6940d3bc1eed20873ed545498\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://5cc7c25e66cec9cee54e4dbcb48b8022391f4566b94e32d5ce8fd2e278cdc7b8\",\"dweb:/ipfs/QmVR9sWfVtnEyBhEPSppidiAdE9efTe5FcEZtzfUFXcbcZ\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IDODOCallee.sol\":{\"keccak256\":\"0x229c6157d9f467f52d98634966a88fce7c7d68d1b7ee5c4897957b3bc33ee2c5\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://d9ca56838de93c5727da081665c37fb7e4448cc584e3ff72f5d9867775c0ee5f\",\"dweb:/ipfs/QmTVeQ8EJqnrSYsu4GU4jhaUzW9FC45fAoXKHniBNXNaZs\"]},\"/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": "0x608060405234801561001057600080fd5b50612928806100206000396000f3fe608060405234801561001057600080fd5b50600436106102a05760003560e01c80638dae733311610167578063c6b73cf9116100ce578063ec2fd46d11610087578063ec2fd46d1461048c578063ed0aa42814610494578063ee27c689146104a7578063f2fde38b146104af578063f67ed448146104c2578063ffa64225146104d5576102a0565b8063c6b73cf914610451578063d4b9704614610459578063d689107c14610461578063dd58b41c14610469578063e67ce70614610471578063eab5d20e14610484576102a0565b8063ab44a7a311610120578063ab44a7a314610416578063ac1fbc981461041e578063b2094fd314610426578063c0ffa1781461042e578063c3a2a66514610436578063c5bbffe814610449576102a0565b80638dae7333146103d05780638ff5e742146103e35780639b020fba146103eb578063a2801e16146103f3578063a3161a5614610406578063a598aca71461040e576102a0565b80634a248d2a1161020b5780636ec6a58d116101c45780636ec6a58d1461039557806373a2ab7c1461039d578063796da7af146103a55780637aed942d146103ad5780637c9b8e89146103c05780638456db15146103c8576102a0565b80634a248d2a1461034d5780634de4527e146103555780634e71e0c81461035d57806354fd4d5014610365578063648a4fac1461036d57806368be20ad14610375576102a0565b80631f3c156e1161025d5780631f3c156e14610310578063245c96851461031a5780632aa82c6514610322578063387b0c111461032a5780633960f1421461033d5780634322ec8314610345576102a0565b80630cd1667d146102a55780630e6518e9146102c357806316048bc4146102cb5780631769ddaa146102e057806317be952e146102e857806318c0bbe4146102fd575b600080fd5b6102ad6104eb565b6040516102ba91906128cb565b60405180910390f35b6102ad61056e565b6102d3610574565b6040516102ba91906123f9565b6102ad610583565b6102f0610589565b6040516102ba91906124ab565b6102ad61030b366004612313565b610592565b6103186105a9565b005b6102ad610875565b6102ad61087b565b610318610338366004612313565b6108c0565b6102d3610920565b6102d361092f565b6102d361093e565b6102ad61094d565b610318610953565b6102ad6109e1565b6103186109e6565b6103886103833660046122ae565b610b00565b6040516102ba919061244a565b610388610b15565b6102d3610b25565b6102ad610b34565b6102ad6103bb3660046122ae565b610b79565b6102ad610c00565b6102d3610c06565b6102ad6103de366004612343565b610c15565b610388610eaa565b6102ad610eb8565b6102ad610401366004612313565b610ebe565b610388610ec9565b610388610ed2565b6102ad610ee2565b6102d3610ee8565b6102ad610ef7565b6102ad610efd565b6103186104443660046122c9565b610f03565b6103886110d9565b6102ad6110e9565b6102d36110ef565b6102d36110fe565b61038861110d565b6102ad61047f366004612343565b61111d565b6102ad611389565b6102ad61138f565b6103186104a2366004612313565b611395565b6102ad6113e5565b6103186104bd3660046122ae565b6114d6565b6102ad6104d03660046122ae565b611581565b6104dd6115b2565b6040516102ba9291906128e4565b601354604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561053057600080fd5b505afa158015610544573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610568919061232b565b90505b90565b60165481565b6000546001600160a01b031681565b60055481565b600e5460ff1681565b600061059d82611676565b50939695505050505050565b600154600160a01b900460ff16156105dc5760405162461bcd60e51b81526004016105d39061251d565b60405180910390fd5b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff166106175760405162461bcd60e51b81526004016105d390612876565b3360009081526017602052604090205460ff16156106475760405162461bcd60e51b81526004016105d39061284d565b336000818152601760205260408120805460ff191660011790559061066b90611581565b9050600061067833610b79565b9050600082156106af576106ac61068d61087b565b6010546106a0908663ffffffff6117c616565b9063ffffffff61180716565b90505b600082156106d8576106d56106c26104eb565b600f546106a0908663ffffffff6117c616565b90505b6010546106eb908363ffffffff61183916565b601055600f54610701908263ffffffff61183916565b600f8190555061072361071684601554611861565b839063ffffffff61188316565b915061074161073485601654611861565b829063ffffffff61188316565b905061074d33826118a8565b61075733836118df565b601354604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90610789903390879060040161240d565b600060405180830381600087803b1580156107a357600080fd5b505af11580156107b7573d6000803e3d6000fd5b5050601454604051632770a7eb60e21b81526001600160a01b039091169250639dc29fac91506107ed903390889060040161240d565b600060405180830381600087803b15801561080757600080fd5b505af115801561081b573d6000803e3d6000fd5b50505050336001600160a01b03167fbe5f7fe66d16c6a87bb5b8b08a96634fe4f1c2bac9e5e413efe41a782d4d0c43828460405161085a9291906128e4565b60405180910390a2505050506001805460ff60a01b19169055565b60105481565b601454604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561053057600080fd5b600154600160a01b900460ff16156108ea5760405162461bcd60e51b81526004016105d39061251d565b6001805460ff60a01b1916600160a01b1790556109073382611916565b6109108161197b565b506001805460ff60a01b19169055565b6006546001600160a01b031681565b6007546001600160a01b031681565b6008546001600160a01b031681565b60025481565b6001546001600160a01b0316331461097d5760405162461bcd60e51b81526004016105d3906124f6565b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b606590565b6000546001600160a01b03163314610a105760405162461bcd60e51b81526004016105d390612709565b600154600160b01b900460ff1615610a3a5760405162461bcd60e51b81526004016105d3906126b7565b6001805462ffffff60b81b1960ff60b01b19909116600160b01b171690556000610a626104eb565b90506000610a6e61087b565b90506010546012541115610aaa576000610a9560105460125461183990919063ffffffff16565b9050610aa181846119cf565b60155550610ab1565b6012546010555b600f546011541115610aeb576000610ad6600f5460115461183990919063ffffffff16565b9050610ae281836119cf565b60165550610af2565b601154600f555b5050600e805460ff19169055565b60176020526000908152604090205460ff1681565b600154600160b01b900460ff1681565b600a546001600160a01b031681565b600a5460408051634c6afee560e11b815290516000926001600160a01b0316916398d5fdca916004808301926020929190829003018186803b15801561053057600080fd5b6013546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610baa9085906004016123f9565b60206040518083038186803b158015610bc257600080fd5b505afa158015610bd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfa919061232b565b92915050565b60125481565b6001546001600160a01b031681565b600154600090600160c81b900460ff16610c415760405162461bcd60e51b81526004016105d390612665565b600354610100900460ff16610c685760405162461bcd60e51b81526004016105d3906126dc565b6002543a1115610c8a5760405162461bcd60e51b81526004016105d390612823565b600154600160a01b900460ff1615610cb45760405162461bcd60e51b81526004016105d39061251d565b6001805460ff60a01b1916600160a01b17905560008080808080610cd78b6119ed565b95509550955095509550955089861015610d035760405162461bcd60e51b81526004016105d390612799565b610d0d33876118df565b8715610d725760405163301bc67560e11b815233906360378cea90610d3f906000908f908b908f908f90600401612465565b600060405180830381600087803b158015610d5957600080fd5b505af1158015610d6d573d6000803e3d6000fd5b505050505b610d7c338c611b42565b8315610de357600754610d98906001600160a01b0316856118df565b6007546040516001600160a01b03909116907fe4fed5362e2669c70e5da5a18942d1e617d8917f6adc0164d9668bd3a6d0cebe90610dda906000908890612455565b60405180910390a25b8160105414610df25760108290555b80600f5414610e0157600f8190555b826002811115610e0d57fe5b600e5460ff166002811115610e1e57fe5b14610e4257600e805484919060ff19166001836002811115610e3c57fe5b02179055505b610e4b8561197b565b336001600160a01b03167fd8648b6ac54162763c86fd54bf2005af8ecd2f9cb273a5775921fd7f91e17b2d8c88604051610e869291906128e4565b60405180910390a250506001805460ff60a01b191690555091979650505050505050565b600354610100900460ff1681565b60045481565b600061059d826119ed565b60035460ff1681565b600154600160c01b900460ff1681565b600b5481565b6014546001600160a01b031681565b600f5481565b600c5481565b6000546001600160a01b03163314610f2d5760405162461bcd60e51b81526004016105d390612709565b6008546001600160a01b0383811691161415610ff457601154610f56908263ffffffff61188316565b6008546040516370a0823160e01b81526001600160a01b03909116906370a0823190610f869030906004016123f9565b60206040518083038186803b158015610f9e57600080fd5b505afa158015610fb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd6919061232b565b1015610ff45760405162461bcd60e51b81526004016105d39061262e565b6009546001600160a01b03838116911614156110bb5760125461101d908263ffffffff61188316565b6009546040516370a0823160e01b81526001600160a01b03909116906370a082319061104d9030906004016123f9565b60206040518083038186803b15801561106557600080fd5b505afa158015611079573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109d919061232b565b10156110bb5760405162461bcd60e51b81526004016105d3906124bf565b6110d56001600160a01b038316338363ffffffff611ba716565b5050565b600154600160b81b900460ff1681565b60155481565b6009546001600160a01b031681565b6013546001600160a01b031681565b600154600160c81b900460ff1681565b600154600090600160c81b900460ff166111495760405162461bcd60e51b81526004016105d390612665565b60035460ff1661116b5760405162461bcd60e51b81526004016105d39061289f565b6002543a111561118d5760405162461bcd60e51b81526004016105d390612823565b600154600160a01b900460ff16156111b75760405162461bcd60e51b81526004016105d39061251d565b6001805460ff60a01b1916600160a01b179055600080808080806111da8b611676565b955095509550955095509550898611156112065760405162461bcd60e51b81526004016105d3906127d0565b611210338c6118a8565b87156112755760405163301bc67560e11b815233906360378cea90611242906001908f908b908f908f90600401612465565b600060405180830381600087803b15801561125c57600080fd5b505af1158015611270573d6000803e3d6000fd5b505050505b61127f3387611916565b83156112e65760075461129b906001600160a01b0316856118a8565b6007546040516001600160a01b03909116907fe4fed5362e2669c70e5da5a18942d1e617d8917f6adc0164d9668bd3a6d0cebe906112dd906001908890612455565b60405180910390a25b81601054146112f55760108290555b80600f541461130457600f8190555b82600281111561131057fe5b600e5460ff16600281111561132157fe5b1461134557600e805484919060ff1916600183600281111561133f57fe5b02179055505b61134e85611c02565b336001600160a01b03167fe93ad76094f247c0dafc1c61adc2187de1ac2738f7a3b49cb20b2263420251a38c88604051610e869291906128e4565b60115481565b600d5481565b600154600160a01b900460ff16156113bf5760405162461bcd60e51b81526004016105d39061251d565b6001805460ff60a01b1916600160a01b1790556113dc3382611b42565b61091081611c02565b60008060006113f26115b2565b90925090506002600e5460ff16600281111561140a57fe5b141561148c57600061143661142e6012546106a085866117c690919063ffffffff16565b6012546119cf565b905061146f611447600d5483611861565b600d5461146390670de0b6b3a76400009063ffffffff61183916565b9063ffffffff61188316565b905061148261147c610b34565b826119cf565b935050505061056b565b60006114b26114aa6011546106a086876117c690919063ffffffff16565b6011546119cf565b90506114c3611447600d5483611861565b90506114826114d0610b34565b82611861565b6000546001600160a01b031633146115005760405162461bcd60e51b81526004016105d390612709565b6001600160a01b0381166115265760405162461bcd60e51b81526004016105d390612690565b600080546040516001600160a01b03808516939216917fdcf55418cee3220104fef63f979ff3c4097ad240c0c43dcb33ce837748983e6291a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610baa9085906004016123f9565b601254601154600091829182600e5460ff1660028111156115cf57fe5b14156115e657600f54601054935093505050611672565b6002600e5460ff1660028111156115f957fe5b141561162b576000611609611c4b565b600f5490915061161f848363ffffffff61188316565b94509450505050611672565b6001600e5460ff16600281111561163e57fe5b141561166f57600061164e611cb2565b9050611660828263ffffffff61188316565b60105494509450505050611672565b50505b9091565b6000806000806000806116876115b2565b809350819250505061169b87600b54611861565b94506116a987600c54611861565b935060006116c1856114638a8963ffffffff61188316565b90506000600e5460ff1660028111156116d657fe5b14156116f1576116e68183611d10565b9650600193506117bc565b6001600e5460ff16600281111561170457fe5b1415611717576116e68160115484611d58565b6002600e5460ff16600281111561172a57fe5b14156117bc5760006117476012548561183990919063ffffffff16565b905060006117608460115461183990919063ffffffff16565b905080831015611782576117778360125487611da1565b9850600295506117b9565b8083141561179657819850600095506117b9565b6117b26107166117ac858463ffffffff61183916565b86611d10565b9850600195505b50505b5091939550919395565b6000826117d557506000610bfa565b828202828482816117e257fe5b04146118005760405162461bcd60e51b81526004016105d390612800565b9392505050565b60008082116118285760405162461bcd60e51b81526004016105d3906125ac565b81838161183157fe5b049392505050565b60008282111561185b5760405162461bcd60e51b81526004016105d39061260b565b50900390565b6000670de0b6b3a764000061187c848463ffffffff6117c616565b8161183157fe5b6000828201838110156118005760405162461bcd60e51b81526004016105d39061272c565b6008546118c5906001600160a01b0316838363ffffffff611ba716565b6011546118d8908263ffffffff61183916565b6011555050565b6009546118fc906001600160a01b0316838363ffffffff611ba716565b60125461190f908263ffffffff61183916565b6012555050565b60055460125461192c908363ffffffff61188316565b111561194a5760405162461bcd60e51b81526004016105d390612540565b600954611968906001600160a01b031683308463ffffffff611de516565b60125461190f908263ffffffff61188316565b60105461198e908263ffffffff61188316565b6010556040517fa259c93818139b6bc90fb80e8feb75122b42edaae49560f81392cf4e1946726e906119c49083906000906128d4565b60405180910390a150565b6000611800826106a085670de0b6b3a764000063ffffffff6117c616565b6000806000806000806119fe6115b2565b92509050866000600e5460ff166002811115611a1657fe5b1415611a3157611a268184611e0c565b965060029350611afa565b6001600e5460ff166002811115611a4457fe5b1415611ae6576000611a616011548461183990919063ffffffff16565b90506000611a7a8560125461183990919063ffffffff16565b905081831015611aa857611a918360115486611e46565b98506001955080891115611aa3578098505b611adf565b81831415611abc5780985060009550611adf565b611ad8610734611ad2858563ffffffff61183916565b87611e0c565b9850600295505b5050611afa565b611af38160125485611e66565b9650600293505b611b0687600b54611861565b9550611b1487600c54611861565b9450611b3685611b2a898963ffffffff61183916565b9063ffffffff61183916565b96505091939550919395565b600454601154611b58908363ffffffff61188316565b1115611b765760405162461bcd60e51b81526004016105d3906125d4565b600854611b94906001600160a01b031683308463ffffffff611de516565b6011546118d8908263ffffffff61188316565b611bfd8363a9059cbb60e01b8484604051602401611bc692919061240d565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611e96565b505050565b600f54611c15908263ffffffff61188316565b600f556040517fa259c93818139b6bc90fb80e8feb75122b42edaae49560f81392cf4e1946726e906119c49083906001906128d4565b600080611c65600f5460115461183990919063ffffffff16565b90506000611c71610b34565b90506000611c7f8383611861565b90506000611c92601254600d5484611f4d565b9050611ca96012548261183990919063ffffffff16565b94505050505090565b600080611ccc60105460125461183990919063ffffffff16565b90506000611cd8610b34565b90506000611ce683836119cf565b90506000611cf9601154600d5484611f4d565b9050611ca96011548261183990919063ffffffff16565b6000818310611d315760405162461bcd60e51b81526004016105d39061262e565b6000611d43838563ffffffff61183916565b9050611d50838483611ff2565b949350505050565b6000828410611d795760405162461bcd60e51b81526004016105d39061262e565b6000611d8b848663ffffffff61183916565b9050611d98838583611ff2565b95945050505050565b600080611dac610b34565b90506000611dc98486611dbf858a61200e565b6001600d54612038565b9050611ddb818663ffffffff61183916565b9695505050505050565b611e06846323b872dd60e01b858585604051602401611bc693929190612426565b50505050565b600080611e17610b34565b90506000611e348485611e2a8589611861565b6000600d54612038565b9050611d98848263ffffffff61183916565b600080611e59848663ffffffff61188316565b9050611d98838286611ff2565b600080611e71610b34565b90506000611e848486611e2a858a611861565b9050611ddb858263ffffffff61183916565b60006060836001600160a01b031683604051611eb291906123c0565b6000604051808303816000865af19150503d8060008114611eef576040519150601f19603f3d011682016040523d82523d6000602084013e611ef4565b606091505b509150915081611f165760405162461bcd60e51b81526004016105d390612577565b805115611e065780806020019051810190611f3191906122f3565b611e065760405162461bcd60e51b81526004016105d39061274f565b600080611f74611f6e6004611f628787611861565b9063ffffffff6117c616565b866121a0565b9050611f9a611f95670de0b6b3a7640000611f62848263ffffffff61188316565b6121be565b90506000611fcf611fb983670de0b6b3a764000063ffffffff61183916565b611fca87600263ffffffff6117c616565b6121a0565b9050611ddb86611fed670de0b6b3a76400008463ffffffff61188316565b611861565b600080611ffd610b34565b9050611d9885858584600d546121f5565b6000611800670de0b6b3a764000061202c858563ffffffff6117c616565b9063ffffffff61226a16565b60008061204d866106a089611f62878c611861565b9050600061207261206c670de0b6b3a76400008663ffffffff61183916565b88611861565b9050600185156120935761208c828863ffffffff61188316565b91506120a6565b6120a3838863ffffffff61188316565b92505b8282106120c8576120bd828463ffffffff61183916565b9150600190506120df565b6120d8838363ffffffff61183916565b9150600090505b600061210f6121016004611f62670de0b6b3a76400008a63ffffffff61183916565b611fed8c611f628a8f611861565b9050612128611f9582611463868063ffffffff6117c616565b905060006121496002611f62670de0b6b3a76400008a63ffffffff61183916565b90506000831561216a57612163858463ffffffff61188316565b905061217d565b61217a838663ffffffff61183916565b90505b881561219a5761218d81836119cf565b9650505050505050611d98565b61218d81835b60006118008261202c85670de0b6b3a764000063ffffffff6117c616565b80600160028204015b818110156121ef578091506002818285816121de57fe5b0401816121e757fe5b0490506121c7565b50919050565b60008061220c84611fed888863ffffffff61183916565b9050600061222d612227886106a08b8063ffffffff6117c616565b876121a0565b9050600061223b8583611861565b905061225d83611fed83611463670de0b6b3a76400008a63ffffffff61183916565b9998505050505050505050565b6000806122778484611807565b90508281028403801561228f57506001019050610bfa565b509050610bfa565b80356001600160a01b0381168114610bfa57600080fd5b6000602082840312156122bf578081fd5b6118008383612297565b600080604083850312156122db578081fd5b6122e58484612297565b946020939093013593505050565b600060208284031215612304578081fd5b81518015158114611800578182fd5b600060208284031215612324578081fd5b5035919050565b60006020828403121561233c578081fd5b5051919050565b60008060008060608587031215612358578182fd5b8435935060208501359250604085013567ffffffffffffffff8082111561237d578384fd5b81870188601f82011261238e578485fd5b803592508183111561239e578485fd5b8860208483010111156123af578485fd5b959894975050602090940194505050565b60008251815b818110156123e057602081860181015185830152016123c6565b818111156123ee5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b9115158252602082015260400190565b6000861515825285602083015284604083015260806060830152826080830152828460a084013781830160a090810191909152601f909201601f19160101949350505050565b60208101600383106124b957fe5b91905290565b6020808252601d908201527f444f444f5f51554f54455f42414c414e43455f4e4f545f454e4f554748000000604082015260600190565b6020808252600d908201526c494e56414c49445f434c41494d60981b604082015260600190565b60208082526009908201526814915153951490539560ba1b604082015260600190565b6020808252601c908201527f51554f54455f42414c414e43455f4c494d49545f455843454544454400000000604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252600e908201526d2224ab24a224a723afa2a92927a960911b604082015260600190565b6020808252601b908201527f424153455f42414c414e43455f4c494d49545f45584345454445440000000000604082015260600190565b60208082526009908201526829aaa12fa2a92927a960b91b604082015260600190565b6020808252601c908201527f444f444f5f424153455f42414c414e43455f4e4f545f454e4f55474800000000604082015260600190565b602080825260119082015270151490511157d393d517d0531313d5d151607a1b604082015260600190565b6020808252600d908201526c24a72b20a624a22fa7aba722a960991b604082015260600190565b6020808252600b908201526a1113d113d7d0d313d4d15160aa1b604082015260600190565b60208082526013908201527214d15313125391d7d393d517d0531313d5d151606a1b604082015260600190565b6020808252600990820152682727aa2fa7aba722a960b91b604082015260600190565b60208082526009908201526820a2222fa2a92927a960b91b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601c908201527f53454c4c5f424153455f524543454956455f4e4f545f454e4f55474800000000604082015260600190565b602080825260169082015275084aab2be8482a68abe869ea6a8bea89e9ebe9aaa86960531b604082015260600190565b60208082526009908201526826aaa62fa2a92927a960b91b604082015260600190565b60208082526010908201526f11d054d7d4149250d157d15610d1515160821b604082015260600190565b6020808252600f908201526e1053149150511657d0d31052535151608a1b604082015260600190565b6020808252600f908201526e1113d113d7d393d517d0d313d4d151608a1b604082015260600190565b602080825260129082015271109556525391d7d393d517d0531313d5d15160721b604082015260600190565b90815260200190565b9182521515602082015260400190565b91825260208201526040019056fea26469706673582212207a4c255481018edf84fe613b9725b4a42410b40e0027c90d542b6341c231f00264736f6c63430006090033",
|
|
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102a05760003560e01c80638dae733311610167578063c6b73cf9116100ce578063ec2fd46d11610087578063ec2fd46d1461048c578063ed0aa42814610494578063ee27c689146104a7578063f2fde38b146104af578063f67ed448146104c2578063ffa64225146104d5576102a0565b8063c6b73cf914610451578063d4b9704614610459578063d689107c14610461578063dd58b41c14610469578063e67ce70614610471578063eab5d20e14610484576102a0565b8063ab44a7a311610120578063ab44a7a314610416578063ac1fbc981461041e578063b2094fd314610426578063c0ffa1781461042e578063c3a2a66514610436578063c5bbffe814610449576102a0565b80638dae7333146103d05780638ff5e742146103e35780639b020fba146103eb578063a2801e16146103f3578063a3161a5614610406578063a598aca71461040e576102a0565b80634a248d2a1161020b5780636ec6a58d116101c45780636ec6a58d1461039557806373a2ab7c1461039d578063796da7af146103a55780637aed942d146103ad5780637c9b8e89146103c05780638456db15146103c8576102a0565b80634a248d2a1461034d5780634de4527e146103555780634e71e0c81461035d57806354fd4d5014610365578063648a4fac1461036d57806368be20ad14610375576102a0565b80631f3c156e1161025d5780631f3c156e14610310578063245c96851461031a5780632aa82c6514610322578063387b0c111461032a5780633960f1421461033d5780634322ec8314610345576102a0565b80630cd1667d146102a55780630e6518e9146102c357806316048bc4146102cb5780631769ddaa146102e057806317be952e146102e857806318c0bbe4146102fd575b600080fd5b6102ad6104eb565b6040516102ba91906128cb565b60405180910390f35b6102ad61056e565b6102d3610574565b6040516102ba91906123f9565b6102ad610583565b6102f0610589565b6040516102ba91906124ab565b6102ad61030b366004612313565b610592565b6103186105a9565b005b6102ad610875565b6102ad61087b565b610318610338366004612313565b6108c0565b6102d3610920565b6102d361092f565b6102d361093e565b6102ad61094d565b610318610953565b6102ad6109e1565b6103186109e6565b6103886103833660046122ae565b610b00565b6040516102ba919061244a565b610388610b15565b6102d3610b25565b6102ad610b34565b6102ad6103bb3660046122ae565b610b79565b6102ad610c00565b6102d3610c06565b6102ad6103de366004612343565b610c15565b610388610eaa565b6102ad610eb8565b6102ad610401366004612313565b610ebe565b610388610ec9565b610388610ed2565b6102ad610ee2565b6102d3610ee8565b6102ad610ef7565b6102ad610efd565b6103186104443660046122c9565b610f03565b6103886110d9565b6102ad6110e9565b6102d36110ef565b6102d36110fe565b61038861110d565b6102ad61047f366004612343565b61111d565b6102ad611389565b6102ad61138f565b6103186104a2366004612313565b611395565b6102ad6113e5565b6103186104bd3660046122ae565b6114d6565b6102ad6104d03660046122ae565b611581565b6104dd6115b2565b6040516102ba9291906128e4565b601354604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561053057600080fd5b505afa158015610544573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610568919061232b565b90505b90565b60165481565b6000546001600160a01b031681565b60055481565b600e5460ff1681565b600061059d82611676565b50939695505050505050565b600154600160a01b900460ff16156105dc5760405162461bcd60e51b81526004016105d39061251d565b60405180910390fd5b6001805460ff60a01b1916600160a01b1790819055600160b01b900460ff166106175760405162461bcd60e51b81526004016105d390612876565b3360009081526017602052604090205460ff16156106475760405162461bcd60e51b81526004016105d39061284d565b336000818152601760205260408120805460ff191660011790559061066b90611581565b9050600061067833610b79565b9050600082156106af576106ac61068d61087b565b6010546106a0908663ffffffff6117c616565b9063ffffffff61180716565b90505b600082156106d8576106d56106c26104eb565b600f546106a0908663ffffffff6117c616565b90505b6010546106eb908363ffffffff61183916565b601055600f54610701908263ffffffff61183916565b600f8190555061072361071684601554611861565b839063ffffffff61188316565b915061074161073485601654611861565b829063ffffffff61188316565b905061074d33826118a8565b61075733836118df565b601354604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90610789903390879060040161240d565b600060405180830381600087803b1580156107a357600080fd5b505af11580156107b7573d6000803e3d6000fd5b5050601454604051632770a7eb60e21b81526001600160a01b039091169250639dc29fac91506107ed903390889060040161240d565b600060405180830381600087803b15801561080757600080fd5b505af115801561081b573d6000803e3d6000fd5b50505050336001600160a01b03167fbe5f7fe66d16c6a87bb5b8b08a96634fe4f1c2bac9e5e413efe41a782d4d0c43828460405161085a9291906128e4565b60405180910390a2505050506001805460ff60a01b19169055565b60105481565b601454604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561053057600080fd5b600154600160a01b900460ff16156108ea5760405162461bcd60e51b81526004016105d39061251d565b6001805460ff60a01b1916600160a01b1790556109073382611916565b6109108161197b565b506001805460ff60a01b19169055565b6006546001600160a01b031681565b6007546001600160a01b031681565b6008546001600160a01b031681565b60025481565b6001546001600160a01b0316331461097d5760405162461bcd60e51b81526004016105d3906124f6565b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b606590565b6000546001600160a01b03163314610a105760405162461bcd60e51b81526004016105d390612709565b600154600160b01b900460ff1615610a3a5760405162461bcd60e51b81526004016105d3906126b7565b6001805462ffffff60b81b1960ff60b01b19909116600160b01b171690556000610a626104eb565b90506000610a6e61087b565b90506010546012541115610aaa576000610a9560105460125461183990919063ffffffff16565b9050610aa181846119cf565b60155550610ab1565b6012546010555b600f546011541115610aeb576000610ad6600f5460115461183990919063ffffffff16565b9050610ae281836119cf565b60165550610af2565b601154600f555b5050600e805460ff19169055565b60176020526000908152604090205460ff1681565b600154600160b01b900460ff1681565b600a546001600160a01b031681565b600a5460408051634c6afee560e11b815290516000926001600160a01b0316916398d5fdca916004808301926020929190829003018186803b15801561053057600080fd5b6013546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610baa9085906004016123f9565b60206040518083038186803b158015610bc257600080fd5b505afa158015610bd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfa919061232b565b92915050565b60125481565b6001546001600160a01b031681565b600154600090600160c81b900460ff16610c415760405162461bcd60e51b81526004016105d390612665565b600354610100900460ff16610c685760405162461bcd60e51b81526004016105d3906126dc565b6002543a1115610c8a5760405162461bcd60e51b81526004016105d390612823565b600154600160a01b900460ff1615610cb45760405162461bcd60e51b81526004016105d39061251d565b6001805460ff60a01b1916600160a01b17905560008080808080610cd78b6119ed565b95509550955095509550955089861015610d035760405162461bcd60e51b81526004016105d390612799565b610d0d33876118df565b8715610d725760405163301bc67560e11b815233906360378cea90610d3f906000908f908b908f908f90600401612465565b600060405180830381600087803b158015610d5957600080fd5b505af1158015610d6d573d6000803e3d6000fd5b505050505b610d7c338c611b42565b8315610de357600754610d98906001600160a01b0316856118df565b6007546040516001600160a01b03909116907fe4fed5362e2669c70e5da5a18942d1e617d8917f6adc0164d9668bd3a6d0cebe90610dda906000908890612455565b60405180910390a25b8160105414610df25760108290555b80600f5414610e0157600f8190555b826002811115610e0d57fe5b600e5460ff166002811115610e1e57fe5b14610e4257600e805484919060ff19166001836002811115610e3c57fe5b02179055505b610e4b8561197b565b336001600160a01b03167fd8648b6ac54162763c86fd54bf2005af8ecd2f9cb273a5775921fd7f91e17b2d8c88604051610e869291906128e4565b60405180910390a250506001805460ff60a01b191690555091979650505050505050565b600354610100900460ff1681565b60045481565b600061059d826119ed565b60035460ff1681565b600154600160c01b900460ff1681565b600b5481565b6014546001600160a01b031681565b600f5481565b600c5481565b6000546001600160a01b03163314610f2d5760405162461bcd60e51b81526004016105d390612709565b6008546001600160a01b0383811691161415610ff457601154610f56908263ffffffff61188316565b6008546040516370a0823160e01b81526001600160a01b03909116906370a0823190610f869030906004016123f9565b60206040518083038186803b158015610f9e57600080fd5b505afa158015610fb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd6919061232b565b1015610ff45760405162461bcd60e51b81526004016105d39061262e565b6009546001600160a01b03838116911614156110bb5760125461101d908263ffffffff61188316565b6009546040516370a0823160e01b81526001600160a01b03909116906370a082319061104d9030906004016123f9565b60206040518083038186803b15801561106557600080fd5b505afa158015611079573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109d919061232b565b10156110bb5760405162461bcd60e51b81526004016105d3906124bf565b6110d56001600160a01b038316338363ffffffff611ba716565b5050565b600154600160b81b900460ff1681565b60155481565b6009546001600160a01b031681565b6013546001600160a01b031681565b600154600160c81b900460ff1681565b600154600090600160c81b900460ff166111495760405162461bcd60e51b81526004016105d390612665565b60035460ff1661116b5760405162461bcd60e51b81526004016105d39061289f565b6002543a111561118d5760405162461bcd60e51b81526004016105d390612823565b600154600160a01b900460ff16156111b75760405162461bcd60e51b81526004016105d39061251d565b6001805460ff60a01b1916600160a01b179055600080808080806111da8b611676565b955095509550955095509550898611156112065760405162461bcd60e51b81526004016105d3906127d0565b611210338c6118a8565b87156112755760405163301bc67560e11b815233906360378cea90611242906001908f908b908f908f90600401612465565b600060405180830381600087803b15801561125c57600080fd5b505af1158015611270573d6000803e3d6000fd5b505050505b61127f3387611916565b83156112e65760075461129b906001600160a01b0316856118a8565b6007546040516001600160a01b03909116907fe4fed5362e2669c70e5da5a18942d1e617d8917f6adc0164d9668bd3a6d0cebe906112dd906001908890612455565b60405180910390a25b81601054146112f55760108290555b80600f541461130457600f8190555b82600281111561131057fe5b600e5460ff16600281111561132157fe5b1461134557600e805484919060ff1916600183600281111561133f57fe5b02179055505b61134e85611c02565b336001600160a01b03167fe93ad76094f247c0dafc1c61adc2187de1ac2738f7a3b49cb20b2263420251a38c88604051610e869291906128e4565b60115481565b600d5481565b600154600160a01b900460ff16156113bf5760405162461bcd60e51b81526004016105d39061251d565b6001805460ff60a01b1916600160a01b1790556113dc3382611b42565b61091081611c02565b60008060006113f26115b2565b90925090506002600e5460ff16600281111561140a57fe5b141561148c57600061143661142e6012546106a085866117c690919063ffffffff16565b6012546119cf565b905061146f611447600d5483611861565b600d5461146390670de0b6b3a76400009063ffffffff61183916565b9063ffffffff61188316565b905061148261147c610b34565b826119cf565b935050505061056b565b60006114b26114aa6011546106a086876117c690919063ffffffff16565b6011546119cf565b90506114c3611447600d5483611861565b90506114826114d0610b34565b82611861565b6000546001600160a01b031633146115005760405162461bcd60e51b81526004016105d390612709565b6001600160a01b0381166115265760405162461bcd60e51b81526004016105d390612690565b600080546040516001600160a01b03808516939216917fdcf55418cee3220104fef63f979ff3c4097ad240c0c43dcb33ce837748983e6291a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6014546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610baa9085906004016123f9565b601254601154600091829182600e5460ff1660028111156115cf57fe5b14156115e657600f54601054935093505050611672565b6002600e5460ff1660028111156115f957fe5b141561162b576000611609611c4b565b600f5490915061161f848363ffffffff61188316565b94509450505050611672565b6001600e5460ff16600281111561163e57fe5b141561166f57600061164e611cb2565b9050611660828263ffffffff61188316565b60105494509450505050611672565b50505b9091565b6000806000806000806116876115b2565b809350819250505061169b87600b54611861565b94506116a987600c54611861565b935060006116c1856114638a8963ffffffff61188316565b90506000600e5460ff1660028111156116d657fe5b14156116f1576116e68183611d10565b9650600193506117bc565b6001600e5460ff16600281111561170457fe5b1415611717576116e68160115484611d58565b6002600e5460ff16600281111561172a57fe5b14156117bc5760006117476012548561183990919063ffffffff16565b905060006117608460115461183990919063ffffffff16565b905080831015611782576117778360125487611da1565b9850600295506117b9565b8083141561179657819850600095506117b9565b6117b26107166117ac858463ffffffff61183916565b86611d10565b9850600195505b50505b5091939550919395565b6000826117d557506000610bfa565b828202828482816117e257fe5b04146118005760405162461bcd60e51b81526004016105d390612800565b9392505050565b60008082116118285760405162461bcd60e51b81526004016105d3906125ac565b81838161183157fe5b049392505050565b60008282111561185b5760405162461bcd60e51b81526004016105d39061260b565b50900390565b6000670de0b6b3a764000061187c848463ffffffff6117c616565b8161183157fe5b6000828201838110156118005760405162461bcd60e51b81526004016105d39061272c565b6008546118c5906001600160a01b0316838363ffffffff611ba716565b6011546118d8908263ffffffff61183916565b6011555050565b6009546118fc906001600160a01b0316838363ffffffff611ba716565b60125461190f908263ffffffff61183916565b6012555050565b60055460125461192c908363ffffffff61188316565b111561194a5760405162461bcd60e51b81526004016105d390612540565b600954611968906001600160a01b031683308463ffffffff611de516565b60125461190f908263ffffffff61188316565b60105461198e908263ffffffff61188316565b6010556040517fa259c93818139b6bc90fb80e8feb75122b42edaae49560f81392cf4e1946726e906119c49083906000906128d4565b60405180910390a150565b6000611800826106a085670de0b6b3a764000063ffffffff6117c616565b6000806000806000806119fe6115b2565b92509050866000600e5460ff166002811115611a1657fe5b1415611a3157611a268184611e0c565b965060029350611afa565b6001600e5460ff166002811115611a4457fe5b1415611ae6576000611a616011548461183990919063ffffffff16565b90506000611a7a8560125461183990919063ffffffff16565b905081831015611aa857611a918360115486611e46565b98506001955080891115611aa3578098505b611adf565b81831415611abc5780985060009550611adf565b611ad8610734611ad2858563ffffffff61183916565b87611e0c565b9850600295505b5050611afa565b611af38160125485611e66565b9650600293505b611b0687600b54611861565b9550611b1487600c54611861565b9450611b3685611b2a898963ffffffff61183916565b9063ffffffff61183916565b96505091939550919395565b600454601154611b58908363ffffffff61188316565b1115611b765760405162461bcd60e51b81526004016105d3906125d4565b600854611b94906001600160a01b031683308463ffffffff611de516565b6011546118d8908263ffffffff61188316565b611bfd8363a9059cbb60e01b8484604051602401611bc692919061240d565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611e96565b505050565b600f54611c15908263ffffffff61188316565b600f556040517fa259c93818139b6bc90fb80e8feb75122b42edaae49560f81392cf4e1946726e906119c49083906001906128d4565b600080611c65600f5460115461183990919063ffffffff16565b90506000611c71610b34565b90506000611c7f8383611861565b90506000611c92601254600d5484611f4d565b9050611ca96012548261183990919063ffffffff16565b94505050505090565b600080611ccc60105460125461183990919063ffffffff16565b90506000611cd8610b34565b90506000611ce683836119cf565b90506000611cf9601154600d5484611f4d565b9050611ca96011548261183990919063ffffffff16565b6000818310611d315760405162461bcd60e51b81526004016105d39061262e565b6000611d43838563ffffffff61183916565b9050611d50838483611ff2565b949350505050565b6000828410611d795760405162461bcd60e51b81526004016105d39061262e565b6000611d8b848663ffffffff61183916565b9050611d98838583611ff2565b95945050505050565b600080611dac610b34565b90506000611dc98486611dbf858a61200e565b6001600d54612038565b9050611ddb818663ffffffff61183916565b9695505050505050565b611e06846323b872dd60e01b858585604051602401611bc693929190612426565b50505050565b600080611e17610b34565b90506000611e348485611e2a8589611861565b6000600d54612038565b9050611d98848263ffffffff61183916565b600080611e59848663ffffffff61188316565b9050611d98838286611ff2565b600080611e71610b34565b90506000611e848486611e2a858a611861565b9050611ddb858263ffffffff61183916565b60006060836001600160a01b031683604051611eb291906123c0565b6000604051808303816000865af19150503d8060008114611eef576040519150601f19603f3d011682016040523d82523d6000602084013e611ef4565b606091505b509150915081611f165760405162461bcd60e51b81526004016105d390612577565b805115611e065780806020019051810190611f3191906122f3565b611e065760405162461bcd60e51b81526004016105d39061274f565b600080611f74611f6e6004611f628787611861565b9063ffffffff6117c616565b866121a0565b9050611f9a611f95670de0b6b3a7640000611f62848263ffffffff61188316565b6121be565b90506000611fcf611fb983670de0b6b3a764000063ffffffff61183916565b611fca87600263ffffffff6117c616565b6121a0565b9050611ddb86611fed670de0b6b3a76400008463ffffffff61188316565b611861565b600080611ffd610b34565b9050611d9885858584600d546121f5565b6000611800670de0b6b3a764000061202c858563ffffffff6117c616565b9063ffffffff61226a16565b60008061204d866106a089611f62878c611861565b9050600061207261206c670de0b6b3a76400008663ffffffff61183916565b88611861565b9050600185156120935761208c828863ffffffff61188316565b91506120a6565b6120a3838863ffffffff61188316565b92505b8282106120c8576120bd828463ffffffff61183916565b9150600190506120df565b6120d8838363ffffffff61183916565b9150600090505b600061210f6121016004611f62670de0b6b3a76400008a63ffffffff61183916565b611fed8c611f628a8f611861565b9050612128611f9582611463868063ffffffff6117c616565b905060006121496002611f62670de0b6b3a76400008a63ffffffff61183916565b90506000831561216a57612163858463ffffffff61188316565b905061217d565b61217a838663ffffffff61183916565b90505b881561219a5761218d81836119cf565b9650505050505050611d98565b61218d81835b60006118008261202c85670de0b6b3a764000063ffffffff6117c616565b80600160028204015b818110156121ef578091506002818285816121de57fe5b0401816121e757fe5b0490506121c7565b50919050565b60008061220c84611fed888863ffffffff61183916565b9050600061222d612227886106a08b8063ffffffff6117c616565b876121a0565b9050600061223b8583611861565b905061225d83611fed83611463670de0b6b3a76400008a63ffffffff61183916565b9998505050505050505050565b6000806122778484611807565b90508281028403801561228f57506001019050610bfa565b509050610bfa565b80356001600160a01b0381168114610bfa57600080fd5b6000602082840312156122bf578081fd5b6118008383612297565b600080604083850312156122db578081fd5b6122e58484612297565b946020939093013593505050565b600060208284031215612304578081fd5b81518015158114611800578182fd5b600060208284031215612324578081fd5b5035919050565b60006020828403121561233c578081fd5b5051919050565b60008060008060608587031215612358578182fd5b8435935060208501359250604085013567ffffffffffffffff8082111561237d578384fd5b81870188601f82011261238e578485fd5b803592508183111561239e578485fd5b8860208483010111156123af578485fd5b959894975050602090940194505050565b60008251815b818110156123e057602081860181015185830152016123c6565b818111156123ee5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b9115158252602082015260400190565b6000861515825285602083015284604083015260806060830152826080830152828460a084013781830160a090810191909152601f909201601f19160101949350505050565b60208101600383106124b957fe5b91905290565b6020808252601d908201527f444f444f5f51554f54455f42414c414e43455f4e4f545f454e4f554748000000604082015260600190565b6020808252600d908201526c494e56414c49445f434c41494d60981b604082015260600190565b60208082526009908201526814915153951490539560ba1b604082015260600190565b6020808252601c908201527f51554f54455f42414c414e43455f4c494d49545f455843454544454400000000604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252600e908201526d2224ab24a224a723afa2a92927a960911b604082015260600190565b6020808252601b908201527f424153455f42414c414e43455f4c494d49545f45584345454445440000000000604082015260600190565b60208082526009908201526829aaa12fa2a92927a960b91b604082015260600190565b6020808252601c908201527f444f444f5f424153455f42414c414e43455f4e4f545f454e4f55474800000000604082015260600190565b602080825260119082015270151490511157d393d517d0531313d5d151607a1b604082015260600190565b6020808252600d908201526c24a72b20a624a22fa7aba722a960991b604082015260600190565b6020808252600b908201526a1113d113d7d0d313d4d15160aa1b604082015260600190565b60208082526013908201527214d15313125391d7d393d517d0531313d5d151606a1b604082015260600190565b6020808252600990820152682727aa2fa7aba722a960b91b604082015260600190565b60208082526009908201526820a2222fa2a92927a960b91b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601c908201527f53454c4c5f424153455f524543454956455f4e4f545f454e4f55474800000000604082015260600190565b602080825260169082015275084aab2be8482a68abe869ea6a8bea89e9ebe9aaa86960531b604082015260600190565b60208082526009908201526826aaa62fa2a92927a960b91b604082015260600190565b60208082526010908201526f11d054d7d4149250d157d15610d1515160821b604082015260600190565b6020808252600f908201526e1053149150511657d0d31052535151608a1b604082015260600190565b6020808252600f908201526e1113d113d7d393d517d0d313d4d151608a1b604082015260600190565b602080825260129082015271109556525391d7d393d517d0531313d5d15160721b604082015260600190565b90815260200190565b9182521515602082015260400190565b91825260208201526040019056fea26469706673582212207a4c255481018edf84fe613b9725b4a42410b40e0027c90d542b6341c231f00264736f6c63430006090033",
|
|
"immutableReferences": {},
|
|
"sourceMap": "547:9374:28:-:0;;;;;;;;;;;;;;;;;;;",
|
|
"deployedSourceMap": "547:9374:28:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2949:133:27;;;:::i;:::-;;;;;;;;;;;;;;;;2006:43;;;:::i;264:22:37:-;;;:::i;:::-;;;;;;;;1112:36:27;;;:::i;1604:31::-;;;:::i;:::-;;;;;;;;4680:175:28;;;;;;;;;:::i;3873:1392:26:-;;;:::i;:::-;;1688:42:27;;;:::i;3243:135::-;;;:::i;2545:161:26:-;;;;;;;;;:::i;1202:27:27:-;;;:::i;1271:::-;;;:::i;1352:::-;;;:::i;912:32::-;;;:::i;963:225:37:-;;;:::i;3433:87:27:-;;;:::i;2808:1006:26:-;;;:::i;2055:41:27:-;;;;;;;;;:::i;:::-;;;;;;;;772:20;;;:::i;1419:23::-;;;:::i;2682:108::-;;;:::i;2796:147::-;;;;;;;;;:::i;1771:30::-;;;:::i;292:26:37:-;;;:::i;1477:1499:28:-;;;;;;;;;:::i;1036:29:27:-;;;:::i;1071:35::-;;;:::i;4485:189:28:-;;;;;;;;;:::i;1002:28:27:-;;;:::i;839:34::-;;;:::i;1511:28::-;;;:::i;1849:36::-;;;:::i;1641:41::-;;;:::i;1545:28::-;;;:::i;5324:581:26:-;;;;;;;;;:::i;798:35:27:-;;;:::i;1957:43::-;;;:::i;1385:28::-;;;:::i;1808:35::-;;;:::i;879:27::-;;;:::i;2982:1447:28:-;;;;;;;;;:::i;1736:29:27:-;;;:::i;1579:18::-;;;:::i;2381:158:26:-;;;;;;;;;:::i;5504:799:25:-;;;:::i;737:220:37:-;;;;;;;;;:::i;3088:149:27:-;;;;;;;;;:::i;4819:679:25:-;;;:::i;:::-;;;;;;;;;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;264:22:37:-;;;-1:-1:-1;;;;;264:22:37;;:::o;1112:36:27:-;;;;:::o;1604:31::-;;;;;;:::o;4680:175:28:-;4746:16;4797:26;4816:6;4797:18;:26::i;:::-;-1:-1:-1;4774:49:28;;4680:175;-1:-1:-1;;;;;;4680:175:28:o;3873:1392:26:-;515:9:39;;-1:-1:-1;;;515:9:39;;;;514:10;506:32;;;;-1:-1:-1;;;506:32:39;;;;;;;;;;;;;;;;;560:4;548:16;;-1:-1:-1;;;;548:16:39;-1:-1:-1;;;548:16:39;;;;;-1:-1:-1;;;3940:8:26;::::1;548:16:39::0;3940:8:26::1;3932:36;;;;-1:-1:-1::0;;;3932:36:26::1;;;;;;;;;3997:10;3987:21;::::0;;;:9:::1;:21;::::0;;;;;::::1;;3986:22;3978:50;;;;-1:-1:-1::0;;;3978:50:26::1;;;;;;;;;4048:10;4038:21;::::0;;;:9:::1;:21;::::0;;;;:28;;-1:-1:-1;;4038:28:26::1;4062:4;4038:28;::::0;;:21;4100:36:::1;::::0;:24:::1;:36::i;:::-;4077:59;;4146:19;4168:35;4192:10;4168:23;:35::i;:::-;4146:57:::0;-1:-1:-1;4214:19:26::1;4251:16:::0;;4247:134:::1;;4297:73;4347:22;:20;:22::i;:::-;4297:27;::::0;:45:::1;::::0;4329:12;4297:45:::1;:31;:45;:::i;:::-;:49:::0;:73:::1;:49;:73;:::i;:::-;4283:87;;4247:134;4390:18;4426:15:::0;;4422:129:::1;;4470:70;4518:21;:19;:21::i;:::-;4470:26;::::0;:43:::1;::::0;4501:11;4470:43:::1;:30;:43;:::i;:70::-;4457:83;;4422:129;4591:27;::::0;:44:::1;::::0;4623:11;4591:44:::1;:31;:44;:::i;:::-;4561:27;:74:::0;4674:26:::1;::::0;:42:::1;::::0;4705:10;4674:42:::1;:30;:42;:::i;:::-;4645:26;:71;;;;4741:75;4757:58;4773:11;4786:28;;4757:15;:58::i;:::-;4741:11:::0;;:75:::1;:15;:75;:::i;:::-;4727:89;;4839:75;4854:59;4870:12;4884:28;;4854:15;:59::i;:::-;4839:10:::0;;:75:::1;:14;:75;:::i;:::-;4826:88;;4925:45;4947:10;4959;4925:21;:45::i;:::-;4980:47;5003:10;5015:11;4980:22;:47::i;:::-;5051:20;::::0;5038:64:::1;::::0;-1:-1:-1;;;5038:64:26;;-1:-1:-1;;;;;5051:20:26;;::::1;::::0;5038:39:::1;::::0;:64:::1;::::0;5078:10:::1;::::0;5090:11;;5038:64:::1;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;5125:21:26::1;::::0;5112:66:::1;::::0;-1:-1:-1;;;5112:66:26;;-1:-1:-1;;;;;5125:21:26;;::::1;::::0;-1:-1:-1;5112:40:26::1;::::0;-1:-1:-1;5112:66:26::1;::::0;5153:10:::1;::::0;5165:12;;5112:66:::1;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;5206:10;-1:-1:-1::0;;;;;5194:48:26::1;;5218:10;5230:11;5194:48;;;;;;;;;;;;;;;;5252:7;;;;585:9:39::0;:17;;-1:-1:-1;;;;585:17:39;;;3873:1392:26:o;1688:42:27:-;;;;:::o;3243:135::-;3335:21;;3322:49;;;-1:-1:-1;;;3322:49:27;;;;3296:7;;-1:-1:-1;;;;;3335:21:27;;3322:47;;:49;;;;;;;;;;;;;;3335:21;3322:49;;;;;;;;;;2545:161:26;515:9:39;;-1:-1:-1;;;515:9:39;;;;514:10;506:32;;;;-1:-1:-1;;;506:32:39;;;;;;;;;560:4;548:16;;-1:-1:-1;;;;548:16:39;-1:-1:-1;;;548:16:39;;;2623:41:26::1;2645:10;2657:6:::0;2623:21:::1;:41::i;:::-;2674:25;2692:6;2674:17;:25::i;:::-;-1:-1:-1::0;585:9:39;:17;;-1:-1:-1;;;;585:17:39;;;2545:161:26:o;1202:27:27:-;;;-1:-1:-1;;;;;1202:27:27;;:::o;1271:::-;;;-1:-1:-1;;;;;1271:27:27;;:::o;1352:::-;;;-1:-1:-1;;;;;1352:27:27;;:::o;912:32::-;;;;:::o;963:225:37:-;1030:11;;-1:-1:-1;;;;;1030:11:37;1016:10;:25;1008:51;;;;-1:-1:-1;;;1008:51:37;;;;;;;;;1104:11;;;1095:7;;1074:42;;-1:-1:-1;;;;;1104:11:37;;;;1095:7;;;;1074:42;;;1136:11;;;;1126:21;;-1:-1:-1;;;;;;1126:21:37;;;-1:-1:-1;;;;;1136:11:37;;1126:21;;;;1157:24;;;963:225::o;3433:87:27:-;3501:3;3433:87;:::o;2808:1006:26:-;648:7:37;;-1:-1:-1;;;;;648:7:37;634:10;:21;626:43;;;;-1:-1:-1;;;626:43:37;;;;;;;;;2341:8:27::1;::::0;-1:-1:-1;;;2341:8:27;::::1;;;2340:9;2332:33;;;;-1:-1:-1::0;;;2332:33:27::1;;;;;;;;;2885:4:26::2;2874:15:::0;;-1:-1:-1;;;;;;;;2874:15:26;;::::2;-1:-1:-1::0;;;2874:15:26::2;2980:23:::0;;;2874:15;3040:21:::2;:19;:21::i;:::-;3013:48;;3071:25;3099:22;:20;:22::i;:::-;3071:50;;3154:27;;3136:15;;:45;3132:316;;;3197:18;3218:48;3238:27;;3218:15;;:19;;:48;;;;:::i;:::-;3197:69;;3311:50;3332:10;3344:16;3311:20;:50::i;:::-;3280:28;:81:::0;-1:-1:-1;3132:316:26::2;;;3422:15;::::0;3392:27:::2;:45:::0;3132:316:::2;3479:26;;3462:14;;:43;3458:309;;;3521:17;3541:46;3560:26;;3541:14;;:18;;:46;;;;:::i;:::-;3521:66;;3632:50;3653:9;3664:17;3632:20;:50::i;:::-;3601:28;:81:::0;-1:-1:-1;3458:309:26::2;;;3742:14;::::0;3713:26:::2;:43:::0;3458:309:::2;-1:-1:-1::0;;3777:10:26::2;:30:::0;;-1:-1:-1;;3777:30:26::2;::::0;;2808:1006::o;2055:41:27:-;;;;;;;;;;;;;;;:::o;772:20::-;;;-1:-1:-1;;;772:20:27;;;;;:::o;1419:23::-;;;-1:-1:-1;;;;;1419:23:27;;:::o;2682:108::-;2763:8;;2755:28;;;-1:-1:-1;;;2755:28:27;;;;2729:7;;-1:-1:-1;;;;;2763:8:27;;2755:26;;:28;;;;;;;;;;;;;;2763:8;2755:28;;;;;;;;;;2796:147;2901:20;;2888:48;;-1:-1:-1;;;2888:48:27;;2862:7;;-1:-1:-1;;;;;2901:20:27;;2888:44;;:48;;2933:2;;2888:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2881:55;2796:147;-1:-1:-1;;2796:147:27:o;1771:30::-;;;;:::o;292:26:37:-;;;-1:-1:-1;;;;;292:26:37;;:::o;1477:1499:28:-;1031:15;;1669:7;;-1:-1:-1;;;1031:15:28;;;;1023:45;;;;-1:-1:-1;;;1023:45:28;;;;;;;;;1242:17:::1;::::0;::::1;::::0;::::1;;;1234:49;;;;-1:-1:-1::0;;;1234:49:28::1;;;;;;;;;1365:17:::2;;1350:11;:32;;1342:61;;;;-1:-1:-1::0;;;1342:61:28::2;;;;;;;;;515:9:39::3;::::0;-1:-1:-1;;;515:9:39;::::3;;;514:10;506:32;;;;-1:-1:-1::0;;;506:32:39::3;;;;;;;;;560:4;548:16:::0;;-1:-1:-1;;;;548:16:39::3;-1:-1:-1::0;;;548:16:39::3;::::0;;;;;;;;1931:27:28::4;1951:6:::0;1931:19:::4;:27::i;:::-;1711:247;;;;;;;;;;;;1992:15;1976:12;:31;;1968:72;;;;-1:-1:-1::0;;;1968:72:28::4;;;;;;;;;2076:48;2099:10;2111:12;2076:22;:48::i;:::-;2138:15:::0;;2134:113:::4;;2169:67;::::0;-1:-1:-1;;;2169:67:28;;2181:10:::4;::::0;2169:32:::4;::::0;:67:::4;::::0;2202:5:::4;::::0;2209:6;;2217:12;;2231:4;;;;2169:67:::4;;;;;;;;;;;;;;;;;;;;;;::::0;::::4;;;;;;;;;;;;::::0;::::4;;;;;;;;;2134:113;2256:40;2277:10;2289:6;2256:20;:40::i;:::-;2310:15:::0;;2306:165:::4;;2364:12;::::0;2341:48:::4;::::0;-1:-1:-1;;;;;2364:12:28::4;2378:10:::0;2341:22:::4;:48::i;:::-;2428:12;::::0;2408:52:::4;::::0;-1:-1:-1;;;;;2428:12:28;;::::4;::::0;2408:52:::4;::::0;::::4;::::0;2428:12:::4;::::0;2449:10;;2408:52:::4;;;;;;;;;;2306:165;2541:14;2510:27;;:45;2506:120;;2571:27;:44:::0;;;2506:120:::4;2669:13;2639:26;;:43;2635:116;;2698:26;:42:::0;;;2635:116:::4;2778:10;2764:24;;;;;;;;:10;::::0;::::4;;:24;::::0;::::4;;;;;;;2760:78;;2804:10;:23:::0;;2817:10;;2804;-1:-1:-1;;2804:23:28::4;::::0;2817:10;2804:23:::4;::::0;::::4;;;;;;;;;;;2760:78;2848:29;2866:10;2848:17;:29::i;:::-;2906:10;-1:-1:-1::0;;;;;2892:47:28::4;;2918:6;2926:12;2892:47;;;;;;;;;;;;;;;;-1:-1:-1::0;;585:9:39::3;:17:::0;;-1:-1:-1;;;;585:17:39::3;::::0;;-1:-1:-1;2957:12:28;;1477:1499;-1:-1:-1;;;;;;;1477:1499:28:o;1036:29:27:-;;;;;;;;;:::o;1071:35::-;;;;:::o;4485:189:28:-;4552:20;4611:27;4631:6;4611:19;:27::i;1002:28:27:-;;;;;;:::o;839:34::-;;;-1:-1:-1;;;839:34:27;;;;;:::o;1511:28::-;;;;:::o;1849:36::-;;;-1:-1:-1;;;;;1849:36:27;;:::o;1641:41::-;;;;:::o;1545:28::-;;;;:::o;5324:581:26:-;648:7:37;;-1:-1:-1;;;;;648:7:37;634:10;:21;626:43;;;;-1:-1:-1;;;626:43:37;;;;;;;;;5415:12:26::1;::::0;-1:-1:-1;;;;;5406:21:26;;::::1;5415:12:::0;::::1;5406:21;5402:214;;;5517:14;::::0;:26:::1;::::0;5536:6;5517:26:::1;:18;:26;:::i;:::-;5475:12;::::0;5468:45:::1;::::0;-1:-1:-1;;;5468:45:26;;-1:-1:-1;;;;;5475:12:26;;::::1;::::0;5468:30:::1;::::0;:45:::1;::::0;5507:4:::1;::::0;5468:45:::1;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:75;;5443:162;;;;-1:-1:-1::0;;;5443:162:26::1;;;;;;;;;5638:13;::::0;-1:-1:-1;;;;;5629:22:26;;::::1;5638:13:::0;::::1;5629:22;5625:218;;;5742:15;::::0;:27:::1;::::0;5762:6;5742:27:::1;:19;:27;:::i;:::-;5699:13;::::0;5692:46:::1;::::0;-1:-1:-1;;;5692:46:26;;-1:-1:-1;;;;;5699:13:26;;::::1;::::0;5692:31:::1;::::0;:46:::1;::::0;5732:4:::1;::::0;5692:46:::1;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:77;;5667:165;;;;-1:-1:-1::0;;;5667:165:26::1;;;;;;;;;5852:46;-1:-1:-1::0;;;;;5852:26:26;::::1;5879:10;5891:6:::0;5852:46:::1;:26;:46;:::i;:::-;5324:581:::0;;:::o;798:35:27:-;;;-1:-1:-1;;;798:35:27;;;;;:::o;1957:43::-;;;;:::o;1385:28::-;;;-1:-1:-1;;;;;1385:28:27;;:::o;1808:35::-;;;-1:-1:-1;;;;;1808:35:27;;:::o;879:27::-;;;-1:-1:-1;;;879:27:27;;;;;:::o;2982:1447:28:-;1031:15;;3168:7;;-1:-1:-1;;;1031:15:28;;;;1023:45;;;;-1:-1:-1;;;1023:45:28;;;;;;;;;1135:16:::1;::::0;::::1;;1127:47;;;;-1:-1:-1::0;;;1127:47:28::1;;;;;;;;;1365:17:::2;;1350:11;:32;;1342:61;;;;-1:-1:-1::0;;;1342:61:28::2;;;;;;;;;515:9:39::3;::::0;-1:-1:-1;;;515:9:39;::::3;;;514:10;506:32;;;;-1:-1:-1::0;;;506:32:39::3;;;;;;;;;560:4;548:16:::0;;-1:-1:-1;;;;548:16:39::3;-1:-1:-1::0;;;548:16:39::3;::::0;;;;;;;;3424:26:28::4;3443:6:::0;3424:18:::4;:26::i;:::-;3210:240;;;;;;;;;;;;3480:11;3468:8;:23;;3460:58;;;;-1:-1:-1::0;;;3460:58:28::4;;;;;;;;;3554:41;3576:10;3588:6;3554:21;:41::i;:::-;3609:15:::0;;3605:108:::4;;3640:62;::::0;-1:-1:-1;;;3640:62:28;;3652:10:::4;::::0;3640:32:::4;::::0;:62:::4;::::0;3673:4:::4;::::0;3679:6;;3687:8;;3697:4;;;;3640:62:::4;;;;;;;;;;;;;;;;;;;;;;::::0;::::4;;;;;;;;;;;;::::0;::::4;;;;;;;;;3605:108;3722:43;3744:10;3756:8;3722:21;:43::i;:::-;3779:14:::0;;3775:160:::4;;3831:12;::::0;3809:46:::4;::::0;-1:-1:-1;;;;;3831:12:28::4;3845:9:::0;3809:21:::4;:46::i;:::-;3894:12;::::0;3874:50:::4;::::0;-1:-1:-1;;;;;3894:12:28;;::::4;::::0;3874:50:::4;::::0;::::4;::::0;3894:12;;3914:9;;3874:50:::4;;;;;;;;;;3775:160;4005:14;3974:27;;:45;3970:120;;4035:27;:44:::0;;;3970:120:::4;4133:13;4103:26;;:43;4099:116;;4162:26;:42:::0;;;4099:116:::4;4242:10;4228:24;;;;;;;;:10;::::0;::::4;;:24;::::0;::::4;;;;;;;4224:78;;4268:10;:23:::0;;4281:10;;4268;-1:-1:-1;;4268:23:28::4;::::0;4281:10;4268:23:::4;::::0;::::4;;;;;;;;;;;4224:78;4312:27;4329:9;4312:16;:27::i;:::-;4367:10;-1:-1:-1::0;;;;;4354:42:28::4;;4379:6;4387:8;4354:42;;;;;;;;1736:29:27::0;;;;:::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;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;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;;;;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;7611:2308:28:-;7715:16;7745:17;7776;7807:24;7845:22;7881:21;7961:19;:17;:19::i;:::-;7927:53;;;;;;;;8050:38;8066:6;8074:13;;8050:15;:38::i;:::-;8038:50;;8110:38;8126:6;8134:13;;8110:15;:38::i;:::-;8098:50;-1:-1:-1;8158:21:28;8182:36;8098:50;8182:21;:6;8193:9;8182:21;:10;:21;:::i;:36::-;8158:60;-1:-1:-1;8247:17:28;8233:10;;;;:31;;;;;;;;;8229:1591;;;8318:47;8336:13;8351;8318:17;:47::i;:::-;8307:58;;8392:23;8379:36;;8229:1591;;;8450:23;8436:10;;;;:37;;;;;;;;;8432:1388;;;8527:65;8547:13;8562:14;;8578:13;8527:19;:65::i;8432:1388::-;8677:23;8663:10;;;;:37;;;;;;;;;8659:1161;;;8716:25;8744:35;8763:15;;8744:14;:18;;:35;;;;:::i;:::-;8716:63;;8793:28;8824:33;8843:13;8824:14;;:18;;:33;;;;:::i;:::-;8793:64;;8967:20;8951:13;:36;8947:863;;;9166:67;9186:13;9201:15;;9218:14;9166:19;:67::i;:::-;9155:78;;9264:23;9251:36;;8947:863;;;9329:20;9312:13;:37;9308:502;;;9433:17;9422:28;;9481:17;9468:30;;9308:502;;;9607:134;9650:73;9668:39;:13;9686:20;9668:39;:17;:39;:::i;:::-;9709:13;9650:17;:73::i;9607:134::-;9596:145;;9772:23;9759:36;;9308:502;8659:1161;;;-1:-1:-1;7611:2308:28;;;;;;;:::o;281:217:41:-;339:7;362:6;358:45;;-1:-1:-1;391:1:41;384:8;;358:45;425:5;;;429:1;425;:5;:1;448:5;;;;;:10;440:32;;;;-1:-1:-1;;;440:32:41;;;;;;;;;490:1;281:217;-1:-1:-1;;;281:217:41:o;504:138::-;562:7;593:1;589;:5;581:32;;;;-1:-1:-1;;;581:32:41;;;;;;;;;634:1;630;:5;;;;;;;504:138;-1:-1:-1;;;504:138:41:o;934:134::-;992:7;1024:1;1019;:6;;1011:28;;;;-1:-1:-1;;;1011:28:41;;;;;;;;;-1:-1:-1;1056:5:41;;;934:134::o;392:115:36:-;455:7;379:6;481:13;:6;492:1;481:13;:10;:13;:::i;:::-;:19;;;;1074:157:41;1132:7;1163:5;;;1186:6;;;;1178:28;;;;-1:-1:-1;;;1178:28:41;;;;;;;;1574:183:26;1659:12;;1652:45;;-1:-1:-1;;;;;1659:12:26;1686:2;1690:6;1652:45;:33;:45;:::i;:::-;1724:14;;:26;;1743:6;1724:26;:18;:26;:::i;:::-;1707:14;:43;-1:-1:-1;;1574:183:26:o;1763:187::-;1849:13;;1842:46;;-1:-1:-1;;;;;1849:13:26;1877:2;1881:6;1842:46;:34;:46;:::i;:::-;1916:15;;:27;;1936:6;1916:27;:19;:27;:::i;:::-;1898:15;:45;-1:-1:-1;;1763:187:26:o;1222:346::-;1354:21;;1323:15;;:27;;1343:6;1323:27;:19;:27;:::i;:::-;:52;;1302:127;;;;-1:-1:-1;;;1302:127:26;;;;;;;;;1446:13;;1439:67;;-1:-1:-1;;;;;1446:13:26;1478:4;1492;1499:6;1439:67;:38;:67;:::i;:::-;1534:15;;:27;;1554:6;1534:27;:19;:27;:::i;2201:174::-;2293:27;;:39;;2325:6;2293:39;:31;:39;:::i;:::-;2263:27;:69;2347:21;;;;;;2354:6;;2362:5;;2347:21;;;;;;;;;;2201:174;:::o;645:123:36:-;713:7;739:22;759:1;739:15;:6;379;739:15;:10;:15;:::i;4861:2744:28:-;4966:20;5000:18;5032;5064:24;5102:22;5138:21;5218:19;:17;:19::i;:::-;5184:53;-1:-1:-1;5184:53:28;-1:-1:-1;5273:6:28;5248:22;5294:10;;;;:31;;;;;;;;;5290:1984;;;5416:50;5435:14;5451;5416:18;:50::i;:::-;5401:65;;5493:23;5480:36;;5290:1984;;;5551:23;5537:10;;;;:37;;;;;;;;;5533:1741;;;5590:24;5617:33;5635:14;;5617:13;:17;;:33;;;;:::i;:::-;5590:60;;5664:29;5696:35;5716:14;5696:15;;:19;;:35;;;;:::i;:::-;5664:67;;5857:16;5840:14;:33;5836:1183;;;5960:67;5981:14;5997;;6013:13;5960:20;:67::i;:::-;5945:82;;6058:23;6045:36;;6118:21;6103:12;:36;6099:386;;;6445:21;6430:36;;6099:386;5836:1183;;;6527:16;6509:14;:34;6505:514;;;6631:21;6616:36;;6683:17;6670:30;;6505:514;;;6813:137;6860:72;6879:36;:14;6898:16;6879:36;:18;:36;:::i;:::-;6917:14;6860:18;:72::i;6813:137::-;6798:152;;6981:23;6968:36;;6505:514;5533:1741;;;;;7144:69;7165:14;7181:15;;7198:14;7144:20;:69::i;:::-;7129:84;;7240:23;7227:36;;5533:1741;7319:44;7335:12;7349:13;;7319:15;:44::i;:::-;7306:57;;7386:44;7402:12;7416:13;;7386:15;:44::i;:::-;7373:57;-1:-1:-1;7455:44:28;7373:57;7455:28;:12;7472:10;7455:28;:16;:28;:::i;:::-;:32;:44;:32;:44;:::i;:::-;7440:59;-1:-1:-1;;4861:2744:28;;;;;;;:::o;911:305:26:-;1028:20;;998:14;;:26;;1017:6;998:26;:18;:26;:::i;:::-;:50;;990:90;;;;-1:-1:-1;;;990:90:26;;;;;;;;;1097:12;;1090:66;;-1:-1:-1;;;;;1097:12:26;1128:4;1142;1149:6;1090:66;:37;:66;:::i;:::-;1183:14;;:26;;1202:6;1183:26;:18;:26;:::i;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;2025:170:26:-;2115:26;;:38;;2146:6;2115:38;:30;:38;:::i;:::-;2086:26;:67;2168:20;;;;;;2175:6;;2183:4;;2168:20;;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;1183:414::-;1304:21;1358;1349:6;:30;1341:71;;;;-1:-1:-1;;;1341:71:25;;;;;;;;;1422:10;1435:33;:21;1461:6;1435:33;:25;:33;:::i;:::-;1422:46;;1494:66;1511:21;1534;1557:2;1494:16;:66::i;:::-;1478:82;1183:414;-1:-1:-1;;;;1183:414:25:o;3366:360::-;3511:21;3561:11;3552:6;:20;3544:61;;;;-1:-1:-1;;;3544:61:25;;;;;;;;;3615:10;3628:23;:11;3644:6;3628:23;:15;:23;:::i;:::-;3615:36;;3668:51;3685:16;3703:11;3716:2;3668:16;:51::i;:::-;3661:58;3366:360;-1:-1:-1;;;;;3366:360:25:o;2117:613::-;2264:21;2449:9;2461:16;:14;:16::i;:::-;2449:28;;2487:10;2500:186;2554:17;2585:12;2611:30;2631:1;2634:6;2611:19;:30::i;:::-;2655:4;2673:3;;2500:40;:186::i;:::-;2487:199;-1:-1:-1;2703:20:25;2487:199;2710:12;2703:20;:6;:20;:::i;:::-;2696:27;2117:613;-1:-1:-1;;;;;;2117:613:25:o;1015:275:40:-;1153:130;1186:5;1228:27;;;1257:4;1263:2;1267:5;1205:68;;;;;;;;;;;1153:130;1015:275;;;;:::o;557:620:25:-;680:25;721:9;733:16;:14;:16::i;:::-;721:28;;759:10;772:198;826:22;862;898:26;914:1;917:6;898:15;:26::i;:::-;938:5;957:3;;772:40;:198::i;:::-;759:211;-1:-1:-1;1140:30:25;:22;759:211;1140:30;:26;:30;:::i;3732:442::-;3878:25;;4076:23;:11;4092:6;4076:23;:15;:23;:::i;:::-;4063:36;;4116:51;4133:16;4151:2;4155:11;4116:16;:51::i;1649:462::-;1797:24;1833:9;1845:16;:14;:16::i;:::-;1833:28;;1871:10;1884:183;1938:17;1969:12;1995:26;2011:1;2014:6;1995:15;:26::i;1884:183::-;1871:196;-1:-1:-1;2084:20:25;:12;1871:196;2084:20;:16;:20;:::i;2335:1027:40:-;2984:12;2998:23;3033:5;-1:-1:-1;;;;;3025:19:40;3045:4;3025:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2983:67;;;;3068:7;3060:52;;;;-1:-1:-1;;;3060:52:40;;;;;;;;;3127:17;;:21;3123:233;;3279:10;3268:30;;;;;;;;;;;;;;3260:85;;;;-1:-1:-1;;;3260:85:40;;;;;;;;3310:569:35;3448:10;3504:12;3519:62;3539:37;3574:1;3539:30;3555:1;3558:10;3539:15;:30::i;:::-;:34;:37;:34;:37;:::i;:::-;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;6309:232:25:-;6424:7;6443:9;6455:16;:14;:16::i;:::-;6443:28;;6488:46;6515:2;6519;6523;6527:1;6530:3;;6488:26;:46::i;513:126:36:-;580:7;606:26;379:6;606:13;:6;617:1;606:13;:10;:13;:::i;:::-;:21;:26;:21;:26;:::i;1608:1507:35:-;1786:7;1885:14;1902:38;1937:2;1902:30;1929:2;1902:22;1918:1;1921:2;1902:15;:22::i;:38::-;1885:55;-1:-1:-1;1962:9:35;1974:43;1990:22;379:6:36;2010:1:35;1990:22;:19;:22;:::i;:::-;2014:2;1974:15;:43::i;:::-;1962:55;-1:-1:-1;2055:4:35;2069:158;;;;2102:14;:1;2108:7;2102:14;:5;:14;:::i;:::-;2098:18;;2069:158;;;2176:19;:6;2187:7;2176:19;:10;:19;:::i;:::-;2167:28;;2069:158;2245:6;2240:1;:11;2236:168;;2271:13;:1;2277:6;2271:13;:5;:13;:::i;:::-;2267:17;;2310:4;2298:16;;2236:168;;;2349:13;:6;2360:1;2349:13;:10;:13;:::i;:::-;2345:17;;2388:5;2376:17;;2236:168;2440:18;2461:112;2490:29;2517:1;2490:22;379:6:36;2510:1:35;2490:22;:19;:22;:::i;:29::-;2533:30;2560:2;2533:22;2549:1;2552:2;2533:15;:22::i;2461:112::-;2440:133;-1:-1:-1;2611:31:35;:24;2440:133;2611:8;2617:1;;2611:8;:5;:8;:::i;:31::-;2598:44;-1:-1:-1;2700:19:35;2722:29;2749:1;2722:22;379:6:36;2742:1:35;2722:22;:19;:22;:::i;:29::-;2700:51;;2771:17;2802:9;2798:129;;;2839:17;:1;2845:10;2839:17;:5;:17;:::i;:::-;2827:29;;2798:129;;;2899:17;:10;2914:1;2899:17;:14;:17;:::i;:::-;2887:29;;2798:129;2941:9;2937:172;;;2973:44;2994:9;3005:11;2973:20;:44::i;:::-;2966:51;;;;;;;;;;2937:172;3055:43;3075:9;3086:11;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;634:468:35:-;788:7;;828:30;844:1;847:10;:2;854;847:10;:6;:10;:::i;828:30::-;807:51;-1:-1:-1;879:16:35;898:43;918:18;933:2;918:10;925:2;;918:10;:6;:10;:::i;:18::-;938:2;898:19;:43::i;:::-;879:62;;951:15;969:28;985:1;988:8;969:15;:28::i;:::-;951:46;-1:-1:-1;1031:64:35;1047:10;1059:35;951:46;1059:22;379:6:36;1079:1:35;1059:22;:19;:22;:::i;1031:64::-;1024:71;634:468;-1:-1:-1;;;;;;;;;634:468:35:o;648:280:41:-;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;;5:130:-1;72:20;;-1:-1;;;;;26601:54;;27970:35;;27960:2;;28019:1;;28009:12;913:241;;1017:2;1005:9;996:7;992:23;988:32;985:2;;;-1:-1;;1023:12;985:2;1085:53;1130:7;1106:22;1085:53;;1161:366;;;1282:2;1270:9;1261:7;1257:23;1253:32;1250:2;;;-1:-1;;1288:12;1250:2;1350:53;1395:7;1371:22;1350:53;;;1340:63;1440:2;1479:22;;;;702:20;;-1:-1;;;1244:283;1534:257;;1646:2;1634:9;1625:7;1621:23;1617:32;1614:2;;;-1:-1;;1652:12;1614:2;223:6;217:13;28116:5;26374:13;26367:21;28094:5;28091:32;28081:2;;-1:-1;;28127:12;1798:241;;1902:2;1890:9;1881:7;1877:23;1873:32;1870:2;;;-1:-1;;1908:12;1870:2;-1:-1;702:20;;1864:175;-1:-1;1864:175;2046:263;;2161:2;2149:9;2140:7;2136:23;2132:32;2129:2;;;-1:-1;;2167:12;2129:2;-1:-1;850:13;;2123:186;-1:-1;2123:186;2316:615;;;;;2473:2;2461:9;2452:7;2448:23;2444:32;2441:2;;;-1:-1;;2479:12;2441:2;715:6;702:20;2531:63;;2631:2;2674:9;2670:22;702:20;2639:63;;2767:2;2756:9;2752:18;2739:32;2791:18;;2783:6;2780:30;2777:2;;;-1:-1;;2813:12;2777:2;2898:6;2887:9;2883:22;405:3;398:4;390:6;386:17;382:27;372:2;;-1:-1;;413:12;372:2;456:6;443:20;433:30;;2791:18;475:6;472:30;469:2;;;-1:-1;;505:12;469:2;600:3;2631:2;580:17;541:6;566:32;;563:41;560:2;;;-1:-1;;607:12;560:2;2435:496;;;;-1:-1;;2631:2;537:17;;;;-1:-1;;;2435:496;11855:271;;3806:5;25673:12;-1:-1;27491:101;27505:6;27502:1;27499:13;27491:101;;;3950:4;27572:11;;;;;27566:18;27553:11;;;27546:39;27520:10;27491:101;;;27607:6;27604:1;27601:13;27598:2;;;-1:-1;27663:6;27658:3;27654:16;27647:27;27598:2;-1:-1;3981:16;;;;;11989:137;-1:-1;;11989:137;12133:222;-1:-1;;;;;26601:54;;;;3158:37;;12260:2;12245:18;;12231:124;12362:349;-1:-1;;;;;26601:54;;;;3017:58;;12697:2;12682:18;;11806:37;12525:2;12510:18;;12496:215;12718:444;-1:-1;;;;;26601:54;;;3158:37;;26601:54;;;;13065:2;13050:18;;3158:37;13148:2;13133:18;;11806:37;;;;12901:2;12886:18;;12872:290;13509:210;26374:13;;26367:21;3272:34;;13630:2;13615:18;;13601:118;13726:321;26374:13;;26367:21;3272:34;;14033:2;14018:18;;11806:37;13875:2;13860:18;;13846:201;14054:648;;3299:5;26374:13;26367:21;3279:3;3272:34;11836:5;14446:2;14435:9;14431:18;11806:37;11836:5;14529:2;14518:9;14514:18;11806:37;14287:3;14566:2;14555:9;14551:18;14544:48;25829:6;14287:3;14276:9;14272:19;25817;27346:6;27341:3;25857:14;14276:9;25857:14;27323:30;27384:16;;;25857:14;27384:16;;;27377:27;;;;27779:7;27763:14;;;-1:-1;;27759:28;3593:39;;;14258:444;-1:-1;;;;14258:444;14709:244;14847:2;14832:18;;27882:1;27872:12;;27862:2;;27888:9;27862:2;4091:61;;;14818:135;;14960:416;15160:2;15174:47;;;4389:2;15145:18;;;25817:19;4425:31;25857:14;;;4405:52;4476:12;;;15131:245;15383:416;15583:2;15597:47;;;4727:2;15568:18;;;25817:19;-1:-1;;;25857:14;;;4743:36;4798:12;;;15554:245;15806:416;16006:2;16020:47;;;5049:1;15991:18;;;25817:19;-1:-1;;;25857:14;;;5064:32;5115:12;;;15977:245;16229:416;16429:2;16443:47;;;5366:2;16414:18;;;25817:19;5402:30;25857:14;;;5382:51;5452:12;;;16400:245;16652:416;16852:2;16866:47;;;16837:18;;;25817:19;5739:34;25857:14;;;5719:55;5793:12;;;16823:245;17075:416;17275:2;17289:47;;;6044:2;17260:18;;;25817:19;-1:-1;;;25857:14;;;6060:37;6116:12;;;17246:245;17498:416;17698:2;17712:47;;;6367:2;17683:18;;;25817:19;6403:29;25857:14;;;6383:50;6452:12;;;17669:245;17921:416;18121:2;18135:47;;;6703:1;18106:18;;;25817:19;-1:-1;;;25857:14;;;6718:32;6769:12;;;18092:245;18344:416;18544:2;18558:47;;;7020:2;18529:18;;;25817:19;7056:30;25857:14;;;7036:51;7106:12;;;18515:245;18767:416;18967:2;18981:47;;;7357:2;18952:18;;;25817:19;-1:-1;;;25857:14;;;7373:40;7432:12;;;18938:245;19190:416;19390:2;19404:47;;;7683:2;19375:18;;;25817:19;-1:-1;;;25857:14;;;7699:36;7754:12;;;19361:245;19613:416;19813:2;19827:47;;;8005:2;19798:18;;;25817:19;-1:-1;;;25857:14;;;8021:34;8074:12;;;19784:245;20036:416;20236:2;20250:47;;;8325:2;20221:18;;;25817:19;-1:-1;;;25857:14;;;8341:42;8402:12;;;20207:245;20459:416;20659:2;20673:47;;;8653:1;20644:18;;;25817:19;-1:-1;;;25857:14;;;8668:32;8719:12;;;20630:245;20882:416;21082:2;21096:47;;;8970:1;21067:18;;;25817:19;-1:-1;;;25857:14;;;8985:32;9036:12;;;21053:245;21305:416;21505:2;21519:47;;;9287:2;21490:18;;;25817:19;9323:34;25857:14;;;9303:55;-1:-1;;;9378:12;;;9371:34;9424:12;;;21476:245;21728:416;21928:2;21942:47;;;9675:2;21913:18;;;25817:19;9711:30;25857:14;;;9691:51;9761:12;;;21899:245;22151:416;22351:2;22365:47;;;10012:2;22336:18;;;25817:19;-1:-1;;;25857:14;;;10028:45;10092:12;;;22322:245;22574:416;22774:2;22788:47;;;10343:1;22759:18;;;25817:19;-1:-1;;;25857:14;;;10358:32;10409:12;;;22745:245;22997:416;23197:2;23211:47;;;10660:2;23182:18;;;25817:19;-1:-1;;;25857:14;;;10676:39;10734:12;;;23168:245;23420:416;23620:2;23634:47;;;10985:2;23605:18;;;25817:19;-1:-1;;;25857:14;;;11001:38;11058:12;;;23591:245;23843:416;24043:2;24057:47;;;11309:2;24028:18;;;25817:19;-1:-1;;;25857:14;;;11325:38;11382:12;;;24014:245;24266:416;24466:2;24480:47;;;11633:2;24451:18;;;25817:19;-1:-1;;;25857:14;;;11649:41;11709:12;;;24437:245;24689:222;11806:37;;;24816:2;24801:18;;24787:124;24918:321;11806:37;;;26374:13;26367:21;25225:2;25210:18;;3272:34;25067:2;25052:18;;25038:201;25246:333;11806:37;;;25565:2;25550:18;;11806:37;25401:2;25386:18;;25372: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 {Types} from \"../lib/Types.sol\";\nimport {IDODOCallee} from \"../intf/IDODOCallee.sol\";\nimport {Storage} from \"./Storage.sol\";\nimport {Pricing} from \"./Pricing.sol\";\nimport {Settlement} from \"./Settlement.sol\";\n\n\n/**\n * @title Trader\n * @author DODO Breeder\n *\n * @notice Functions for trader operations\n */\ncontract Trader is Storage, Pricing, Settlement {\n using SafeMath for uint256;\n\n // ============ Events ============\n\n event SellBaseToken(address indexed seller, uint256 payBase, uint256 receiveQuote);\n\n event BuyBaseToken(address indexed buyer, uint256 receiveBase, uint256 payQuote);\n\n event ChargeMaintainerFee(address indexed maintainer, bool isBaseToken, uint256 amount);\n\n // ============ Modifiers ============\n\n modifier tradeAllowed() {\n require(_TRADE_ALLOWED_, \"TRADE_NOT_ALLOWED\");\n _;\n }\n\n modifier buyingAllowed() {\n require(_BUYING_ALLOWED_, \"BUYING_NOT_ALLOWED\");\n _;\n }\n\n modifier sellingAllowed() {\n require(_SELLING_ALLOWED_, \"SELLING_NOT_ALLOWED\");\n _;\n }\n\n modifier gasPriceLimit() {\n require(tx.gasprice <= _GAS_PRICE_LIMIT_, \"GAS_PRICE_EXCEED\");\n _;\n }\n\n // ============ Trade Functions ============\n\n function sellBaseToken(\n uint256 amount,\n uint256 minReceiveQuote,\n bytes calldata data\n ) external tradeAllowed sellingAllowed gasPriceLimit preventReentrant returns (uint256) {\n // query price\n (\n uint256 receiveQuote,\n uint256 lpFeeQuote,\n uint256 mtFeeQuote,\n Types.RStatus newRStatus,\n uint256 newQuoteTarget,\n uint256 newBaseTarget\n ) = _querySellBaseToken(amount);\n require(receiveQuote >= minReceiveQuote, \"SELL_BASE_RECEIVE_NOT_ENOUGH\");\n\n // settle assets\n _quoteTokenTransferOut(msg.sender, receiveQuote);\n if (data.length > 0) {\n IDODOCallee(msg.sender).dodoCall(false, amount, receiveQuote, data);\n }\n _baseTokenTransferIn(msg.sender, amount);\n if (mtFeeQuote != 0) {\n _quoteTokenTransferOut(_MAINTAINER_, mtFeeQuote);\n emit ChargeMaintainerFee(_MAINTAINER_, false, mtFeeQuote);\n }\n\n // update TARGET\n if (_TARGET_QUOTE_TOKEN_AMOUNT_ != newQuoteTarget) {\n _TARGET_QUOTE_TOKEN_AMOUNT_ = newQuoteTarget;\n }\n if (_TARGET_BASE_TOKEN_AMOUNT_ != newBaseTarget) {\n _TARGET_BASE_TOKEN_AMOUNT_ = newBaseTarget;\n }\n if (_R_STATUS_ != newRStatus) {\n _R_STATUS_ = newRStatus;\n }\n\n _donateQuoteToken(lpFeeQuote);\n emit SellBaseToken(msg.sender, amount, receiveQuote);\n\n return receiveQuote;\n }\n\n function buyBaseToken(\n uint256 amount,\n uint256 maxPayQuote,\n bytes calldata data\n ) external tradeAllowed buyingAllowed gasPriceLimit preventReentrant returns (uint256) {\n // query price\n (\n uint256 payQuote,\n uint256 lpFeeBase,\n uint256 mtFeeBase,\n Types.RStatus newRStatus,\n uint256 newQuoteTarget,\n uint256 newBaseTarget\n ) = _queryBuyBaseToken(amount);\n require(payQuote <= maxPayQuote, \"BUY_BASE_COST_TOO_MUCH\");\n\n // settle assets\n _baseTokenTransferOut(msg.sender, amount);\n if (data.length > 0) {\n IDODOCallee(msg.sender).dodoCall(true, amount, payQuote, data);\n }\n _quoteTokenTransferIn(msg.sender, payQuote);\n if (mtFeeBase != 0) {\n _baseTokenTransferOut(_MAINTAINER_, mtFeeBase);\n emit ChargeMaintainerFee(_MAINTAINER_, true, mtFeeBase);\n }\n\n // update TARGET\n if (_TARGET_QUOTE_TOKEN_AMOUNT_ != newQuoteTarget) {\n _TARGET_QUOTE_TOKEN_AMOUNT_ = newQuoteTarget;\n }\n if (_TARGET_BASE_TOKEN_AMOUNT_ != newBaseTarget) {\n _TARGET_BASE_TOKEN_AMOUNT_ = newBaseTarget;\n }\n if (_R_STATUS_ != newRStatus) {\n _R_STATUS_ = newRStatus;\n }\n\n _donateBaseToken(lpFeeBase);\n emit BuyBaseToken(msg.sender, amount, payQuote);\n\n return payQuote;\n }\n\n // ============ Query Functions ============\n\n function querySellBaseToken(uint256 amount) external view returns (uint256 receiveQuote) {\n (receiveQuote, , , , , ) = _querySellBaseToken(amount);\n return receiveQuote;\n }\n\n function queryBuyBaseToken(uint256 amount) external view returns (uint256 payQuote) {\n (payQuote, , , , , ) = _queryBuyBaseToken(amount);\n return payQuote;\n }\n\n function _querySellBaseToken(uint256 amount)\n internal\n view\n returns (\n uint256 receiveQuote,\n uint256 lpFeeQuote,\n uint256 mtFeeQuote,\n Types.RStatus newRStatus,\n uint256 newQuoteTarget,\n uint256 newBaseTarget\n )\n {\n (newBaseTarget, newQuoteTarget) = getExpectedTarget();\n\n uint256 sellBaseAmount = amount;\n\n if (_R_STATUS_ == Types.RStatus.ONE) {\n // case 1: R=1\n // R falls below one\n receiveQuote = _ROneSellBaseToken(sellBaseAmount, newQuoteTarget);\n newRStatus = Types.RStatus.BELOW_ONE;\n } else if (_R_STATUS_ == Types.RStatus.ABOVE_ONE) {\n uint256 backToOnePayBase = newBaseTarget.sub(_BASE_BALANCE_);\n uint256 backToOneReceiveQuote = _QUOTE_BALANCE_.sub(newQuoteTarget);\n // case 2: R>1\n // complex case, R status depends on trading amount\n if (sellBaseAmount < backToOnePayBase) {\n // case 2.1: R status do not change\n receiveQuote = _RAboveSellBaseToken(sellBaseAmount, _BASE_BALANCE_, newBaseTarget);\n newRStatus = Types.RStatus.ABOVE_ONE;\n if (receiveQuote > backToOneReceiveQuote) {\n // [Important corner case!] may enter this branch when some precision problem happens. And consequently contribute to negative spare quote amount\n // to make sure spare quote>=0, mannually set receiveQuote=backToOneReceiveQuote\n receiveQuote = backToOneReceiveQuote;\n }\n } else if (sellBaseAmount == backToOnePayBase) {\n // case 2.2: R status changes to ONE\n receiveQuote = backToOneReceiveQuote;\n newRStatus = Types.RStatus.ONE;\n } else {\n // case 2.3: R status changes to BELOW_ONE\n receiveQuote = backToOneReceiveQuote.add(\n _ROneSellBaseToken(sellBaseAmount.sub(backToOnePayBase), newQuoteTarget)\n );\n newRStatus = Types.RStatus.BELOW_ONE;\n }\n } else {\n // _R_STATUS_ == Types.RStatus.BELOW_ONE\n // case 3: R<1\n receiveQuote = _RBelowSellBaseToken(sellBaseAmount, _QUOTE_BALANCE_, newQuoteTarget);\n newRStatus = Types.RStatus.BELOW_ONE;\n }\n\n // count fees\n lpFeeQuote = DecimalMath.mul(receiveQuote, _LP_FEE_RATE_);\n mtFeeQuote = DecimalMath.mul(receiveQuote, _MT_FEE_RATE_);\n receiveQuote = receiveQuote.sub(lpFeeQuote).sub(mtFeeQuote);\n\n return (receiveQuote, lpFeeQuote, mtFeeQuote, newRStatus, newQuoteTarget, newBaseTarget);\n }\n\n function _queryBuyBaseToken(uint256 amount)\n internal\n view\n returns (\n uint256 payQuote,\n uint256 lpFeeBase,\n uint256 mtFeeBase,\n Types.RStatus newRStatus,\n uint256 newQuoteTarget,\n uint256 newBaseTarget\n )\n {\n (newBaseTarget, newQuoteTarget) = getExpectedTarget();\n\n // charge fee from user receive amount\n lpFeeBase = DecimalMath.mul(amount, _LP_FEE_RATE_);\n mtFeeBase = DecimalMath.mul(amount, _MT_FEE_RATE_);\n uint256 buyBaseAmount = amount.add(lpFeeBase).add(mtFeeBase);\n\n if (_R_STATUS_ == Types.RStatus.ONE) {\n // case 1: R=1\n payQuote = _ROneBuyBaseToken(buyBaseAmount, newBaseTarget);\n newRStatus = Types.RStatus.ABOVE_ONE;\n } else if (_R_STATUS_ == Types.RStatus.ABOVE_ONE) {\n // case 2: R>1\n payQuote = _RAboveBuyBaseToken(buyBaseAmount, _BASE_BALANCE_, newBaseTarget);\n newRStatus = Types.RStatus.ABOVE_ONE;\n } else if (_R_STATUS_ == Types.RStatus.BELOW_ONE) {\n uint256 backToOnePayQuote = newQuoteTarget.sub(_QUOTE_BALANCE_);\n uint256 backToOneReceiveBase = _BASE_BALANCE_.sub(newBaseTarget);\n // case 3: R<1\n // complex case, R status may change\n if (buyBaseAmount < backToOneReceiveBase) {\n // case 3.1: R status do not change\n // no need to check payQuote because spare base token must be greater than zero\n payQuote = _RBelowBuyBaseToken(buyBaseAmount, _QUOTE_BALANCE_, newQuoteTarget);\n newRStatus = Types.RStatus.BELOW_ONE;\n } else if (buyBaseAmount == backToOneReceiveBase) {\n // case 3.2: R status changes to ONE\n payQuote = backToOnePayQuote;\n newRStatus = Types.RStatus.ONE;\n } else {\n // case 3.3: R status changes to ABOVE_ONE\n payQuote = backToOnePayQuote.add(\n _ROneBuyBaseToken(buyBaseAmount.sub(backToOneReceiveBase), newBaseTarget)\n );\n newRStatus = Types.RStatus.ABOVE_ONE;\n }\n }\n\n return (payQuote, lpFeeBase, mtFeeBase, newRStatus, newQuoteTarget, newBaseTarget);\n }\n}\n",
|
|
"sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Trader.sol",
|
|
"ast": {
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Trader.sol",
|
|
"exportedSymbols": {
|
|
"Trader": [
|
|
10351
|
|
]
|
|
},
|
|
"id": 10352,
|
|
"license": "Apache-2.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 9615,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".9"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "78:22:28"
|
|
},
|
|
{
|
|
"id": 9616,
|
|
"literals": [
|
|
"experimental",
|
|
"ABIEncoderV2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "101:33:28"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol",
|
|
"file": "../lib/SafeMath.sol",
|
|
"id": 9618,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 11624,
|
|
"src": "136:45:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9617,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "144:8:28",
|
|
"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": 9620,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 11079,
|
|
"src": "182:51:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9619,
|
|
"name": "DecimalMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "190:11:28",
|
|
"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": 9622,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 11632,
|
|
"src": "234:39:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9621,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "242:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IDODOCallee.sol",
|
|
"file": "../intf/IDODOCallee.sol",
|
|
"id": 9624,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 10507,
|
|
"src": "274:52:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9623,
|
|
"name": "IDODOCallee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "282:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Storage.sol",
|
|
"file": "./Storage.sol",
|
|
"id": 9626,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 9614,
|
|
"src": "327:38:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9625,
|
|
"name": "Storage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "335:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Pricing.sol",
|
|
"file": "./Pricing.sol",
|
|
"id": 9628,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 8854,
|
|
"src": "366:38:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9627,
|
|
"name": "Pricing",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "374:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Settlement.sol",
|
|
"file": "./Settlement.sol",
|
|
"id": 9630,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 9397,
|
|
"src": "405:44:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9629,
|
|
"name": "Settlement",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "413:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 9632,
|
|
"name": "Storage",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 9613,
|
|
"src": "566:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Storage_$9613",
|
|
"typeString": "contract Storage"
|
|
}
|
|
},
|
|
"id": 9633,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "566:7:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 9634,
|
|
"name": "Pricing",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 8853,
|
|
"src": "575:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Pricing_$8853",
|
|
"typeString": "contract Pricing"
|
|
}
|
|
},
|
|
"id": 9635,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "575:7:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 9636,
|
|
"name": "Settlement",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 9396,
|
|
"src": "584:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Settlement_$9396",
|
|
"typeString": "contract Settlement"
|
|
}
|
|
},
|
|
"id": 9637,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "584:10:28"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
8853,
|
|
9396,
|
|
9613,
|
|
11166,
|
|
11296
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 9631,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "452:94:28",
|
|
"text": " @title Trader\n @author DODO Breeder\n @notice Functions for trader operations"
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 10351,
|
|
"linearizedBaseContracts": [
|
|
10351,
|
|
9396,
|
|
8853,
|
|
9613,
|
|
11296,
|
|
11166
|
|
],
|
|
"name": "Trader",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 9640,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 9638,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11623,
|
|
"src": "607:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$11623",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "601:27:28",
|
|
"typeName": {
|
|
"id": 9639,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "620:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 9648,
|
|
"name": "SellBaseToken",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 9647,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9642,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "seller",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9648,
|
|
"src": "695:22:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 9641,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "695:7:28",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9644,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "payBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9648,
|
|
"src": "719:15:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9643,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "719:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9646,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "receiveQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9648,
|
|
"src": "736:20:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9645,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "736:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "694:63:28"
|
|
},
|
|
"src": "675:83:28"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 9656,
|
|
"name": "BuyBaseToken",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 9655,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9650,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "buyer",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9656,
|
|
"src": "783:21:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 9649,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "783:7:28",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9652,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "receiveBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9656,
|
|
"src": "806:19:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9651,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "806:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9654,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "payQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9656,
|
|
"src": "827:16:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9653,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "827:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "782:62:28"
|
|
},
|
|
"src": "764:81:28"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 9664,
|
|
"name": "ChargeMaintainerFee",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 9663,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9658,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "maintainer",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9664,
|
|
"src": "877:26:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 9657,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "877:7:28",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9660,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "isBaseToken",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9664,
|
|
"src": "905:16:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 9659,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "905:4:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9662,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9664,
|
|
"src": "923:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9661,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "923:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "876:62:28"
|
|
},
|
|
"src": "851:88:28"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9672,
|
|
"nodeType": "Block",
|
|
"src": "1013:73:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9667,
|
|
"name": "_TRADE_ALLOWED_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9431,
|
|
"src": "1031:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "54524144455f4e4f545f414c4c4f574544",
|
|
"id": 9668,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1048:19:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_a276537e38920b1f77c7c8c2b082f9b84306b71be306551ec925c75ea3b72343",
|
|
"typeString": "literal_string \"TRADE_NOT_ALLOWED\""
|
|
},
|
|
"value": "TRADE_NOT_ALLOWED"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_a276537e38920b1f77c7c8c2b082f9b84306b71be306551ec925c75ea3b72343",
|
|
"typeString": "literal_string \"TRADE_NOT_ALLOWED\""
|
|
}
|
|
],
|
|
"id": 9666,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1023:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 9669,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1023:45:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9670,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1023:45:28"
|
|
},
|
|
{
|
|
"id": 9671,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1078:1:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 9673,
|
|
"name": "tradeAllowed",
|
|
"nodeType": "ModifierDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9665,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1010:2:28"
|
|
},
|
|
"src": "989:97:28",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9681,
|
|
"nodeType": "Block",
|
|
"src": "1117:75:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9676,
|
|
"name": "_BUYING_ALLOWED_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9435,
|
|
"src": "1135:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "425559494e475f4e4f545f414c4c4f574544",
|
|
"id": 9677,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1153:20:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_ff4b067ea4e78a07e9f2c42853847fde0a109fa713bbb658dd5e72956cfe0087",
|
|
"typeString": "literal_string \"BUYING_NOT_ALLOWED\""
|
|
},
|
|
"value": "BUYING_NOT_ALLOWED"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_ff4b067ea4e78a07e9f2c42853847fde0a109fa713bbb658dd5e72956cfe0087",
|
|
"typeString": "literal_string \"BUYING_NOT_ALLOWED\""
|
|
}
|
|
],
|
|
"id": 9675,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1127:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 9678,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1127:47:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9679,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1127:47:28"
|
|
},
|
|
{
|
|
"id": 9680,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1184:1:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 9682,
|
|
"name": "buyingAllowed",
|
|
"nodeType": "ModifierDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9674,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1114:2:28"
|
|
},
|
|
"src": "1092:100:28",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9690,
|
|
"nodeType": "Block",
|
|
"src": "1224:77:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9685,
|
|
"name": "_SELLING_ALLOWED_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9437,
|
|
"src": "1242:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "53454c4c494e475f4e4f545f414c4c4f574544",
|
|
"id": 9686,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1261:21:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_b9cedf648d013202fd3dfb14738c5dd5367278e047930dbbeecece1d175ffa5e",
|
|
"typeString": "literal_string \"SELLING_NOT_ALLOWED\""
|
|
},
|
|
"value": "SELLING_NOT_ALLOWED"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_b9cedf648d013202fd3dfb14738c5dd5367278e047930dbbeecece1d175ffa5e",
|
|
"typeString": "literal_string \"SELLING_NOT_ALLOWED\""
|
|
}
|
|
],
|
|
"id": 9684,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1234:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 9687,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1234:49:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9688,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1234:49:28"
|
|
},
|
|
{
|
|
"id": 9689,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1293:1:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 9691,
|
|
"name": "sellingAllowed",
|
|
"nodeType": "ModifierDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9683,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1221:2:28"
|
|
},
|
|
"src": "1198:103:28",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9702,
|
|
"nodeType": "Block",
|
|
"src": "1332:89:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9697,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9694,
|
|
"name": "tx",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -26,
|
|
"src": "1350:2:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_transaction",
|
|
"typeString": "tx"
|
|
}
|
|
},
|
|
"id": 9695,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "gasprice",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1350:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9696,
|
|
"name": "_GAS_PRICE_LIMIT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9433,
|
|
"src": "1365:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1350:32:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4741535f50524943455f455843454544",
|
|
"id": 9698,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1384:18:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_f9e898838c870676efb9b2b0592d10219d9697c9d6edfa0e8e8f1d32ed503a32",
|
|
"typeString": "literal_string \"GAS_PRICE_EXCEED\""
|
|
},
|
|
"value": "GAS_PRICE_EXCEED"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_f9e898838c870676efb9b2b0592d10219d9697c9d6edfa0e8e8f1d32ed503a32",
|
|
"typeString": "literal_string \"GAS_PRICE_EXCEED\""
|
|
}
|
|
],
|
|
"id": 9693,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1342:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 9699,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1342:61:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9700,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1342:61:28"
|
|
},
|
|
{
|
|
"id": 9701,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1413:1:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 9703,
|
|
"name": "gasPriceLimit",
|
|
"nodeType": "ModifierDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9692,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1329:2:28"
|
|
},
|
|
"src": "1307:114:28",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9830,
|
|
"nodeType": "Block",
|
|
"src": "1678:1298:28",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
9723,
|
|
9725,
|
|
9727,
|
|
9729,
|
|
9731,
|
|
9733
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 9723,
|
|
"mutability": "mutable",
|
|
"name": "receiveQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9830,
|
|
"src": "1725:20:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9722,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1725:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9725,
|
|
"mutability": "mutable",
|
|
"name": "lpFeeQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9830,
|
|
"src": "1759:18:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9724,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1759:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9727,
|
|
"mutability": "mutable",
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9830,
|
|
"src": "1791:18:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9726,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1791:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9729,
|
|
"mutability": "mutable",
|
|
"name": "newRStatus",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9830,
|
|
"src": "1823:24:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 9728,
|
|
"name": "Types.RStatus",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11630,
|
|
"src": "1823:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9731,
|
|
"mutability": "mutable",
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9830,
|
|
"src": "1861:22:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9730,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1861:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9733,
|
|
"mutability": "mutable",
|
|
"name": "newBaseTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9830,
|
|
"src": "1897:21:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9732,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1897:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 9737,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9735,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9705,
|
|
"src": "1951:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9734,
|
|
"name": "_querySellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10175,
|
|
"src": "1931:19:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 9736,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1931:27:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1711:247:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9741,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9739,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9723,
|
|
"src": "1976:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9740,
|
|
"name": "minReceiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9707,
|
|
"src": "1992:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1976:31:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "53454c4c5f424153455f524543454956455f4e4f545f454e4f554748",
|
|
"id": 9742,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2009:30:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_e2576acc4b00a6068878bb264a3736551706bb27baf7a460c6372cbcdfae4018",
|
|
"typeString": "literal_string \"SELL_BASE_RECEIVE_NOT_ENOUGH\""
|
|
},
|
|
"value": "SELL_BASE_RECEIVE_NOT_ENOUGH"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_e2576acc4b00a6068878bb264a3736551706bb27baf7a460c6372cbcdfae4018",
|
|
"typeString": "literal_string \"SELL_BASE_RECEIVE_NOT_ENOUGH\""
|
|
}
|
|
],
|
|
"id": 9738,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1968:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 9743,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1968:72:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9744,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1968:72:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9746,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2099:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9747,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2099:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9748,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9723,
|
|
"src": "2111:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9745,
|
|
"name": "_quoteTokenTransferOut",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9013,
|
|
"src": "2076:22:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 9749,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2076:48:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9750,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2076:48:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9754,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9751,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9709,
|
|
"src": "2138:4:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes calldata"
|
|
}
|
|
},
|
|
"id": 9752,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2138:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 9753,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2152:1:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2138:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9767,
|
|
"nodeType": "IfStatement",
|
|
"src": "2134:113:28",
|
|
"trueBody": {
|
|
"id": 9766,
|
|
"nodeType": "Block",
|
|
"src": "2155:92:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "66616c7365",
|
|
"id": 9760,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2202:5:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "false"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9761,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9705,
|
|
"src": "2209:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9762,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9723,
|
|
"src": "2217:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9763,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9709,
|
|
"src": "2231:4:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes calldata"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes calldata"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9756,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2181:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9757,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2181:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 9755,
|
|
"name": "IDODOCallee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10506,
|
|
"src": "2169:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IDODOCallee_$10506_$",
|
|
"typeString": "type(contract IDODOCallee)"
|
|
}
|
|
},
|
|
"id": 9758,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2169:23:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IDODOCallee_$10506",
|
|
"typeString": "contract IDODOCallee"
|
|
}
|
|
},
|
|
"id": 9759,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "dodoCall",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 10505,
|
|
"src": "2169:32:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_bool_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,uint256,uint256,bytes memory) external"
|
|
}
|
|
},
|
|
"id": 9764,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2169:67:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9765,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2169:67:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9769,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2277:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9770,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2277:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9771,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9705,
|
|
"src": "2289:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9768,
|
|
"name": "_baseTokenTransferIn",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8930,
|
|
"src": "2256:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 9772,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2256:40:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9773,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2256:40:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9776,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9774,
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9727,
|
|
"src": "2310:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 9775,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2324:1:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2310:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9789,
|
|
"nodeType": "IfStatement",
|
|
"src": "2306:165:28",
|
|
"trueBody": {
|
|
"id": 9788,
|
|
"nodeType": "Block",
|
|
"src": "2327:144:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9778,
|
|
"name": "_MAINTAINER_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9445,
|
|
"src": "2364:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9779,
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9727,
|
|
"src": "2378:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9777,
|
|
"name": "_quoteTokenTransferOut",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9013,
|
|
"src": "2341:22:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 9780,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2341:48:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9781,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2341:48:28"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9783,
|
|
"name": "_MAINTAINER_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9445,
|
|
"src": "2428:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "66616c7365",
|
|
"id": 9784,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2442:5:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "false"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9785,
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9727,
|
|
"src": "2449:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9782,
|
|
"name": "ChargeMaintainerFee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9664,
|
|
"src": "2408:19:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,bool,uint256)"
|
|
}
|
|
},
|
|
"id": 9786,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2408:52:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9787,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2403:57:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9792,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9790,
|
|
"name": "_TARGET_QUOTE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9463,
|
|
"src": "2510:27:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9791,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9731,
|
|
"src": "2541:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2510:45:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9798,
|
|
"nodeType": "IfStatement",
|
|
"src": "2506:120:28",
|
|
"trueBody": {
|
|
"id": 9797,
|
|
"nodeType": "Block",
|
|
"src": "2557:69:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9795,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9793,
|
|
"name": "_TARGET_QUOTE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9463,
|
|
"src": "2571:27:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9794,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9731,
|
|
"src": "2601:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2571:44:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 9796,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2571:44:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9801,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9799,
|
|
"name": "_TARGET_BASE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9461,
|
|
"src": "2639:26:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9800,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9733,
|
|
"src": "2669:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2639:43:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9807,
|
|
"nodeType": "IfStatement",
|
|
"src": "2635:116:28",
|
|
"trueBody": {
|
|
"id": 9806,
|
|
"nodeType": "Block",
|
|
"src": "2684:67:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9804,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9802,
|
|
"name": "_TARGET_BASE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9461,
|
|
"src": "2698:26:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9803,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9733,
|
|
"src": "2727:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2698:42:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 9805,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2698:42:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 9810,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9808,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "2764:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9809,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9729,
|
|
"src": "2778:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "2764:24:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9816,
|
|
"nodeType": "IfStatement",
|
|
"src": "2760:78:28",
|
|
"trueBody": {
|
|
"id": 9815,
|
|
"nodeType": "Block",
|
|
"src": "2790:48:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9813,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9811,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "2804:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9812,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9729,
|
|
"src": "2817:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "2804:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 9814,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2804:23:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9818,
|
|
"name": "lpFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9725,
|
|
"src": "2866:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9817,
|
|
"name": "_donateQuoteToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9049,
|
|
"src": "2848:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 9819,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2848:29:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9820,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2848:29:28"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9822,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2906:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9823,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2906:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9824,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9705,
|
|
"src": "2918:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9825,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9723,
|
|
"src": "2926:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9821,
|
|
"name": "SellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9648,
|
|
"src": "2892:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 9826,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2892:47:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9827,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2887:52:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9828,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9723,
|
|
"src": "2957:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 9721,
|
|
"id": 9829,
|
|
"nodeType": "Return",
|
|
"src": "2950:19:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "8dae7333",
|
|
"id": 9831,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 9712,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9711,
|
|
"name": "tradeAllowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9673,
|
|
"src": "1601:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1601:12:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"id": 9714,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9713,
|
|
"name": "sellingAllowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9691,
|
|
"src": "1614:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1614:14:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"id": 9716,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9715,
|
|
"name": "gasPriceLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9703,
|
|
"src": "1629:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1629:13:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"id": 9718,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9717,
|
|
"name": "preventReentrant",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11295,
|
|
"src": "1643:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1643:16:28"
|
|
}
|
|
],
|
|
"name": "sellBaseToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9710,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9705,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9831,
|
|
"src": "1509:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9704,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1509:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9707,
|
|
"mutability": "mutable",
|
|
"name": "minReceiveQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9831,
|
|
"src": "1533:23:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9706,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1533:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9709,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9831,
|
|
"src": "1566:19:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "calldata",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 9708,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1566:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1499:92:28"
|
|
},
|
|
"returnParameters": {
|
|
"id": 9721,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9720,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9831,
|
|
"src": "1669:7:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9719,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1669:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1668:9:28"
|
|
},
|
|
"scope": 10351,
|
|
"src": "1477:1499:28",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9958,
|
|
"nodeType": "Block",
|
|
"src": "3177:1252:28",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
9851,
|
|
9853,
|
|
9855,
|
|
9857,
|
|
9859,
|
|
9861
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 9851,
|
|
"mutability": "mutable",
|
|
"name": "payQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9958,
|
|
"src": "3224:16:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9850,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3224:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9853,
|
|
"mutability": "mutable",
|
|
"name": "lpFeeBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9958,
|
|
"src": "3254:17:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9852,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3254:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9855,
|
|
"mutability": "mutable",
|
|
"name": "mtFeeBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9958,
|
|
"src": "3285:17:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9854,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3285:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9857,
|
|
"mutability": "mutable",
|
|
"name": "newRStatus",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9958,
|
|
"src": "3316:24:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 9856,
|
|
"name": "Types.RStatus",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11630,
|
|
"src": "3316:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9859,
|
|
"mutability": "mutable",
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9958,
|
|
"src": "3354:22:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9858,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3354:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9861,
|
|
"mutability": "mutable",
|
|
"name": "newBaseTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9958,
|
|
"src": "3390:21:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9860,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3390:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 9865,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9863,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9833,
|
|
"src": "3443:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9862,
|
|
"name": "_queryBuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10350,
|
|
"src": "3424:18:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 9864,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3424:26:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3210:240:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9869,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9867,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9851,
|
|
"src": "3468:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9868,
|
|
"name": "maxPayQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9835,
|
|
"src": "3480:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3468:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4255595f424153455f434f53545f544f4f5f4d554348",
|
|
"id": 9870,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3493:24:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_f0ac5b3c32d4064b3751261129f0fefc22b7826ab110012bdbce29191898a75a",
|
|
"typeString": "literal_string \"BUY_BASE_COST_TOO_MUCH\""
|
|
},
|
|
"value": "BUY_BASE_COST_TOO_MUCH"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_f0ac5b3c32d4064b3751261129f0fefc22b7826ab110012bdbce29191898a75a",
|
|
"typeString": "literal_string \"BUY_BASE_COST_TOO_MUCH\""
|
|
}
|
|
],
|
|
"id": 9866,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "3460:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 9871,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3460:58:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9872,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3460:58:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9874,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3576:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9875,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3576:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9876,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9833,
|
|
"src": "3588:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9873,
|
|
"name": "_baseTokenTransferOut",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8990,
|
|
"src": "3554:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 9877,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3554:41:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9878,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3554:41:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9882,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9879,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9837,
|
|
"src": "3609:4:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes calldata"
|
|
}
|
|
},
|
|
"id": 9880,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3609:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 9881,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3623:1:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "3609:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9895,
|
|
"nodeType": "IfStatement",
|
|
"src": "3605:108:28",
|
|
"trueBody": {
|
|
"id": 9894,
|
|
"nodeType": "Block",
|
|
"src": "3626:87:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 9888,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3673:4:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9889,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9833,
|
|
"src": "3679:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9890,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9851,
|
|
"src": "3687:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9891,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9837,
|
|
"src": "3697:4:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes calldata"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes calldata"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9884,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3652:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9885,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3652:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 9883,
|
|
"name": "IDODOCallee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10506,
|
|
"src": "3640:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IDODOCallee_$10506_$",
|
|
"typeString": "type(contract IDODOCallee)"
|
|
}
|
|
},
|
|
"id": 9886,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3640:23:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IDODOCallee_$10506",
|
|
"typeString": "contract IDODOCallee"
|
|
}
|
|
},
|
|
"id": 9887,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "dodoCall",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 10505,
|
|
"src": "3640:32:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_bool_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,uint256,uint256,bytes memory) external"
|
|
}
|
|
},
|
|
"id": 9892,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3640:62:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9893,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3640:62:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9897,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3744:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9898,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3744:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9899,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9851,
|
|
"src": "3756:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9896,
|
|
"name": "_quoteTokenTransferIn",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8967,
|
|
"src": "3722:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 9900,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3722:43:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9901,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3722:43:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9904,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9902,
|
|
"name": "mtFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9855,
|
|
"src": "3779:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 9903,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3792:1:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "3779:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9917,
|
|
"nodeType": "IfStatement",
|
|
"src": "3775:160:28",
|
|
"trueBody": {
|
|
"id": 9916,
|
|
"nodeType": "Block",
|
|
"src": "3795:140:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9906,
|
|
"name": "_MAINTAINER_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9445,
|
|
"src": "3831:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9907,
|
|
"name": "mtFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9855,
|
|
"src": "3845:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9905,
|
|
"name": "_baseTokenTransferOut",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8990,
|
|
"src": "3809:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 9908,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3809:46:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9909,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3809:46:28"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9911,
|
|
"name": "_MAINTAINER_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9445,
|
|
"src": "3894:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 9912,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3908:4:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9913,
|
|
"name": "mtFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9855,
|
|
"src": "3914:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9910,
|
|
"name": "ChargeMaintainerFee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9664,
|
|
"src": "3874:19:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,bool,uint256)"
|
|
}
|
|
},
|
|
"id": 9914,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3874:50:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9915,
|
|
"nodeType": "EmitStatement",
|
|
"src": "3869:55:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9920,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9918,
|
|
"name": "_TARGET_QUOTE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9463,
|
|
"src": "3974:27:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9919,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9859,
|
|
"src": "4005:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3974:45:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9926,
|
|
"nodeType": "IfStatement",
|
|
"src": "3970:120:28",
|
|
"trueBody": {
|
|
"id": 9925,
|
|
"nodeType": "Block",
|
|
"src": "4021:69:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9923,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9921,
|
|
"name": "_TARGET_QUOTE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9463,
|
|
"src": "4035:27:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9922,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9859,
|
|
"src": "4065:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4035:44:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 9924,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4035:44:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9929,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9927,
|
|
"name": "_TARGET_BASE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9461,
|
|
"src": "4103:26:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9928,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9861,
|
|
"src": "4133:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4103:43:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9935,
|
|
"nodeType": "IfStatement",
|
|
"src": "4099:116:28",
|
|
"trueBody": {
|
|
"id": 9934,
|
|
"nodeType": "Block",
|
|
"src": "4148:67:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9932,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9930,
|
|
"name": "_TARGET_BASE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9461,
|
|
"src": "4162:26:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9931,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9861,
|
|
"src": "4191:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4162:42:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 9933,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4162:42:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 9938,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9936,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "4228:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9937,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9857,
|
|
"src": "4242:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "4228:24:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9944,
|
|
"nodeType": "IfStatement",
|
|
"src": "4224:78:28",
|
|
"trueBody": {
|
|
"id": 9943,
|
|
"nodeType": "Block",
|
|
"src": "4254:48:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9941,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9939,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "4268:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9940,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9857,
|
|
"src": "4281:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "4268:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 9942,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4268:23:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9946,
|
|
"name": "lpFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9853,
|
|
"src": "4329:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9945,
|
|
"name": "_donateBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9031,
|
|
"src": "4312:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 9947,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4312:27:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9948,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4312:27:28"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9950,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "4367:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9951,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4367:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9952,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9833,
|
|
"src": "4379:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9953,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9851,
|
|
"src": "4387:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9949,
|
|
"name": "BuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9656,
|
|
"src": "4354:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 9954,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4354:42:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9955,
|
|
"nodeType": "EmitStatement",
|
|
"src": "4349:47:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9956,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9851,
|
|
"src": "4414:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 9849,
|
|
"id": 9957,
|
|
"nodeType": "Return",
|
|
"src": "4407:15:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "e67ce706",
|
|
"id": 9959,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 9840,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9839,
|
|
"name": "tradeAllowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9673,
|
|
"src": "3101:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "3101:12:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"id": 9842,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9841,
|
|
"name": "buyingAllowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9682,
|
|
"src": "3114:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "3114:13:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"id": 9844,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9843,
|
|
"name": "gasPriceLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9703,
|
|
"src": "3128:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "3128:13:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"id": 9846,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9845,
|
|
"name": "preventReentrant",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11295,
|
|
"src": "3142:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "3142:16:28"
|
|
}
|
|
],
|
|
"name": "buyBaseToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9838,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9833,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9959,
|
|
"src": "3013:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9832,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3013:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9835,
|
|
"mutability": "mutable",
|
|
"name": "maxPayQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9959,
|
|
"src": "3037:19:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9834,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3037:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9837,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9959,
|
|
"src": "3066:19:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "calldata",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 9836,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3066:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3003:88:28"
|
|
},
|
|
"returnParameters": {
|
|
"id": 9849,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9848,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9959,
|
|
"src": "3168:7:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9847,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3168:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3167:9:28"
|
|
},
|
|
"scope": 10351,
|
|
"src": "2982:1447:28",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9975,
|
|
"nodeType": "Block",
|
|
"src": "4574:100:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9971,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9966,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9964,
|
|
"src": "4585:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null
|
|
],
|
|
"id": 9967,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "TupleExpression",
|
|
"src": "4584:24:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$__$__$__$__$__$",
|
|
"typeString": "tuple(uint256,,,,,)"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9969,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9961,
|
|
"src": "4631:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9968,
|
|
"name": "_querySellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10175,
|
|
"src": "4611:19:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 9970,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4611:27:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"src": "4584:54:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9972,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4584:54:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9973,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9964,
|
|
"src": "4655:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 9965,
|
|
"id": 9974,
|
|
"nodeType": "Return",
|
|
"src": "4648:19:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "a2801e16",
|
|
"id": 9976,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "querySellBaseToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9962,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9961,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9976,
|
|
"src": "4513:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9960,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4513:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4512:16:28"
|
|
},
|
|
"returnParameters": {
|
|
"id": 9965,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9964,
|
|
"mutability": "mutable",
|
|
"name": "receiveQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9976,
|
|
"src": "4552:20:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9963,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4552:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4551:22:28"
|
|
},
|
|
"scope": 10351,
|
|
"src": "4485:189:28",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9992,
|
|
"nodeType": "Block",
|
|
"src": "4764:91:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9988,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9983,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9981,
|
|
"src": "4775:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null
|
|
],
|
|
"id": 9984,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "TupleExpression",
|
|
"src": "4774:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$__$__$__$__$__$",
|
|
"typeString": "tuple(uint256,,,,,)"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9986,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9978,
|
|
"src": "4816:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9985,
|
|
"name": "_queryBuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10350,
|
|
"src": "4797:18:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 9987,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4797:26:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"src": "4774:49:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9989,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4774:49:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9990,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9981,
|
|
"src": "4840:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 9982,
|
|
"id": 9991,
|
|
"nodeType": "Return",
|
|
"src": "4833:15:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "18c0bbe4",
|
|
"id": 9993,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "queryBuyBaseToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9979,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9978,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9993,
|
|
"src": "4707:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9977,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4707:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4706:16:28"
|
|
},
|
|
"returnParameters": {
|
|
"id": 9982,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9981,
|
|
"mutability": "mutable",
|
|
"name": "payQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9993,
|
|
"src": "4746:16:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9980,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4746:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4745:18:28"
|
|
},
|
|
"scope": 10351,
|
|
"src": "4680:175:28",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 10174,
|
|
"nodeType": "Block",
|
|
"src": "5174:2431:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10015,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10010,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10008,
|
|
"src": "5185:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10011,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10006,
|
|
"src": "5200:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 10012,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "TupleExpression",
|
|
"src": "5184:31:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256)"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 10013,
|
|
"name": "getExpectedTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8733,
|
|
"src": "5218:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function () view returns (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 10014,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5218:19:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256)"
|
|
}
|
|
},
|
|
"src": "5184:53:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 10016,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5184:53:28"
|
|
},
|
|
{
|
|
"assignments": [
|
|
10018
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 10018,
|
|
"mutability": "mutable",
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10174,
|
|
"src": "5248:22:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10017,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5248:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 10020,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"id": 10019,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9995,
|
|
"src": "5273:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "5248:31:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 10025,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10021,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "5294:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10022,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "5308:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10023,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "5308:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10024,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "5308:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "5294:31:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 10044,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10040,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "5537:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10041,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "5551:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10042,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "5551:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10043,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ABOVE_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "5551:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "5537:37:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 10137,
|
|
"nodeType": "Block",
|
|
"src": "7035:239:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10129,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10123,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "7129:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10125,
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10018,
|
|
"src": "7165:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10126,
|
|
"name": "_QUOTE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9467,
|
|
"src": "7181:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10127,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10006,
|
|
"src": "7198:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10124,
|
|
"name": "_RBelowSellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8494,
|
|
"src": "7144:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10128,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7144:69:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7129:84:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10130,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7129:84:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10135,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10131,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10004,
|
|
"src": "7227:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10132,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "7240:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10133,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "7240:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10134,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "BELOW_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "7240:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "7227:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10136,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7227:36:28"
|
|
}
|
|
]
|
|
},
|
|
"id": 10138,
|
|
"nodeType": "IfStatement",
|
|
"src": "5533:1741:28",
|
|
"trueBody": {
|
|
"id": 10122,
|
|
"nodeType": "Block",
|
|
"src": "5576:1453:28",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
10046
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 10046,
|
|
"mutability": "mutable",
|
|
"name": "backToOnePayBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10122,
|
|
"src": "5590:24:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10045,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5590:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 10051,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10049,
|
|
"name": "_BASE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9465,
|
|
"src": "5635:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10047,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10008,
|
|
"src": "5617:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10048,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "5617:17:28",
|
|
"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": 10050,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5617:33:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "5590:60:28"
|
|
},
|
|
{
|
|
"assignments": [
|
|
10053
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 10053,
|
|
"mutability": "mutable",
|
|
"name": "backToOneReceiveQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10122,
|
|
"src": "5664:29:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10052,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5664:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 10058,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10056,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10006,
|
|
"src": "5716:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10054,
|
|
"name": "_QUOTE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9467,
|
|
"src": "5696:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10055,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "5696:19:28",
|
|
"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": 10057,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5696:35:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "5664:67:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 10061,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10059,
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10018,
|
|
"src": "5840:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10060,
|
|
"name": "backToOnePayBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10046,
|
|
"src": "5857:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5840:33:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 10088,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10086,
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10018,
|
|
"src": "6509:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10087,
|
|
"name": "backToOnePayBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10046,
|
|
"src": "6527:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "6509:34:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 10119,
|
|
"nodeType": "Block",
|
|
"src": "6721:298:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10111,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10100,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "6798:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10106,
|
|
"name": "backToOnePayBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10046,
|
|
"src": "6898:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10104,
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10018,
|
|
"src": "6879:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10105,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "6879:18:28",
|
|
"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": 10107,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6879:36:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10108,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10006,
|
|
"src": "6917:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10103,
|
|
"name": "_ROneSellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8423,
|
|
"src": "6860:18:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10109,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6860:72:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10101,
|
|
"name": "backToOneReceiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10053,
|
|
"src": "6813:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10102,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11582,
|
|
"src": "6813:25:28",
|
|
"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": 10110,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6813:137:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "6798:152:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10112,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6798:152:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10117,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10113,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10004,
|
|
"src": "6968:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10114,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "6981:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10115,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "6981:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10116,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "BELOW_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "6981:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "6968:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10118,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6968:36:28"
|
|
}
|
|
]
|
|
},
|
|
"id": 10120,
|
|
"nodeType": "IfStatement",
|
|
"src": "6505:514:28",
|
|
"trueBody": {
|
|
"id": 10099,
|
|
"nodeType": "Block",
|
|
"src": "6545:170:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10091,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10089,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "6616:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10090,
|
|
"name": "backToOneReceiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10053,
|
|
"src": "6631:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "6616:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10092,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6616:36:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10097,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10093,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10004,
|
|
"src": "6670:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10094,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "6683:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10095,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "6683:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10096,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "6683:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "6670:30:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10098,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6670:30:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 10121,
|
|
"nodeType": "IfStatement",
|
|
"src": "5836:1183:28",
|
|
"trueBody": {
|
|
"id": 10085,
|
|
"nodeType": "Block",
|
|
"src": "5875:624:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10068,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10062,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "5945:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10064,
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10018,
|
|
"src": "5981:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10065,
|
|
"name": "_BASE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9465,
|
|
"src": "5997:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10066,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10008,
|
|
"src": "6013:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10063,
|
|
"name": "_RAboveSellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8628,
|
|
"src": "5960:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10067,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5960:67:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5945:82:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10069,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5945:82:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10074,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10070,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10004,
|
|
"src": "6045:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10071,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "6058:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10072,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "6058:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10073,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ABOVE_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "6058:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "6045:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10075,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6045:36:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 10078,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10076,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "6103:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10077,
|
|
"name": "backToOneReceiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10053,
|
|
"src": "6118:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "6103:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 10084,
|
|
"nodeType": "IfStatement",
|
|
"src": "6099:386:28",
|
|
"trueBody": {
|
|
"id": 10083,
|
|
"nodeType": "Block",
|
|
"src": "6141:344:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10081,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10079,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "6430:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10080,
|
|
"name": "backToOneReceiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10053,
|
|
"src": "6445:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "6430:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10082,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6430:36:28"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 10139,
|
|
"nodeType": "IfStatement",
|
|
"src": "5290:1984:28",
|
|
"trueBody": {
|
|
"id": 10039,
|
|
"nodeType": "Block",
|
|
"src": "5327:200:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10031,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10026,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "5401:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10028,
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10018,
|
|
"src": "5435:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10029,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10006,
|
|
"src": "5451:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10027,
|
|
"name": "_ROneSellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8423,
|
|
"src": "5416:18:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10030,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5416:50:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5401:65:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10032,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5401:65:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10037,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10033,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10004,
|
|
"src": "5480:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10034,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "5493:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10035,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "5493:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10036,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "BELOW_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "5493:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "5480:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10038,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5480:36:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10146,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10140,
|
|
"name": "lpFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10000,
|
|
"src": "7306:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10143,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "7335:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10144,
|
|
"name": "_LP_FEE_RATE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9453,
|
|
"src": "7349:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10141,
|
|
"name": "DecimalMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11078,
|
|
"src": "7319:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$",
|
|
"typeString": "type(library DecimalMath)"
|
|
}
|
|
},
|
|
"id": 10142,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11023,
|
|
"src": "7319:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10145,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7319:44:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7306:57:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10147,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7306:57:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10154,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10148,
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10002,
|
|
"src": "7373:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10151,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "7402:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10152,
|
|
"name": "_MT_FEE_RATE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9455,
|
|
"src": "7416:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10149,
|
|
"name": "DecimalMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11078,
|
|
"src": "7386:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$",
|
|
"typeString": "type(library DecimalMath)"
|
|
}
|
|
},
|
|
"id": 10150,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11023,
|
|
"src": "7386:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10153,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7386:44:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7373:57:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10155,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7373:57:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10164,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10156,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "7440:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10162,
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10002,
|
|
"src": "7488:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10159,
|
|
"name": "lpFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10000,
|
|
"src": "7472:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10157,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "7455:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10158,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "7455:16:28",
|
|
"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": 10160,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7455:28:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10161,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "7455:32:28",
|
|
"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": 10163,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7455:44:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7440:59:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10165,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7440:59:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10166,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "7518:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10167,
|
|
"name": "lpFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10000,
|
|
"src": "7532:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10168,
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10002,
|
|
"src": "7544:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10169,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10004,
|
|
"src": "7556:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10170,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10006,
|
|
"src": "7568:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10171,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10008,
|
|
"src": "7584:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 10172,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "7517:81:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"functionReturnParameters": 10009,
|
|
"id": 10173,
|
|
"nodeType": "Return",
|
|
"src": "7510:88:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 10175,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_querySellBaseToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9996,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9995,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "4890:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9994,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4890:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4889:16:28"
|
|
},
|
|
"returnParameters": {
|
|
"id": 10009,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9998,
|
|
"mutability": "mutable",
|
|
"name": "receiveQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "4966:20:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9997,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4966:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10000,
|
|
"mutability": "mutable",
|
|
"name": "lpFeeQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "5000:18:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9999,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5000:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10002,
|
|
"mutability": "mutable",
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "5032:18:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10001,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5032:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10004,
|
|
"mutability": "mutable",
|
|
"name": "newRStatus",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "5064:24:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 10003,
|
|
"name": "Types.RStatus",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11630,
|
|
"src": "5064:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10006,
|
|
"mutability": "mutable",
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "5102:22:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10005,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5102:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10008,
|
|
"mutability": "mutable",
|
|
"name": "newBaseTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "5138:21:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10007,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5138:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4952:217:28"
|
|
},
|
|
"scope": 10351,
|
|
"src": "4861:2744:28",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 10349,
|
|
"nodeType": "Block",
|
|
"src": "7917:2002:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10197,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10192,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10190,
|
|
"src": "7928:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10193,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10188,
|
|
"src": "7943:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 10194,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "TupleExpression",
|
|
"src": "7927:31:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256)"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 10195,
|
|
"name": "getExpectedTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8733,
|
|
"src": "7961:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function () view returns (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 10196,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7961:19:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256)"
|
|
}
|
|
},
|
|
"src": "7927:53:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 10198,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7927:53:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10205,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10199,
|
|
"name": "lpFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10182,
|
|
"src": "8038:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10202,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10177,
|
|
"src": "8066:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10203,
|
|
"name": "_LP_FEE_RATE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9453,
|
|
"src": "8074:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10200,
|
|
"name": "DecimalMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11078,
|
|
"src": "8050:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$",
|
|
"typeString": "type(library DecimalMath)"
|
|
}
|
|
},
|
|
"id": 10201,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11023,
|
|
"src": "8050:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10204,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8050:38:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "8038:50:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10206,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8038:50:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10213,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10207,
|
|
"name": "mtFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10184,
|
|
"src": "8098:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10210,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10177,
|
|
"src": "8126:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10211,
|
|
"name": "_MT_FEE_RATE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9455,
|
|
"src": "8134:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10208,
|
|
"name": "DecimalMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11078,
|
|
"src": "8110:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$",
|
|
"typeString": "type(library DecimalMath)"
|
|
}
|
|
},
|
|
"id": 10209,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11023,
|
|
"src": "8110:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10212,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8110:38:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "8098:50:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10214,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8098:50:28"
|
|
},
|
|
{
|
|
"assignments": [
|
|
10216
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 10216,
|
|
"mutability": "mutable",
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10349,
|
|
"src": "8158:21:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10215,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8158:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 10224,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10222,
|
|
"name": "mtFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10184,
|
|
"src": "8208:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10219,
|
|
"name": "lpFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10182,
|
|
"src": "8193:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10217,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10177,
|
|
"src": "8182:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10218,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11582,
|
|
"src": "8182:10:28",
|
|
"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": 10220,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8182:21:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10221,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11582,
|
|
"src": "8182:25:28",
|
|
"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": 10223,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8182:36:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "8158:60:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 10229,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10225,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "8233:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10226,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "8247:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10227,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "8247:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10228,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "8247:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "8233:31:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 10248,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10244,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "8436:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10245,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "8450:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10246,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "8450:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10247,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ABOVE_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "8450:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "8436:37:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 10268,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10264,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "8663:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10265,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "8677:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10266,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "8677:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10267,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "BELOW_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "8677:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "8663:37:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 10338,
|
|
"nodeType": "IfStatement",
|
|
"src": "8659:1161:28",
|
|
"trueBody": {
|
|
"id": 10337,
|
|
"nodeType": "Block",
|
|
"src": "8702:1118:28",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
10270
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 10270,
|
|
"mutability": "mutable",
|
|
"name": "backToOnePayQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10337,
|
|
"src": "8716:25:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10269,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8716:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 10275,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10273,
|
|
"name": "_QUOTE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9467,
|
|
"src": "8763:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10271,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10188,
|
|
"src": "8744:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10272,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "8744:18:28",
|
|
"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": 10274,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8744:35:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "8716:63:28"
|
|
},
|
|
{
|
|
"assignments": [
|
|
10277
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 10277,
|
|
"mutability": "mutable",
|
|
"name": "backToOneReceiveBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10337,
|
|
"src": "8793:28:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10276,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8793:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 10282,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10280,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10190,
|
|
"src": "8843:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10278,
|
|
"name": "_BASE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9465,
|
|
"src": "8824:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10279,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "8824:18:28",
|
|
"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": 10281,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8824:33:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "8793:64:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 10285,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10283,
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10216,
|
|
"src": "8951:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10284,
|
|
"name": "backToOneReceiveBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10277,
|
|
"src": "8967:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "8951:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 10303,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10301,
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10216,
|
|
"src": "9312:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10302,
|
|
"name": "backToOneReceiveBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10277,
|
|
"src": "9329:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "9312:37:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 10334,
|
|
"nodeType": "Block",
|
|
"src": "9519:291:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10326,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10315,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10180,
|
|
"src": "9596:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10321,
|
|
"name": "backToOneReceiveBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10277,
|
|
"src": "9686:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10319,
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10216,
|
|
"src": "9668:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10320,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "9668:17:28",
|
|
"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": 10322,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9668:39:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10323,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10190,
|
|
"src": "9709:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10318,
|
|
"name": "_ROneBuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8457,
|
|
"src": "9650:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10324,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9650:73:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10316,
|
|
"name": "backToOnePayQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10270,
|
|
"src": "9607:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10317,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11582,
|
|
"src": "9607:21:28",
|
|
"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": 10325,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9607:134:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "9596:145:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10327,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9596:145:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10332,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10328,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10186,
|
|
"src": "9759:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10329,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "9772:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10330,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "9772:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10331,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ABOVE_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "9772:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "9759:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10333,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9759:36:28"
|
|
}
|
|
]
|
|
},
|
|
"id": 10335,
|
|
"nodeType": "IfStatement",
|
|
"src": "9308:502:28",
|
|
"trueBody": {
|
|
"id": 10314,
|
|
"nodeType": "Block",
|
|
"src": "9351:162:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10306,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10304,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10180,
|
|
"src": "9422:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10305,
|
|
"name": "backToOnePayQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10270,
|
|
"src": "9433:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "9422:28:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10307,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9422:28:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10312,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10308,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10186,
|
|
"src": "9468:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10309,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "9481:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10310,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "9481:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10311,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "9481:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "9468:30:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10313,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9468:30:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 10336,
|
|
"nodeType": "IfStatement",
|
|
"src": "8947:863:28",
|
|
"trueBody": {
|
|
"id": 10300,
|
|
"nodeType": "Block",
|
|
"src": "8989:313:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10292,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10286,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10180,
|
|
"src": "9155:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10288,
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10216,
|
|
"src": "9186:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10289,
|
|
"name": "_QUOTE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9467,
|
|
"src": "9201:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10290,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10188,
|
|
"src": "9218:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10287,
|
|
"name": "_RBelowBuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8531,
|
|
"src": "9166:19:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10291,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9166:67:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "9155:78:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10293,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9155:78:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10298,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10294,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10186,
|
|
"src": "9251:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10295,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "9264:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10296,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "9264:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10297,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "BELOW_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "9264:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "9251:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10299,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9251:36:28"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 10339,
|
|
"nodeType": "IfStatement",
|
|
"src": "8432:1388:28",
|
|
"trueBody": {
|
|
"id": 10263,
|
|
"nodeType": "Block",
|
|
"src": "8475:178:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10255,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10249,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10180,
|
|
"src": "8516:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10251,
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10216,
|
|
"src": "8547:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10252,
|
|
"name": "_BASE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9465,
|
|
"src": "8562:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10253,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10190,
|
|
"src": "8578:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10250,
|
|
"name": "_RAboveBuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8603,
|
|
"src": "8527:19:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10254,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8527:65:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "8516:76:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10256,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8516:76:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10261,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10257,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10186,
|
|
"src": "8606:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10258,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "8619:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10259,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "8619:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10260,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ABOVE_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "8619:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "8606:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10262,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8606:36:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 10340,
|
|
"nodeType": "IfStatement",
|
|
"src": "8229:1591:28",
|
|
"trueBody": {
|
|
"id": 10243,
|
|
"nodeType": "Block",
|
|
"src": "8266:160:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10235,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10230,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10180,
|
|
"src": "8307:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10232,
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10216,
|
|
"src": "8336:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10233,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10190,
|
|
"src": "8351:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10231,
|
|
"name": "_ROneBuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8457,
|
|
"src": "8318:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10234,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8318:47:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "8307:58:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10236,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8307:58:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10241,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10237,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10186,
|
|
"src": "8379:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10238,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "8392:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10239,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "8392:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10240,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ABOVE_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "8392:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "8379:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10242,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8379:36:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10341,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10180,
|
|
"src": "9838:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10342,
|
|
"name": "lpFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10182,
|
|
"src": "9848:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10343,
|
|
"name": "mtFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10184,
|
|
"src": "9859:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10344,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10186,
|
|
"src": "9870:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10345,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10188,
|
|
"src": "9882:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10346,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10190,
|
|
"src": "9898:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 10347,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "9837:75:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"functionReturnParameters": 10191,
|
|
"id": 10348,
|
|
"nodeType": "Return",
|
|
"src": "9830:82:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 10350,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_queryBuyBaseToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 10178,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 10177,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7639:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10176,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7639:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7638:16:28"
|
|
},
|
|
"returnParameters": {
|
|
"id": 10191,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 10180,
|
|
"mutability": "mutable",
|
|
"name": "payQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7715:16:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10179,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7715:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10182,
|
|
"mutability": "mutable",
|
|
"name": "lpFeeBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7745:17:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10181,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7745:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10184,
|
|
"mutability": "mutable",
|
|
"name": "mtFeeBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7776:17:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10183,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7776:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10186,
|
|
"mutability": "mutable",
|
|
"name": "newRStatus",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7807:24:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 10185,
|
|
"name": "Types.RStatus",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11630,
|
|
"src": "7807:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10188,
|
|
"mutability": "mutable",
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7845:22:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10187,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7845:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10190,
|
|
"mutability": "mutable",
|
|
"name": "newBaseTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7881:21:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10189,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7881:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7701:211:28"
|
|
},
|
|
"scope": 10351,
|
|
"src": "7611:2308:28",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 10352,
|
|
"src": "547:9374:28"
|
|
}
|
|
],
|
|
"src": "78:9844:28"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Trader.sol",
|
|
"exportedSymbols": {
|
|
"Trader": [
|
|
10351
|
|
]
|
|
},
|
|
"id": 10352,
|
|
"license": "Apache-2.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 9615,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".9"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "78:22:28"
|
|
},
|
|
{
|
|
"id": 9616,
|
|
"literals": [
|
|
"experimental",
|
|
"ABIEncoderV2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "101:33:28"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol",
|
|
"file": "../lib/SafeMath.sol",
|
|
"id": 9618,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 11624,
|
|
"src": "136:45:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9617,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "144:8:28",
|
|
"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": 9620,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 11079,
|
|
"src": "182:51:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9619,
|
|
"name": "DecimalMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "190:11:28",
|
|
"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": 9622,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 11632,
|
|
"src": "234:39:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9621,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "242:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IDODOCallee.sol",
|
|
"file": "../intf/IDODOCallee.sol",
|
|
"id": 9624,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 10507,
|
|
"src": "274:52:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9623,
|
|
"name": "IDODOCallee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "282:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Storage.sol",
|
|
"file": "./Storage.sol",
|
|
"id": 9626,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 9614,
|
|
"src": "327:38:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9625,
|
|
"name": "Storage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "335:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Pricing.sol",
|
|
"file": "./Pricing.sol",
|
|
"id": 9628,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 8854,
|
|
"src": "366:38:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9627,
|
|
"name": "Pricing",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "374:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/impl/Settlement.sol",
|
|
"file": "./Settlement.sol",
|
|
"id": 9630,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 10352,
|
|
"sourceUnit": 9397,
|
|
"src": "405:44:28",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 9629,
|
|
"name": "Settlement",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "413:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 9632,
|
|
"name": "Storage",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 9613,
|
|
"src": "566:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Storage_$9613",
|
|
"typeString": "contract Storage"
|
|
}
|
|
},
|
|
"id": 9633,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "566:7:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 9634,
|
|
"name": "Pricing",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 8853,
|
|
"src": "575:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Pricing_$8853",
|
|
"typeString": "contract Pricing"
|
|
}
|
|
},
|
|
"id": 9635,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "575:7:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 9636,
|
|
"name": "Settlement",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 9396,
|
|
"src": "584:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Settlement_$9396",
|
|
"typeString": "contract Settlement"
|
|
}
|
|
},
|
|
"id": 9637,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "584:10:28"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
8853,
|
|
9396,
|
|
9613,
|
|
11166,
|
|
11296
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 9631,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "452:94:28",
|
|
"text": " @title Trader\n @author DODO Breeder\n @notice Functions for trader operations"
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 10351,
|
|
"linearizedBaseContracts": [
|
|
10351,
|
|
9396,
|
|
8853,
|
|
9613,
|
|
11296,
|
|
11166
|
|
],
|
|
"name": "Trader",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 9640,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 9638,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11623,
|
|
"src": "607:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$11623",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "601:27:28",
|
|
"typeName": {
|
|
"id": 9639,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "620:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 9648,
|
|
"name": "SellBaseToken",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 9647,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9642,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "seller",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9648,
|
|
"src": "695:22:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 9641,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "695:7:28",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9644,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "payBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9648,
|
|
"src": "719:15:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9643,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "719:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9646,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "receiveQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9648,
|
|
"src": "736:20:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9645,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "736:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "694:63:28"
|
|
},
|
|
"src": "675:83:28"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 9656,
|
|
"name": "BuyBaseToken",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 9655,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9650,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "buyer",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9656,
|
|
"src": "783:21:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 9649,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "783:7:28",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9652,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "receiveBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9656,
|
|
"src": "806:19:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9651,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "806:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9654,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "payQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9656,
|
|
"src": "827:16:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9653,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "827:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "782:62:28"
|
|
},
|
|
"src": "764:81:28"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 9664,
|
|
"name": "ChargeMaintainerFee",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 9663,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9658,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "maintainer",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9664,
|
|
"src": "877:26:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 9657,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "877:7:28",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9660,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "isBaseToken",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9664,
|
|
"src": "905:16:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 9659,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "905:4:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9662,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9664,
|
|
"src": "923:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9661,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "923:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "876:62:28"
|
|
},
|
|
"src": "851:88:28"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9672,
|
|
"nodeType": "Block",
|
|
"src": "1013:73:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9667,
|
|
"name": "_TRADE_ALLOWED_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9431,
|
|
"src": "1031:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "54524144455f4e4f545f414c4c4f574544",
|
|
"id": 9668,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1048:19:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_a276537e38920b1f77c7c8c2b082f9b84306b71be306551ec925c75ea3b72343",
|
|
"typeString": "literal_string \"TRADE_NOT_ALLOWED\""
|
|
},
|
|
"value": "TRADE_NOT_ALLOWED"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_a276537e38920b1f77c7c8c2b082f9b84306b71be306551ec925c75ea3b72343",
|
|
"typeString": "literal_string \"TRADE_NOT_ALLOWED\""
|
|
}
|
|
],
|
|
"id": 9666,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1023:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 9669,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1023:45:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9670,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1023:45:28"
|
|
},
|
|
{
|
|
"id": 9671,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1078:1:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 9673,
|
|
"name": "tradeAllowed",
|
|
"nodeType": "ModifierDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9665,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1010:2:28"
|
|
},
|
|
"src": "989:97:28",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9681,
|
|
"nodeType": "Block",
|
|
"src": "1117:75:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9676,
|
|
"name": "_BUYING_ALLOWED_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9435,
|
|
"src": "1135:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "425559494e475f4e4f545f414c4c4f574544",
|
|
"id": 9677,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1153:20:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_ff4b067ea4e78a07e9f2c42853847fde0a109fa713bbb658dd5e72956cfe0087",
|
|
"typeString": "literal_string \"BUYING_NOT_ALLOWED\""
|
|
},
|
|
"value": "BUYING_NOT_ALLOWED"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_ff4b067ea4e78a07e9f2c42853847fde0a109fa713bbb658dd5e72956cfe0087",
|
|
"typeString": "literal_string \"BUYING_NOT_ALLOWED\""
|
|
}
|
|
],
|
|
"id": 9675,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1127:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 9678,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1127:47:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9679,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1127:47:28"
|
|
},
|
|
{
|
|
"id": 9680,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1184:1:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 9682,
|
|
"name": "buyingAllowed",
|
|
"nodeType": "ModifierDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9674,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1114:2:28"
|
|
},
|
|
"src": "1092:100:28",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9690,
|
|
"nodeType": "Block",
|
|
"src": "1224:77:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9685,
|
|
"name": "_SELLING_ALLOWED_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9437,
|
|
"src": "1242:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "53454c4c494e475f4e4f545f414c4c4f574544",
|
|
"id": 9686,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1261:21:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_b9cedf648d013202fd3dfb14738c5dd5367278e047930dbbeecece1d175ffa5e",
|
|
"typeString": "literal_string \"SELLING_NOT_ALLOWED\""
|
|
},
|
|
"value": "SELLING_NOT_ALLOWED"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_b9cedf648d013202fd3dfb14738c5dd5367278e047930dbbeecece1d175ffa5e",
|
|
"typeString": "literal_string \"SELLING_NOT_ALLOWED\""
|
|
}
|
|
],
|
|
"id": 9684,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1234:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 9687,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1234:49:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9688,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1234:49:28"
|
|
},
|
|
{
|
|
"id": 9689,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1293:1:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 9691,
|
|
"name": "sellingAllowed",
|
|
"nodeType": "ModifierDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9683,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1221:2:28"
|
|
},
|
|
"src": "1198:103:28",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9702,
|
|
"nodeType": "Block",
|
|
"src": "1332:89:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9697,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9694,
|
|
"name": "tx",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -26,
|
|
"src": "1350:2:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_transaction",
|
|
"typeString": "tx"
|
|
}
|
|
},
|
|
"id": 9695,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "gasprice",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1350:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9696,
|
|
"name": "_GAS_PRICE_LIMIT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9433,
|
|
"src": "1365:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1350:32:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4741535f50524943455f455843454544",
|
|
"id": 9698,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1384:18:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_f9e898838c870676efb9b2b0592d10219d9697c9d6edfa0e8e8f1d32ed503a32",
|
|
"typeString": "literal_string \"GAS_PRICE_EXCEED\""
|
|
},
|
|
"value": "GAS_PRICE_EXCEED"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_f9e898838c870676efb9b2b0592d10219d9697c9d6edfa0e8e8f1d32ed503a32",
|
|
"typeString": "literal_string \"GAS_PRICE_EXCEED\""
|
|
}
|
|
],
|
|
"id": 9693,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1342:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 9699,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1342:61:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9700,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1342:61:28"
|
|
},
|
|
{
|
|
"id": 9701,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1413:1:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 9703,
|
|
"name": "gasPriceLimit",
|
|
"nodeType": "ModifierDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9692,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1329:2:28"
|
|
},
|
|
"src": "1307:114:28",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9830,
|
|
"nodeType": "Block",
|
|
"src": "1678:1298:28",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
9723,
|
|
9725,
|
|
9727,
|
|
9729,
|
|
9731,
|
|
9733
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 9723,
|
|
"mutability": "mutable",
|
|
"name": "receiveQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9830,
|
|
"src": "1725:20:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9722,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1725:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9725,
|
|
"mutability": "mutable",
|
|
"name": "lpFeeQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9830,
|
|
"src": "1759:18:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9724,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1759:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9727,
|
|
"mutability": "mutable",
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9830,
|
|
"src": "1791:18:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9726,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1791:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9729,
|
|
"mutability": "mutable",
|
|
"name": "newRStatus",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9830,
|
|
"src": "1823:24:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 9728,
|
|
"name": "Types.RStatus",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11630,
|
|
"src": "1823:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9731,
|
|
"mutability": "mutable",
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9830,
|
|
"src": "1861:22:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9730,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1861:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9733,
|
|
"mutability": "mutable",
|
|
"name": "newBaseTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9830,
|
|
"src": "1897:21:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9732,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1897:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 9737,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9735,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9705,
|
|
"src": "1951:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9734,
|
|
"name": "_querySellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10175,
|
|
"src": "1931:19:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 9736,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1931:27:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1711:247:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9741,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9739,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9723,
|
|
"src": "1976:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9740,
|
|
"name": "minReceiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9707,
|
|
"src": "1992:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1976:31:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "53454c4c5f424153455f524543454956455f4e4f545f454e4f554748",
|
|
"id": 9742,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2009:30:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_e2576acc4b00a6068878bb264a3736551706bb27baf7a460c6372cbcdfae4018",
|
|
"typeString": "literal_string \"SELL_BASE_RECEIVE_NOT_ENOUGH\""
|
|
},
|
|
"value": "SELL_BASE_RECEIVE_NOT_ENOUGH"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_e2576acc4b00a6068878bb264a3736551706bb27baf7a460c6372cbcdfae4018",
|
|
"typeString": "literal_string \"SELL_BASE_RECEIVE_NOT_ENOUGH\""
|
|
}
|
|
],
|
|
"id": 9738,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1968:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 9743,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1968:72:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9744,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1968:72:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9746,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2099:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9747,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2099:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9748,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9723,
|
|
"src": "2111:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9745,
|
|
"name": "_quoteTokenTransferOut",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9013,
|
|
"src": "2076:22:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 9749,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2076:48:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9750,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2076:48:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9754,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9751,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9709,
|
|
"src": "2138:4:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes calldata"
|
|
}
|
|
},
|
|
"id": 9752,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2138:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 9753,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2152:1:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2138:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9767,
|
|
"nodeType": "IfStatement",
|
|
"src": "2134:113:28",
|
|
"trueBody": {
|
|
"id": 9766,
|
|
"nodeType": "Block",
|
|
"src": "2155:92:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "66616c7365",
|
|
"id": 9760,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2202:5:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "false"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9761,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9705,
|
|
"src": "2209:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9762,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9723,
|
|
"src": "2217:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9763,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9709,
|
|
"src": "2231:4:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes calldata"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes calldata"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9756,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2181:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9757,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2181:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 9755,
|
|
"name": "IDODOCallee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10506,
|
|
"src": "2169:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IDODOCallee_$10506_$",
|
|
"typeString": "type(contract IDODOCallee)"
|
|
}
|
|
},
|
|
"id": 9758,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2169:23:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IDODOCallee_$10506",
|
|
"typeString": "contract IDODOCallee"
|
|
}
|
|
},
|
|
"id": 9759,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "dodoCall",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 10505,
|
|
"src": "2169:32:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_bool_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,uint256,uint256,bytes memory) external"
|
|
}
|
|
},
|
|
"id": 9764,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2169:67:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9765,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2169:67:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9769,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2277:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9770,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2277:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9771,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9705,
|
|
"src": "2289:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9768,
|
|
"name": "_baseTokenTransferIn",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8930,
|
|
"src": "2256:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 9772,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2256:40:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9773,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2256:40:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9776,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9774,
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9727,
|
|
"src": "2310:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 9775,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2324:1:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2310:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9789,
|
|
"nodeType": "IfStatement",
|
|
"src": "2306:165:28",
|
|
"trueBody": {
|
|
"id": 9788,
|
|
"nodeType": "Block",
|
|
"src": "2327:144:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9778,
|
|
"name": "_MAINTAINER_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9445,
|
|
"src": "2364:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9779,
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9727,
|
|
"src": "2378:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9777,
|
|
"name": "_quoteTokenTransferOut",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9013,
|
|
"src": "2341:22:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 9780,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2341:48:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9781,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2341:48:28"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9783,
|
|
"name": "_MAINTAINER_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9445,
|
|
"src": "2428:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "66616c7365",
|
|
"id": 9784,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2442:5:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "false"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9785,
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9727,
|
|
"src": "2449:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9782,
|
|
"name": "ChargeMaintainerFee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9664,
|
|
"src": "2408:19:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,bool,uint256)"
|
|
}
|
|
},
|
|
"id": 9786,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2408:52:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9787,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2403:57:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9792,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9790,
|
|
"name": "_TARGET_QUOTE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9463,
|
|
"src": "2510:27:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9791,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9731,
|
|
"src": "2541:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2510:45:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9798,
|
|
"nodeType": "IfStatement",
|
|
"src": "2506:120:28",
|
|
"trueBody": {
|
|
"id": 9797,
|
|
"nodeType": "Block",
|
|
"src": "2557:69:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9795,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9793,
|
|
"name": "_TARGET_QUOTE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9463,
|
|
"src": "2571:27:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9794,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9731,
|
|
"src": "2601:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2571:44:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 9796,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2571:44:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9801,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9799,
|
|
"name": "_TARGET_BASE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9461,
|
|
"src": "2639:26:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9800,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9733,
|
|
"src": "2669:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2639:43:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9807,
|
|
"nodeType": "IfStatement",
|
|
"src": "2635:116:28",
|
|
"trueBody": {
|
|
"id": 9806,
|
|
"nodeType": "Block",
|
|
"src": "2684:67:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9804,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9802,
|
|
"name": "_TARGET_BASE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9461,
|
|
"src": "2698:26:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9803,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9733,
|
|
"src": "2727:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2698:42:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 9805,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2698:42:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 9810,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9808,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "2764:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9809,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9729,
|
|
"src": "2778:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "2764:24:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9816,
|
|
"nodeType": "IfStatement",
|
|
"src": "2760:78:28",
|
|
"trueBody": {
|
|
"id": 9815,
|
|
"nodeType": "Block",
|
|
"src": "2790:48:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9813,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9811,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "2804:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9812,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9729,
|
|
"src": "2817:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "2804:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 9814,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2804:23:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9818,
|
|
"name": "lpFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9725,
|
|
"src": "2866:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9817,
|
|
"name": "_donateQuoteToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9049,
|
|
"src": "2848:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 9819,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2848:29:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9820,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2848:29:28"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9822,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2906:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9823,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2906:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9824,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9705,
|
|
"src": "2918:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9825,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9723,
|
|
"src": "2926:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9821,
|
|
"name": "SellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9648,
|
|
"src": "2892:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 9826,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2892:47:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9827,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2887:52:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9828,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9723,
|
|
"src": "2957:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 9721,
|
|
"id": 9829,
|
|
"nodeType": "Return",
|
|
"src": "2950:19:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "8dae7333",
|
|
"id": 9831,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 9712,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9711,
|
|
"name": "tradeAllowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9673,
|
|
"src": "1601:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1601:12:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"id": 9714,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9713,
|
|
"name": "sellingAllowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9691,
|
|
"src": "1614:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1614:14:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"id": 9716,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9715,
|
|
"name": "gasPriceLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9703,
|
|
"src": "1629:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1629:13:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"id": 9718,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9717,
|
|
"name": "preventReentrant",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11295,
|
|
"src": "1643:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1643:16:28"
|
|
}
|
|
],
|
|
"name": "sellBaseToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9710,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9705,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9831,
|
|
"src": "1509:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9704,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1509:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9707,
|
|
"mutability": "mutable",
|
|
"name": "minReceiveQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9831,
|
|
"src": "1533:23:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9706,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1533:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9709,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9831,
|
|
"src": "1566:19:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "calldata",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 9708,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1566:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1499:92:28"
|
|
},
|
|
"returnParameters": {
|
|
"id": 9721,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9720,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9831,
|
|
"src": "1669:7:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9719,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1669:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1668:9:28"
|
|
},
|
|
"scope": 10351,
|
|
"src": "1477:1499:28",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9958,
|
|
"nodeType": "Block",
|
|
"src": "3177:1252:28",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
9851,
|
|
9853,
|
|
9855,
|
|
9857,
|
|
9859,
|
|
9861
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 9851,
|
|
"mutability": "mutable",
|
|
"name": "payQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9958,
|
|
"src": "3224:16:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9850,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3224:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9853,
|
|
"mutability": "mutable",
|
|
"name": "lpFeeBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9958,
|
|
"src": "3254:17:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9852,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3254:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9855,
|
|
"mutability": "mutable",
|
|
"name": "mtFeeBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9958,
|
|
"src": "3285:17:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9854,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3285:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9857,
|
|
"mutability": "mutable",
|
|
"name": "newRStatus",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9958,
|
|
"src": "3316:24:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 9856,
|
|
"name": "Types.RStatus",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11630,
|
|
"src": "3316:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9859,
|
|
"mutability": "mutable",
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9958,
|
|
"src": "3354:22:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9858,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3354:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9861,
|
|
"mutability": "mutable",
|
|
"name": "newBaseTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9958,
|
|
"src": "3390:21:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9860,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3390:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 9865,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9863,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9833,
|
|
"src": "3443:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9862,
|
|
"name": "_queryBuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10350,
|
|
"src": "3424:18:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 9864,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3424:26:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3210:240:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9869,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9867,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9851,
|
|
"src": "3468:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9868,
|
|
"name": "maxPayQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9835,
|
|
"src": "3480:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3468:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4255595f424153455f434f53545f544f4f5f4d554348",
|
|
"id": 9870,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3493:24:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_f0ac5b3c32d4064b3751261129f0fefc22b7826ab110012bdbce29191898a75a",
|
|
"typeString": "literal_string \"BUY_BASE_COST_TOO_MUCH\""
|
|
},
|
|
"value": "BUY_BASE_COST_TOO_MUCH"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_f0ac5b3c32d4064b3751261129f0fefc22b7826ab110012bdbce29191898a75a",
|
|
"typeString": "literal_string \"BUY_BASE_COST_TOO_MUCH\""
|
|
}
|
|
],
|
|
"id": 9866,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "3460:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 9871,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3460:58:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9872,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3460:58:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9874,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3576:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9875,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3576:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9876,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9833,
|
|
"src": "3588:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9873,
|
|
"name": "_baseTokenTransferOut",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8990,
|
|
"src": "3554:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 9877,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3554:41:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9878,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3554:41:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9882,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9879,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9837,
|
|
"src": "3609:4:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes calldata"
|
|
}
|
|
},
|
|
"id": 9880,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3609:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 9881,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3623:1:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "3609:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9895,
|
|
"nodeType": "IfStatement",
|
|
"src": "3605:108:28",
|
|
"trueBody": {
|
|
"id": 9894,
|
|
"nodeType": "Block",
|
|
"src": "3626:87:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 9888,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3673:4:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9889,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9833,
|
|
"src": "3679:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9890,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9851,
|
|
"src": "3687:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9891,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9837,
|
|
"src": "3697:4:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes calldata"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes calldata"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9884,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3652:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9885,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3652:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 9883,
|
|
"name": "IDODOCallee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10506,
|
|
"src": "3640:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IDODOCallee_$10506_$",
|
|
"typeString": "type(contract IDODOCallee)"
|
|
}
|
|
},
|
|
"id": 9886,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3640:23:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IDODOCallee_$10506",
|
|
"typeString": "contract IDODOCallee"
|
|
}
|
|
},
|
|
"id": 9887,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "dodoCall",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 10505,
|
|
"src": "3640:32:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_bool_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,uint256,uint256,bytes memory) external"
|
|
}
|
|
},
|
|
"id": 9892,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3640:62:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9893,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3640:62:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9897,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3744:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9898,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3744:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9899,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9851,
|
|
"src": "3756:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9896,
|
|
"name": "_quoteTokenTransferIn",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8967,
|
|
"src": "3722:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 9900,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3722:43:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9901,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3722:43:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9904,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9902,
|
|
"name": "mtFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9855,
|
|
"src": "3779:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 9903,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3792:1:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "3779:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9917,
|
|
"nodeType": "IfStatement",
|
|
"src": "3775:160:28",
|
|
"trueBody": {
|
|
"id": 9916,
|
|
"nodeType": "Block",
|
|
"src": "3795:140:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9906,
|
|
"name": "_MAINTAINER_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9445,
|
|
"src": "3831:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9907,
|
|
"name": "mtFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9855,
|
|
"src": "3845:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9905,
|
|
"name": "_baseTokenTransferOut",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8990,
|
|
"src": "3809:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 9908,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3809:46:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9909,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3809:46:28"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9911,
|
|
"name": "_MAINTAINER_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9445,
|
|
"src": "3894:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 9912,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3908:4:28",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9913,
|
|
"name": "mtFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9855,
|
|
"src": "3914:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9910,
|
|
"name": "ChargeMaintainerFee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9664,
|
|
"src": "3874:19:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,bool,uint256)"
|
|
}
|
|
},
|
|
"id": 9914,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3874:50:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9915,
|
|
"nodeType": "EmitStatement",
|
|
"src": "3869:55:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9920,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9918,
|
|
"name": "_TARGET_QUOTE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9463,
|
|
"src": "3974:27:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9919,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9859,
|
|
"src": "4005:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3974:45:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9926,
|
|
"nodeType": "IfStatement",
|
|
"src": "3970:120:28",
|
|
"trueBody": {
|
|
"id": 9925,
|
|
"nodeType": "Block",
|
|
"src": "4021:69:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9923,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9921,
|
|
"name": "_TARGET_QUOTE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9463,
|
|
"src": "4035:27:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9922,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9859,
|
|
"src": "4065:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4035:44:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 9924,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4035:44:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 9929,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9927,
|
|
"name": "_TARGET_BASE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9461,
|
|
"src": "4103:26:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9928,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9861,
|
|
"src": "4133:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4103:43:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9935,
|
|
"nodeType": "IfStatement",
|
|
"src": "4099:116:28",
|
|
"trueBody": {
|
|
"id": 9934,
|
|
"nodeType": "Block",
|
|
"src": "4148:67:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9932,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9930,
|
|
"name": "_TARGET_BASE_TOKEN_AMOUNT_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9461,
|
|
"src": "4162:26:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9931,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9861,
|
|
"src": "4191:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4162:42:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 9933,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4162:42:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 9938,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9936,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "4228:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 9937,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9857,
|
|
"src": "4242:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "4228:24:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 9944,
|
|
"nodeType": "IfStatement",
|
|
"src": "4224:78:28",
|
|
"trueBody": {
|
|
"id": 9943,
|
|
"nodeType": "Block",
|
|
"src": "4254:48:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9941,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9939,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "4268:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 9940,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9857,
|
|
"src": "4281:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "4268:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 9942,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4268:23:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9946,
|
|
"name": "lpFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9853,
|
|
"src": "4329:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9945,
|
|
"name": "_donateBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9031,
|
|
"src": "4312:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 9947,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4312:27:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9948,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4312:27:28"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9950,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "4367:3:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 9951,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4367:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9952,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9833,
|
|
"src": "4379:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9953,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9851,
|
|
"src": "4387:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9949,
|
|
"name": "BuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9656,
|
|
"src": "4354:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 9954,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4354:42:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9955,
|
|
"nodeType": "EmitStatement",
|
|
"src": "4349:47:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9956,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9851,
|
|
"src": "4414:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 9849,
|
|
"id": 9957,
|
|
"nodeType": "Return",
|
|
"src": "4407:15:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "e67ce706",
|
|
"id": 9959,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 9840,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9839,
|
|
"name": "tradeAllowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9673,
|
|
"src": "3101:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "3101:12:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"id": 9842,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9841,
|
|
"name": "buyingAllowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9682,
|
|
"src": "3114:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "3114:13:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"id": 9844,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9843,
|
|
"name": "gasPriceLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9703,
|
|
"src": "3128:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "3128:13:28"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"id": 9846,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 9845,
|
|
"name": "preventReentrant",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11295,
|
|
"src": "3142:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "3142:16:28"
|
|
}
|
|
],
|
|
"name": "buyBaseToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9838,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9833,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9959,
|
|
"src": "3013:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9832,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3013:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9835,
|
|
"mutability": "mutable",
|
|
"name": "maxPayQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9959,
|
|
"src": "3037:19:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9834,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3037:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 9837,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9959,
|
|
"src": "3066:19:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "calldata",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_calldata_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 9836,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3066:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3003:88:28"
|
|
},
|
|
"returnParameters": {
|
|
"id": 9849,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9848,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9959,
|
|
"src": "3168:7:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9847,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3168:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3167:9:28"
|
|
},
|
|
"scope": 10351,
|
|
"src": "2982:1447:28",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9975,
|
|
"nodeType": "Block",
|
|
"src": "4574:100:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9971,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9966,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9964,
|
|
"src": "4585:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null
|
|
],
|
|
"id": 9967,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "TupleExpression",
|
|
"src": "4584:24:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$__$__$__$__$__$",
|
|
"typeString": "tuple(uint256,,,,,)"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9969,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9961,
|
|
"src": "4631:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9968,
|
|
"name": "_querySellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10175,
|
|
"src": "4611:19:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 9970,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4611:27:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"src": "4584:54:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9972,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4584:54:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9973,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9964,
|
|
"src": "4655:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 9965,
|
|
"id": 9974,
|
|
"nodeType": "Return",
|
|
"src": "4648:19:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "a2801e16",
|
|
"id": 9976,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "querySellBaseToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9962,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9961,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9976,
|
|
"src": "4513:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9960,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4513:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4512:16:28"
|
|
},
|
|
"returnParameters": {
|
|
"id": 9965,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9964,
|
|
"mutability": "mutable",
|
|
"name": "receiveQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9976,
|
|
"src": "4552:20:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9963,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4552:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4551:22:28"
|
|
},
|
|
"scope": 10351,
|
|
"src": "4485:189:28",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 9992,
|
|
"nodeType": "Block",
|
|
"src": "4764:91:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9988,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9983,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9981,
|
|
"src": "4775:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null
|
|
],
|
|
"id": 9984,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "TupleExpression",
|
|
"src": "4774:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$__$__$__$__$__$",
|
|
"typeString": "tuple(uint256,,,,,)"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 9986,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9978,
|
|
"src": "4816:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 9985,
|
|
"name": "_queryBuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10350,
|
|
"src": "4797:18:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 9987,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4797:26:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"src": "4774:49:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 9989,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4774:49:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 9990,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9981,
|
|
"src": "4840:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 9982,
|
|
"id": 9991,
|
|
"nodeType": "Return",
|
|
"src": "4833:15:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "18c0bbe4",
|
|
"id": 9993,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "queryBuyBaseToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9979,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9978,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9993,
|
|
"src": "4707:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9977,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4707:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4706:16:28"
|
|
},
|
|
"returnParameters": {
|
|
"id": 9982,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9981,
|
|
"mutability": "mutable",
|
|
"name": "payQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 9993,
|
|
"src": "4746:16:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9980,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4746:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4745:18:28"
|
|
},
|
|
"scope": 10351,
|
|
"src": "4680:175:28",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 10174,
|
|
"nodeType": "Block",
|
|
"src": "5174:2431:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10015,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10010,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10008,
|
|
"src": "5185:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10011,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10006,
|
|
"src": "5200:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 10012,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "TupleExpression",
|
|
"src": "5184:31:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256)"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 10013,
|
|
"name": "getExpectedTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8733,
|
|
"src": "5218:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function () view returns (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 10014,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5218:19:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256)"
|
|
}
|
|
},
|
|
"src": "5184:53:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 10016,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5184:53:28"
|
|
},
|
|
{
|
|
"assignments": [
|
|
10018
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 10018,
|
|
"mutability": "mutable",
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10174,
|
|
"src": "5248:22:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10017,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5248:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 10020,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"id": 10019,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9995,
|
|
"src": "5273:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "5248:31:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 10025,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10021,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "5294:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10022,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "5308:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10023,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "5308:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10024,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "5308:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "5294:31:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 10044,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10040,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "5537:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10041,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "5551:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10042,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "5551:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10043,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ABOVE_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "5551:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "5537:37:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 10137,
|
|
"nodeType": "Block",
|
|
"src": "7035:239:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10129,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10123,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "7129:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10125,
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10018,
|
|
"src": "7165:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10126,
|
|
"name": "_QUOTE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9467,
|
|
"src": "7181:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10127,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10006,
|
|
"src": "7198:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10124,
|
|
"name": "_RBelowSellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8494,
|
|
"src": "7144:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10128,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7144:69:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7129:84:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10130,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7129:84:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10135,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10131,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10004,
|
|
"src": "7227:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10132,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "7240:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10133,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "7240:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10134,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "BELOW_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "7240:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "7227:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10136,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7227:36:28"
|
|
}
|
|
]
|
|
},
|
|
"id": 10138,
|
|
"nodeType": "IfStatement",
|
|
"src": "5533:1741:28",
|
|
"trueBody": {
|
|
"id": 10122,
|
|
"nodeType": "Block",
|
|
"src": "5576:1453:28",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
10046
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 10046,
|
|
"mutability": "mutable",
|
|
"name": "backToOnePayBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10122,
|
|
"src": "5590:24:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10045,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5590:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 10051,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10049,
|
|
"name": "_BASE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9465,
|
|
"src": "5635:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10047,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10008,
|
|
"src": "5617:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10048,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "5617:17:28",
|
|
"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": 10050,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5617:33:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "5590:60:28"
|
|
},
|
|
{
|
|
"assignments": [
|
|
10053
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 10053,
|
|
"mutability": "mutable",
|
|
"name": "backToOneReceiveQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10122,
|
|
"src": "5664:29:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10052,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5664:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 10058,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10056,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10006,
|
|
"src": "5716:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10054,
|
|
"name": "_QUOTE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9467,
|
|
"src": "5696:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10055,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "5696:19:28",
|
|
"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": 10057,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5696:35:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "5664:67:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 10061,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10059,
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10018,
|
|
"src": "5840:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10060,
|
|
"name": "backToOnePayBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10046,
|
|
"src": "5857:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5840:33:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 10088,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10086,
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10018,
|
|
"src": "6509:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10087,
|
|
"name": "backToOnePayBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10046,
|
|
"src": "6527:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "6509:34:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 10119,
|
|
"nodeType": "Block",
|
|
"src": "6721:298:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10111,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10100,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "6798:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10106,
|
|
"name": "backToOnePayBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10046,
|
|
"src": "6898:16:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10104,
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10018,
|
|
"src": "6879:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10105,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "6879:18:28",
|
|
"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": 10107,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6879:36:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10108,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10006,
|
|
"src": "6917:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10103,
|
|
"name": "_ROneSellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8423,
|
|
"src": "6860:18:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10109,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6860:72:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10101,
|
|
"name": "backToOneReceiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10053,
|
|
"src": "6813:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10102,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11582,
|
|
"src": "6813:25:28",
|
|
"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": 10110,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6813:137:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "6798:152:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10112,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6798:152:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10117,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10113,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10004,
|
|
"src": "6968:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10114,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "6981:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10115,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "6981:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10116,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "BELOW_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "6981:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "6968:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10118,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6968:36:28"
|
|
}
|
|
]
|
|
},
|
|
"id": 10120,
|
|
"nodeType": "IfStatement",
|
|
"src": "6505:514:28",
|
|
"trueBody": {
|
|
"id": 10099,
|
|
"nodeType": "Block",
|
|
"src": "6545:170:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10091,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10089,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "6616:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10090,
|
|
"name": "backToOneReceiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10053,
|
|
"src": "6631:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "6616:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10092,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6616:36:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10097,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10093,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10004,
|
|
"src": "6670:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10094,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "6683:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10095,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "6683:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10096,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "6683:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "6670:30:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10098,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6670:30:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 10121,
|
|
"nodeType": "IfStatement",
|
|
"src": "5836:1183:28",
|
|
"trueBody": {
|
|
"id": 10085,
|
|
"nodeType": "Block",
|
|
"src": "5875:624:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10068,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10062,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "5945:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10064,
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10018,
|
|
"src": "5981:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10065,
|
|
"name": "_BASE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9465,
|
|
"src": "5997:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10066,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10008,
|
|
"src": "6013:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10063,
|
|
"name": "_RAboveSellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8628,
|
|
"src": "5960:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10067,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5960:67:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5945:82:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10069,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5945:82:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10074,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10070,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10004,
|
|
"src": "6045:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10071,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "6058:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10072,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "6058:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10073,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ABOVE_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "6058:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "6045:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10075,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6045:36:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 10078,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10076,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "6103:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10077,
|
|
"name": "backToOneReceiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10053,
|
|
"src": "6118:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "6103:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 10084,
|
|
"nodeType": "IfStatement",
|
|
"src": "6099:386:28",
|
|
"trueBody": {
|
|
"id": 10083,
|
|
"nodeType": "Block",
|
|
"src": "6141:344:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10081,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10079,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "6430:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10080,
|
|
"name": "backToOneReceiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10053,
|
|
"src": "6445:21:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "6430:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10082,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6430:36:28"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 10139,
|
|
"nodeType": "IfStatement",
|
|
"src": "5290:1984:28",
|
|
"trueBody": {
|
|
"id": 10039,
|
|
"nodeType": "Block",
|
|
"src": "5327:200:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10031,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10026,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "5401:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10028,
|
|
"name": "sellBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10018,
|
|
"src": "5435:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10029,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10006,
|
|
"src": "5451:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10027,
|
|
"name": "_ROneSellBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8423,
|
|
"src": "5416:18:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10030,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5416:50:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5401:65:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10032,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5401:65:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10037,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10033,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10004,
|
|
"src": "5480:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10034,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "5493:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10035,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "5493:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10036,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "BELOW_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "5493:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "5480:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10038,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5480:36:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10146,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10140,
|
|
"name": "lpFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10000,
|
|
"src": "7306:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10143,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "7335:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10144,
|
|
"name": "_LP_FEE_RATE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9453,
|
|
"src": "7349:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10141,
|
|
"name": "DecimalMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11078,
|
|
"src": "7319:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$",
|
|
"typeString": "type(library DecimalMath)"
|
|
}
|
|
},
|
|
"id": 10142,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11023,
|
|
"src": "7319:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10145,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7319:44:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7306:57:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10147,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7306:57:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10154,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10148,
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10002,
|
|
"src": "7373:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10151,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "7402:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10152,
|
|
"name": "_MT_FEE_RATE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9455,
|
|
"src": "7416:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10149,
|
|
"name": "DecimalMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11078,
|
|
"src": "7386:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$",
|
|
"typeString": "type(library DecimalMath)"
|
|
}
|
|
},
|
|
"id": 10150,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11023,
|
|
"src": "7386:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10153,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7386:44:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7373:57:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10155,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7373:57:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10164,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10156,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "7440:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10162,
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10002,
|
|
"src": "7488:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10159,
|
|
"name": "lpFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10000,
|
|
"src": "7472:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10157,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "7455:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10158,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "7455:16:28",
|
|
"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": 10160,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7455:28:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10161,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "7455:32:28",
|
|
"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": 10163,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7455:44:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7440:59:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10165,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7440:59:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10166,
|
|
"name": "receiveQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9998,
|
|
"src": "7518:12:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10167,
|
|
"name": "lpFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10000,
|
|
"src": "7532:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10168,
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10002,
|
|
"src": "7544:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10169,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10004,
|
|
"src": "7556:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10170,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10006,
|
|
"src": "7568:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10171,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10008,
|
|
"src": "7584:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 10172,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "7517:81:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"functionReturnParameters": 10009,
|
|
"id": 10173,
|
|
"nodeType": "Return",
|
|
"src": "7510:88:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 10175,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_querySellBaseToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 9996,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9995,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "4890:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9994,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4890:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4889:16:28"
|
|
},
|
|
"returnParameters": {
|
|
"id": 10009,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 9998,
|
|
"mutability": "mutable",
|
|
"name": "receiveQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "4966:20:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9997,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4966:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10000,
|
|
"mutability": "mutable",
|
|
"name": "lpFeeQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "5000:18:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9999,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5000:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10002,
|
|
"mutability": "mutable",
|
|
"name": "mtFeeQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "5032:18:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10001,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5032:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10004,
|
|
"mutability": "mutable",
|
|
"name": "newRStatus",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "5064:24:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 10003,
|
|
"name": "Types.RStatus",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11630,
|
|
"src": "5064:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10006,
|
|
"mutability": "mutable",
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "5102:22:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10005,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5102:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10008,
|
|
"mutability": "mutable",
|
|
"name": "newBaseTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10175,
|
|
"src": "5138:21:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10007,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5138:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4952:217:28"
|
|
},
|
|
"scope": 10351,
|
|
"src": "4861:2744:28",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 10349,
|
|
"nodeType": "Block",
|
|
"src": "7917:2002:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10197,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10192,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10190,
|
|
"src": "7928:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10193,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10188,
|
|
"src": "7943:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 10194,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "TupleExpression",
|
|
"src": "7927:31:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256)"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 10195,
|
|
"name": "getExpectedTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8733,
|
|
"src": "7961:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function () view returns (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 10196,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7961:19:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256)"
|
|
}
|
|
},
|
|
"src": "7927:53:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 10198,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7927:53:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10205,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10199,
|
|
"name": "lpFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10182,
|
|
"src": "8038:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10202,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10177,
|
|
"src": "8066:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10203,
|
|
"name": "_LP_FEE_RATE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9453,
|
|
"src": "8074:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10200,
|
|
"name": "DecimalMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11078,
|
|
"src": "8050:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$",
|
|
"typeString": "type(library DecimalMath)"
|
|
}
|
|
},
|
|
"id": 10201,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11023,
|
|
"src": "8050:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10204,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8050:38:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "8038:50:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10206,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8038:50:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10213,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10207,
|
|
"name": "mtFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10184,
|
|
"src": "8098:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10210,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10177,
|
|
"src": "8126:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10211,
|
|
"name": "_MT_FEE_RATE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9455,
|
|
"src": "8134:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10208,
|
|
"name": "DecimalMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11078,
|
|
"src": "8110:11:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_DecimalMath_$11078_$",
|
|
"typeString": "type(library DecimalMath)"
|
|
}
|
|
},
|
|
"id": 10209,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11023,
|
|
"src": "8110:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10212,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8110:38:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "8098:50:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10214,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8098:50:28"
|
|
},
|
|
{
|
|
"assignments": [
|
|
10216
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 10216,
|
|
"mutability": "mutable",
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10349,
|
|
"src": "8158:21:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10215,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8158:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 10224,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10222,
|
|
"name": "mtFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10184,
|
|
"src": "8208:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10219,
|
|
"name": "lpFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10182,
|
|
"src": "8193:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10217,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10177,
|
|
"src": "8182:6:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10218,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11582,
|
|
"src": "8182:10:28",
|
|
"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": 10220,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8182:21:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10221,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11582,
|
|
"src": "8182:25:28",
|
|
"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": 10223,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8182:36:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "8158:60:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 10229,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10225,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "8233:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10226,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "8247:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10227,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "8247:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10228,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "8247:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "8233:31:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 10248,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10244,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "8436:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10245,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "8450:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10246,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "8450:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10247,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ABOVE_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "8450:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "8436:37:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"id": 10268,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10264,
|
|
"name": "_R_STATUS_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9459,
|
|
"src": "8663:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10265,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "8677:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10266,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "8677:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10267,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "BELOW_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "8677:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "8663:37:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 10338,
|
|
"nodeType": "IfStatement",
|
|
"src": "8659:1161:28",
|
|
"trueBody": {
|
|
"id": 10337,
|
|
"nodeType": "Block",
|
|
"src": "8702:1118:28",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
10270
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 10270,
|
|
"mutability": "mutable",
|
|
"name": "backToOnePayQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10337,
|
|
"src": "8716:25:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10269,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8716:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 10275,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10273,
|
|
"name": "_QUOTE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9467,
|
|
"src": "8763:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10271,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10188,
|
|
"src": "8744:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10272,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "8744:18:28",
|
|
"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": 10274,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8744:35:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "8716:63:28"
|
|
},
|
|
{
|
|
"assignments": [
|
|
10277
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 10277,
|
|
"mutability": "mutable",
|
|
"name": "backToOneReceiveBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10337,
|
|
"src": "8793:28:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10276,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8793:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 10282,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10280,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10190,
|
|
"src": "8843:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10278,
|
|
"name": "_BASE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9465,
|
|
"src": "8824:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10279,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "8824:18:28",
|
|
"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": 10281,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8824:33:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "8793:64:28"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 10285,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10283,
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10216,
|
|
"src": "8951:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10284,
|
|
"name": "backToOneReceiveBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10277,
|
|
"src": "8967:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "8951:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 10303,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10301,
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10216,
|
|
"src": "9312:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 10302,
|
|
"name": "backToOneReceiveBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10277,
|
|
"src": "9329:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "9312:37:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 10334,
|
|
"nodeType": "Block",
|
|
"src": "9519:291:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10326,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10315,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10180,
|
|
"src": "9596:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10321,
|
|
"name": "backToOneReceiveBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10277,
|
|
"src": "9686:20:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10319,
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10216,
|
|
"src": "9668:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10320,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "9668:17:28",
|
|
"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": 10322,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9668:39:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10323,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10190,
|
|
"src": "9709:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10318,
|
|
"name": "_ROneBuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8457,
|
|
"src": "9650:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10324,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9650:73:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10316,
|
|
"name": "backToOnePayQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10270,
|
|
"src": "9607:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10317,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11582,
|
|
"src": "9607:21:28",
|
|
"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": 10325,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9607:134:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "9596:145:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10327,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9596:145:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10332,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10328,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10186,
|
|
"src": "9759:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10329,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "9772:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10330,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "9772:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10331,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ABOVE_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "9772:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "9759:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10333,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9759:36:28"
|
|
}
|
|
]
|
|
},
|
|
"id": 10335,
|
|
"nodeType": "IfStatement",
|
|
"src": "9308:502:28",
|
|
"trueBody": {
|
|
"id": 10314,
|
|
"nodeType": "Block",
|
|
"src": "9351:162:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10306,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10304,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10180,
|
|
"src": "9422:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10305,
|
|
"name": "backToOnePayQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10270,
|
|
"src": "9433:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "9422:28:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10307,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9422:28:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10312,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10308,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10186,
|
|
"src": "9468:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10309,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "9481:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10310,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "9481:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10311,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "9481:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "9468:30:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10313,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9468:30:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 10336,
|
|
"nodeType": "IfStatement",
|
|
"src": "8947:863:28",
|
|
"trueBody": {
|
|
"id": 10300,
|
|
"nodeType": "Block",
|
|
"src": "8989:313:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10292,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10286,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10180,
|
|
"src": "9155:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10288,
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10216,
|
|
"src": "9186:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10289,
|
|
"name": "_QUOTE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9467,
|
|
"src": "9201:15:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10290,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10188,
|
|
"src": "9218:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10287,
|
|
"name": "_RBelowBuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8531,
|
|
"src": "9166:19:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10291,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9166:67:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "9155:78:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10293,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9155:78:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10298,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10294,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10186,
|
|
"src": "9251:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10295,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "9264:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10296,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "9264:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10297,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "BELOW_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "9264:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "9251:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10299,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9251:36:28"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 10339,
|
|
"nodeType": "IfStatement",
|
|
"src": "8432:1388:28",
|
|
"trueBody": {
|
|
"id": 10263,
|
|
"nodeType": "Block",
|
|
"src": "8475:178:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10255,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10249,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10180,
|
|
"src": "8516:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10251,
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10216,
|
|
"src": "8547:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10252,
|
|
"name": "_BASE_BALANCE_",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 9465,
|
|
"src": "8562:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10253,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10190,
|
|
"src": "8578:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10250,
|
|
"name": "_RAboveBuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8603,
|
|
"src": "8527:19:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10254,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8527:65:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "8516:76:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10256,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8516:76:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10261,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10257,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10186,
|
|
"src": "8606:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10258,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "8619:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10259,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "8619:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10260,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ABOVE_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "8619:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "8606:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10262,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8606:36:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 10340,
|
|
"nodeType": "IfStatement",
|
|
"src": "8229:1591:28",
|
|
"trueBody": {
|
|
"id": 10243,
|
|
"nodeType": "Block",
|
|
"src": "8266:160:28",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10235,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10230,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10180,
|
|
"src": "8307:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10232,
|
|
"name": "buyBaseAmount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10216,
|
|
"src": "8336:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10233,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10190,
|
|
"src": "8351:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 10231,
|
|
"name": "_ROneBuyBaseToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8457,
|
|
"src": "8318:17:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 10234,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8318:47:28",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "8307:58:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 10236,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8307:58:28"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10241,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 10237,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10186,
|
|
"src": "8379:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 10238,
|
|
"name": "Types",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11631,
|
|
"src": "8392:5:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Types_$11631_$",
|
|
"typeString": "type(library Types)"
|
|
}
|
|
},
|
|
"id": 10239,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "RStatus",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11630,
|
|
"src": "8392:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_RStatus_$11630_$",
|
|
"typeString": "type(enum Types.RStatus)"
|
|
}
|
|
},
|
|
"id": 10240,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "ABOVE_ONE",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "8392:23:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"src": "8379:36:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"id": 10242,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8379:36:28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10341,
|
|
"name": "payQuote",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10180,
|
|
"src": "9838:8:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10342,
|
|
"name": "lpFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10182,
|
|
"src": "9848:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10343,
|
|
"name": "mtFeeBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10184,
|
|
"src": "9859:9:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10344,
|
|
"name": "newRStatus",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10186,
|
|
"src": "9870:10:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10345,
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10188,
|
|
"src": "9882:14:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 10346,
|
|
"name": "newBaseTarget",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10190,
|
|
"src": "9898:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 10347,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "9837:75:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_RStatus_$11630_$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256,uint256,enum Types.RStatus,uint256,uint256)"
|
|
}
|
|
},
|
|
"functionReturnParameters": 10191,
|
|
"id": 10348,
|
|
"nodeType": "Return",
|
|
"src": "9830:82:28"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 10350,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_queryBuyBaseToken",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 10178,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 10177,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7639:14:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10176,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7639:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7638:16:28"
|
|
},
|
|
"returnParameters": {
|
|
"id": 10191,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 10180,
|
|
"mutability": "mutable",
|
|
"name": "payQuote",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7715:16:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10179,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7715:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10182,
|
|
"mutability": "mutable",
|
|
"name": "lpFeeBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7745:17:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10181,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7745:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10184,
|
|
"mutability": "mutable",
|
|
"name": "mtFeeBase",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7776:17:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10183,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7776:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10186,
|
|
"mutability": "mutable",
|
|
"name": "newRStatus",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7807:24:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 10185,
|
|
"name": "Types.RStatus",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11630,
|
|
"src": "7807:13:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_RStatus_$11630",
|
|
"typeString": "enum Types.RStatus"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10188,
|
|
"mutability": "mutable",
|
|
"name": "newQuoteTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7845:22:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10187,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7845:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10190,
|
|
"mutability": "mutable",
|
|
"name": "newBaseTarget",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 10350,
|
|
"src": "7881:21:28",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 10189,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7881:7:28",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7701:211:28"
|
|
},
|
|
"scope": 10351,
|
|
"src": "7611:2308:28",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 10352,
|
|
"src": "547:9374:28"
|
|
}
|
|
],
|
|
"src": "78:9844:28"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.6.9+commit.3e3065ac.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.2.3",
|
|
"updatedAt": "2020-11-06T08:03:35.705Z",
|
|
"devdoc": {
|
|
"author": "DODO Breeder",
|
|
"methods": {},
|
|
"title": "Trader"
|
|
},
|
|
"userdoc": {
|
|
"methods": {},
|
|
"notice": "Functions for trader operations"
|
|
}
|
|
} |