Created
November 9, 2023 18:52
-
-
Save camharris/f76dc24c060fb6ee1fd2cb0e2cfda5dc to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"abi": [ | |
{ | |
"inputs": [], | |
"stateMutability": "nonpayable", | |
"type": "constructor" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "string", | |
"name": "action", | |
"type": "string" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "bool", | |
"name": "pauseState", | |
"type": "bool" | |
} | |
], | |
"name": "ActionPaused", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "contract CToken", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "string", | |
"name": "action", | |
"type": "string" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "bool", | |
"name": "pauseState", | |
"type": "bool" | |
} | |
], | |
"name": "ActionPaused", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "address", | |
"name": "user", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "oldCompAccrued", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "newCompAccrued", | |
"type": "uint256" | |
} | |
], | |
"name": "CompAccruedAdjusted", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "recipient", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
} | |
], | |
"name": "CompGranted", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "address", | |
"name": "user", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "oldCompReceivable", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "newCompReceivable", | |
"type": "uint256" | |
} | |
], | |
"name": "CompReceivableUpdated", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "error", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "info", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "detail", | |
"type": "uint256" | |
} | |
], | |
"name": "Failure", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "borrower", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "cTokenInterestMarket", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "cTokenCollateral", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "topUpAmount", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "seizeAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "InterestShortfallTopUp", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "borrower", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "liquidatedValueTotal", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "contract CTokenInterface[]", | |
"name": "cTokenCollaterals", | |
"type": "address[]" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256[]", | |
"name": "seizeTokensList", | |
"type": "uint256[]" | |
} | |
], | |
"name": "LiquidateBorrow", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "contract CToken", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "account", | |
"type": "address" | |
} | |
], | |
"name": "MarketEntered", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "contract CToken", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "account", | |
"type": "address" | |
} | |
], | |
"name": "MarketExited", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "contract CToken", | |
"name": "cToken", | |
"type": "address" | |
} | |
], | |
"name": "MarketListed", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "contract CToken", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "newBorrowCap", | |
"type": "uint256" | |
} | |
], | |
"name": "NewBorrowCap", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "oldBorrowCapGuardian", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "newBorrowCapGuardian", | |
"type": "address" | |
} | |
], | |
"name": "NewBorrowCapGuardian", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "contract CToken", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "oldCollateralFactorMantissa", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "newCollateralFactorMantissa", | |
"type": "uint256" | |
} | |
], | |
"name": "NewCollateralFactor", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "oldLiquidationIncentiveMantissa", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "newLiquidationIncentiveMantissa", | |
"type": "uint256" | |
} | |
], | |
"name": "NewLiquidationIncentive", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "oldPauseGuardian", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "newPauseGuardian", | |
"type": "address" | |
} | |
], | |
"name": "NewPauseGuardian", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "contract PriceOracle", | |
"name": "oldPriceOracle", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "contract PriceOracle", | |
"name": "newPriceOracle", | |
"type": "address" | |
} | |
], | |
"name": "NewPriceOracle", | |
"type": "event" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "contract Unitroller", | |
"name": "unitroller", | |
"type": "address" | |
} | |
], | |
"name": "_become", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "_borrowGuardianPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "_mintGuardianPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "user", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "isTrue", | |
"type": "bool" | |
} | |
], | |
"name": "_setAdminWhitelist", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "newBorrowCapGuardian", | |
"type": "address" | |
} | |
], | |
"name": "_setBorrowCapGuardian", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "contract CToken", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "state", | |
"type": "bool" | |
} | |
], | |
"name": "_setBorrowPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "contract CToken", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "newCollateralFactorMantissa", | |
"type": "uint256" | |
} | |
], | |
"name": "_setCollateralFactor", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "bool", | |
"name": "state", | |
"type": "bool" | |
} | |
], | |
"name": "_setCollectInterestPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "newLiquidationIncentiveMantissa", | |
"type": "uint256" | |
} | |
], | |
"name": "_setLiquidationIncentive", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "contract CToken[]", | |
"name": "cTokens", | |
"type": "address[]" | |
}, | |
{ | |
"internalType": "uint256[]", | |
"name": "newBorrowCaps", | |
"type": "uint256[]" | |
} | |
], | |
"name": "_setMarketBorrowCaps", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "contract CToken", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "state", | |
"type": "bool" | |
} | |
], | |
"name": "_setMintPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "newPauseGuardian", | |
"type": "address" | |
} | |
], | |
"name": "_setPauseGuardian", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "bool", | |
"name": "state", | |
"type": "bool" | |
} | |
], | |
"name": "_setPayInterestPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "contract PriceOracle", | |
"name": "newOracle", | |
"type": "address" | |
} | |
], | |
"name": "_setPriceOracle", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "bool", | |
"name": "state", | |
"type": "bool" | |
} | |
], | |
"name": "_setSeizePaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "bool", | |
"name": "state", | |
"type": "bool" | |
} | |
], | |
"name": "_setTransferPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "contract CToken", | |
"name": "cToken", | |
"type": "address" | |
} | |
], | |
"name": "_supportMarket", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"name": "accountAssets", | |
"outputs": [ | |
{ | |
"internalType": "contract CToken", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "admin", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "adminWhitelist", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"name": "allMarkets", | |
"outputs": [ | |
{ | |
"internalType": "contract CToken", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "account", | |
"type": "address" | |
} | |
], | |
"name": "autoEnterMarkets", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "account", | |
"type": "address" | |
} | |
], | |
"name": "autoExitMarkets", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "borrower", | |
"type": "address" | |
}, | |
{ | |
"components": [ | |
{ | |
"internalType": "address", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256[]", | |
"name": "nftIds", | |
"type": "uint256[]" | |
} | |
], | |
"internalType": "struct Comptroller.Liquidatables[]", | |
"name": "liquidatables", | |
"type": "tuple[]" | |
}, | |
{ | |
"internalType": "contract CTokenInterface[]", | |
"name": "cTokenCollaterals", | |
"type": "address[]" | |
} | |
], | |
"name": "batchLiquidateBorrow", | |
"outputs": [ | |
{ | |
"internalType": "uint256[][2]", | |
"name": "results", | |
"type": "uint256[][2]" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "borrower", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "borrowAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "borrowAllowed", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "borrowCapGuardian", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "borrowCaps", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "borrowGuardianPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "borrower", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "borrowAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "borrowVerify", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "account", | |
"type": "address" | |
}, | |
{ | |
"internalType": "contract CToken", | |
"name": "cToken", | |
"type": "address" | |
} | |
], | |
"name": "checkMembership", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "closeFactorMantissa", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cTokenInterestMarket", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "cTokenSupplyMarket", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "lender", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "interestAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "collectInterestAllowed", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "collectInterestGuardianPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cTokenInterestMarket", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "cTokenSupplyMarket", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "lender", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "interestAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "collectInterestVerify", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "compAccrued", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "compBorrowSpeeds", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "compBorrowState", | |
"outputs": [ | |
{ | |
"internalType": "uint224", | |
"name": "index", | |
"type": "uint224" | |
}, | |
{ | |
"internalType": "uint32", | |
"name": "block", | |
"type": "uint32" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "compBorrowerIndex", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "compContributorSpeeds", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "compInitialIndex", | |
"outputs": [ | |
{ | |
"internalType": "uint224", | |
"name": "", | |
"type": "uint224" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "compRate", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "compReceivable", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "compSpeeds", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "compSupplierIndex", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "compSupplySpeeds", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "compSupplyState", | |
"outputs": [ | |
{ | |
"internalType": "uint224", | |
"name": "index", | |
"type": "uint224" | |
}, | |
{ | |
"internalType": "uint32", | |
"name": "block", | |
"type": "uint32" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "comptrollerImplementation", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address[]", | |
"name": "cTokens", | |
"type": "address[]" | |
} | |
], | |
"name": "enterMarkets", | |
"outputs": [ | |
{ | |
"internalType": "uint256[]", | |
"name": "", | |
"type": "uint256[]" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cTokenAddress", | |
"type": "address" | |
} | |
], | |
"name": "exitMarket", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "account", | |
"type": "address" | |
} | |
], | |
"name": "getAccountDebtRatio", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "account", | |
"type": "address" | |
} | |
], | |
"name": "getAccountLiquidity", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "getAllMarkets", | |
"outputs": [ | |
{ | |
"internalType": "contract CToken[]", | |
"name": "", | |
"type": "address[]" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cTokenA", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "cTokenB", | |
"type": "address" | |
} | |
], | |
"name": "getAssetsExchangeRate", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "account", | |
"type": "address" | |
} | |
], | |
"name": "getAssetsIn", | |
"outputs": [ | |
{ | |
"internalType": "contract CToken[]", | |
"name": "", | |
"type": "address[]" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "getBlockNumber", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "account", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "cTokenModify", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "redeemTokens", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "borrowAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "getHypotheticalAccountLiquidity", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "initialize", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "isComptroller", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "contract CToken", | |
"name": "cToken", | |
"type": "address" | |
} | |
], | |
"name": "isDeprecated", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cToken", | |
"type": "address" | |
} | |
], | |
"name": "isListed", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "lastContributorBlock", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cTokenBorrowed", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "cTokenCollateral", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "liquidator", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "borrower", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "repayAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "liquidateBorrowAllowed", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cTokenBorrowed", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "cTokenCollateral", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "liquidator", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "borrower", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "actualRepayAmount", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "seizeTokens", | |
"type": "uint256" | |
} | |
], | |
"name": "liquidateBorrowVerify", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cTokenBorrowed", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "cTokenCollateral", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "actualRepayAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "liquidateCalculateSeizeTokens", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cTokenCollateral", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "normedRepayAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "liquidateCalculateSeizeTokensNormed", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "liquidationIncentiveMantissa", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "markets", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "isListed", | |
"type": "bool" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "collateralFactorMantissa", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "isComped", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "maxAssets", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "minter", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "mintAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "mintAllowed", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "mintGuardianPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "minter", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "actualMintAmount", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "mintTokens", | |
"type": "uint256" | |
} | |
], | |
"name": "mintVerify", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "oracle", | |
"outputs": [ | |
{ | |
"internalType": "contract PriceOracle", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "pauseGuardian", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cTokenInterestMarket", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "cTokenBorrowMarket", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "payer", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "interestAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "payInterestAllowed", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "payInterestGuardianPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cTokenInterestMarket", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "cTokenBorrowMarket", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "payer", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "interestAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "payInterestVerify", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "pendingAdmin", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "pendingComptrollerImplementation", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "proposal65FixExecuted", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address[]", | |
"name": "cTokens", | |
"type": "address[]" | |
} | |
], | |
"name": "redeemAllInterest", | |
"outputs": [ | |
{ | |
"internalType": "uint256[]", | |
"name": "", | |
"type": "uint256[]" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "redeemer", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "redeemTokens", | |
"type": "uint256" | |
} | |
], | |
"name": "redeemAllowed", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "redeemer", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "redeemAmount", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "redeemTokens", | |
"type": "uint256" | |
} | |
], | |
"name": "redeemVerify", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "payer", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "borrower", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "repayAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "repayBorrowAllowed", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "payer", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "borrower", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "actualRepayAmount", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "borrowerIndex", | |
"type": "uint256" | |
} | |
], | |
"name": "repayBorrowVerify", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cTokenCollateral", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "cTokenBorrowed", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "liquidator", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "borrower", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "seizeTokens", | |
"type": "uint256" | |
} | |
], | |
"name": "seizeAllowed", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "seizeGuardianPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cTokenCollateral", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "cTokenBorrowed", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "liquidator", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "borrower", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "seizeTokens", | |
"type": "uint256" | |
} | |
], | |
"name": "seizeVerify", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "borrower", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "maxTopUpTokens", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "address", | |
"name": "cTokenInterestMarket", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "cTokenCollateral", | |
"type": "address" | |
} | |
], | |
"name": "topUpInterestShortfall", | |
"outputs": [ | |
{ | |
"internalType": "uint256[2]", | |
"name": "", | |
"type": "uint256[2]" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "src", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "dst", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "transferTokens", | |
"type": "uint256" | |
} | |
], | |
"name": "transferAllowed", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "transferGuardianPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "cToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "src", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "dst", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "transferTokens", | |
"type": "uint256" | |
} | |
], | |
"name": "transferVerify", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
], | |
"allSourcePaths": { | |
"10": "contracts/CErc20InterestMarketInterfaces.sol", | |
"15": "contracts/CErc721TokenInterfaces.sol", | |
"19": "contracts/CToken.sol", | |
"20": "contracts/CTokenInterfaces.sol", | |
"22": "contracts/Comptroller.sol", | |
"23": "contracts/ComptrollerInterface.sol", | |
"24": "contracts/ComptrollerStorage.sol", | |
"26": "contracts/EIP20NonStandardInterface.sol", | |
"28": "contracts/ErrorReporter.sol", | |
"29": "contracts/ExponentialNoError.sol", | |
"30": "contracts/InterestRateModel.sol", | |
"38": "contracts/PriceOracle.sol", | |
"42": "contracts/Unitroller.sol" | |
}, | |
"ast": { | |
"absolutePath": "contracts/Comptroller.sol", | |
"exportedSymbols": { | |
"CDelegateInterface": [ | |
16418 | |
], | |
"CDelegationStorage": [ | |
16385 | |
], | |
"CDelegatorInterface": [ | |
16405 | |
], | |
"CErc20InterestMarketInterface": [ | |
15480 | |
], | |
"CErc20InterestMarketStorage": [ | |
15455 | |
], | |
"CErc20Interface": [ | |
16381 | |
], | |
"CErc20Storage": [ | |
16298 | |
], | |
"CErc721Interface": [ | |
15741 | |
], | |
"CErc721Storage": [ | |
15504 | |
], | |
"CToken": [ | |
6186 | |
], | |
"CTokenInterface": [ | |
16294 | |
], | |
"CTokenStorage": [ | |
15956 | |
], | |
"Comptroller": [ | |
10778 | |
], | |
"ComptrollerErrorReporter": [ | |
16918 | |
], | |
"ComptrollerInterface": [ | |
16709 | |
], | |
"ComptrollerV1Storage": [ | |
10818 | |
], | |
"ComptrollerV2Storage": [ | |
10861 | |
], | |
"ComptrollerV3Storage": [ | |
10913 | |
], | |
"ComptrollerV4Storage": [ | |
10922 | |
], | |
"ComptrollerV5Storage": [ | |
10935 | |
], | |
"ComptrollerV6Storage": [ | |
10948 | |
], | |
"ComptrollerV7Storage": [ | |
10959 | |
], | |
"ComptrollerV8Storage": [ | |
10987 | |
], | |
"EIP20Interface": [ | |
16800 | |
], | |
"EIP20NonStandardInterface": [ | |
20251 | |
], | |
"ExponentialNoError": [ | |
17653 | |
], | |
"InterestRateModel": [ | |
17717 | |
], | |
"PriceOracle": [ | |
12027 | |
], | |
"TokenErrorReporter": [ | |
17020 | |
], | |
"Unitroller": [ | |
18071 | |
], | |
"UnitrollerAdminStorage": [ | |
10795 | |
] | |
}, | |
"id": 10779, | |
"license": "BSD-3-Clause", | |
"nodeType": "SourceUnit", | |
"nodes": [ | |
{ | |
"id": 6581, | |
"literals": [ | |
"solidity", | |
"^", | |
"0.8", | |
".10" | |
], | |
"nodeType": "PragmaDirective", | |
"src": "41:24:22" | |
}, | |
{ | |
"absolutePath": "contracts/CToken.sol", | |
"file": "./CToken.sol", | |
"id": 6582, | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "ImportDirective", | |
"scope": 10779, | |
"sourceUnit": 6187, | |
"src": "67:22:22", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "contracts/ErrorReporter.sol", | |
"file": "./ErrorReporter.sol", | |
"id": 6583, | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "ImportDirective", | |
"scope": 10779, | |
"sourceUnit": 17021, | |
"src": "90:29:22", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "contracts/PriceOracle.sol", | |
"file": "./PriceOracle.sol", | |
"id": 6584, | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "ImportDirective", | |
"scope": 10779, | |
"sourceUnit": 12028, | |
"src": "120:27:22", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "contracts/ComptrollerInterface.sol", | |
"file": "./ComptrollerInterface.sol", | |
"id": 6585, | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "ImportDirective", | |
"scope": 10779, | |
"sourceUnit": 16710, | |
"src": "148:36:22", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "contracts/ComptrollerStorage.sol", | |
"file": "./ComptrollerStorage.sol", | |
"id": 6586, | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "ImportDirective", | |
"scope": 10779, | |
"sourceUnit": 10988, | |
"src": "185:34:22", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "contracts/Unitroller.sol", | |
"file": "./Unitroller.sol", | |
"id": 6587, | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "ImportDirective", | |
"scope": 10779, | |
"sourceUnit": 18072, | |
"src": "220:26:22", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "contracts/CErc721TokenInterfaces.sol", | |
"file": "./CErc721TokenInterfaces.sol", | |
"id": 6588, | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "ImportDirective", | |
"scope": 10779, | |
"sourceUnit": 15742, | |
"src": "247:38:22", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"abstract": false, | |
"baseContracts": [ | |
{ | |
"baseName": { | |
"id": 6590, | |
"name": "ComptrollerV8Storage", | |
"nameLocations": [ | |
"381:20:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 10987, | |
"src": "381:20:22" | |
}, | |
"id": 6591, | |
"nodeType": "InheritanceSpecifier", | |
"src": "381:20:22" | |
}, | |
{ | |
"baseName": { | |
"id": 6592, | |
"name": "ComptrollerInterface", | |
"nameLocations": [ | |
"403:20:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 16709, | |
"src": "403:20:22" | |
}, | |
"id": 6593, | |
"nodeType": "InheritanceSpecifier", | |
"src": "403:20:22" | |
}, | |
{ | |
"baseName": { | |
"id": 6594, | |
"name": "ComptrollerErrorReporter", | |
"nameLocations": [ | |
"425:24:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 16918, | |
"src": "425:24:22" | |
}, | |
"id": 6595, | |
"nodeType": "InheritanceSpecifier", | |
"src": "425:24:22" | |
}, | |
{ | |
"baseName": { | |
"id": 6596, | |
"name": "ExponentialNoError", | |
"nameLocations": [ | |
"451:18:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 17653, | |
"src": "451:18:22" | |
}, | |
"id": 6597, | |
"nodeType": "InheritanceSpecifier", | |
"src": "451:18:22" | |
} | |
], | |
"canonicalName": "Comptroller", | |
"contractDependencies": [], | |
"contractKind": "contract", | |
"documentation": { | |
"id": 6589, | |
"nodeType": "StructuredDocumentation", | |
"src": "287:69:22", | |
"text": " @title Compound's Comptroller Contract\n @author Compound" | |
}, | |
"fullyImplemented": true, | |
"id": 10778, | |
"linearizedBaseContracts": [ | |
10778, | |
17653, | |
16918, | |
16709, | |
10987, | |
10959, | |
10948, | |
10935, | |
10922, | |
10913, | |
10861, | |
10818, | |
10795 | |
], | |
"name": "Comptroller", | |
"nameLocation": "366:11:22", | |
"nodeType": "ContractDefinition", | |
"nodes": [ | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6598, | |
"nodeType": "StructuredDocumentation", | |
"src": "476:51:22", | |
"text": "@notice Emitted when an admin supports a market" | |
}, | |
"eventSelector": "cf583bb0c569eb967f806b11601c4cb93c10310485c67add5f8362c2f212321f", | |
"id": 6603, | |
"name": "MarketListed", | |
"nameLocation": "538:12:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6602, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6601, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "558:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6603, | |
"src": "551:13:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
"typeName": { | |
"id": 6600, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6599, | |
"name": "CToken", | |
"nameLocations": [ | |
"551:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "551:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "551:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "550:15:22" | |
}, | |
"src": "532:34:22" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6604, | |
"nodeType": "StructuredDocumentation", | |
"src": "572:51:22", | |
"text": "@notice Emitted when an account enters a market" | |
}, | |
"eventSelector": "3ab23ab0d51cccc0c3085aec51f99228625aa1a922b3a8ca89a26b0f2027a1a5", | |
"id": 6611, | |
"name": "MarketEntered", | |
"nameLocation": "634:13:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6610, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6607, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "655:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6611, | |
"src": "648:13:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
"typeName": { | |
"id": 6606, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6605, | |
"name": "CToken", | |
"nameLocations": [ | |
"648:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "648:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "648:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6609, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "account", | |
"nameLocation": "671:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6611, | |
"src": "663:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6608, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "663:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "647:32:22" | |
}, | |
"src": "628:52:22" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6612, | |
"nodeType": "StructuredDocumentation", | |
"src": "686:50:22", | |
"text": "@notice Emitted when an account exits a market" | |
}, | |
"eventSelector": "e699a64c18b07ac5b7301aa273f36a2287239eb9501d81950672794afba29a0d", | |
"id": 6619, | |
"name": "MarketExited", | |
"nameLocation": "747:12:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6618, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6615, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "767:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6619, | |
"src": "760:13:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
"typeName": { | |
"id": 6614, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6613, | |
"name": "CToken", | |
"nameLocations": [ | |
"760:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "760:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "760:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6617, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "account", | |
"nameLocation": "783:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6619, | |
"src": "775:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6616, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "775:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "759:32:22" | |
}, | |
"src": "741:51:22" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6620, | |
"nodeType": "StructuredDocumentation", | |
"src": "947:64:22", | |
"text": "@notice Emitted when a collateral factor is changed by admin" | |
}, | |
"eventSelector": "70483e6592cd5182d45ac970e05bc62cdcc90e9d8ef2c2dbe686cf383bcd7fc5", | |
"id": 6629, | |
"name": "NewCollateralFactor", | |
"nameLocation": "1022:19:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6628, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6623, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "1049:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6629, | |
"src": "1042:13:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
"typeName": { | |
"id": 6622, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6621, | |
"name": "CToken", | |
"nameLocations": [ | |
"1042:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "1042:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "1042:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6625, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "oldCollateralFactorMantissa", | |
"nameLocation": "1062:27:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6629, | |
"src": "1057:32:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6624, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1057:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6627, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "newCollateralFactorMantissa", | |
"nameLocation": "1096:27:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6629, | |
"src": "1091:32:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6626, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1091:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "1041:83:22" | |
}, | |
"src": "1016:109:22" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6630, | |
"nodeType": "StructuredDocumentation", | |
"src": "1131:66:22", | |
"text": "@notice Emitted when liquidation incentive is changed by admin" | |
}, | |
"eventSelector": "aeba5a6c40a8ac138134bff1aaa65debf25971188a58804bad717f82f0ec1316", | |
"id": 6636, | |
"name": "NewLiquidationIncentive", | |
"nameLocation": "1208:23:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6635, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6632, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "oldLiquidationIncentiveMantissa", | |
"nameLocation": "1237:31:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6636, | |
"src": "1232:36:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6631, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1232:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6634, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "newLiquidationIncentiveMantissa", | |
"nameLocation": "1275:31:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6636, | |
"src": "1270:36:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6633, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1270:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "1231:76:22" | |
}, | |
"src": "1202:106:22" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6637, | |
"nodeType": "StructuredDocumentation", | |
"src": "1314:48:22", | |
"text": "@notice Emitted when price oracle is changed" | |
}, | |
"eventSelector": "d52b2b9b7e9ee655fcb95d2e5b9e0c9f69e7ef2b8e9d2d0ea78402d576d22e22", | |
"id": 6645, | |
"name": "NewPriceOracle", | |
"nameLocation": "1373:14:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6644, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6640, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "oldPriceOracle", | |
"nameLocation": "1400:14:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6645, | |
"src": "1388:26:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_PriceOracle_$12027", | |
"typeString": "contract PriceOracle" | |
}, | |
"typeName": { | |
"id": 6639, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6638, | |
"name": "PriceOracle", | |
"nameLocations": [ | |
"1388:11:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 12027, | |
"src": "1388:11:22" | |
}, | |
"referencedDeclaration": 12027, | |
"src": "1388:11:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_PriceOracle_$12027", | |
"typeString": "contract PriceOracle" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6643, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "newPriceOracle", | |
"nameLocation": "1428:14:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6645, | |
"src": "1416:26:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_PriceOracle_$12027", | |
"typeString": "contract PriceOracle" | |
}, | |
"typeName": { | |
"id": 6642, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6641, | |
"name": "PriceOracle", | |
"nameLocations": [ | |
"1416:11:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 12027, | |
"src": "1416:11:22" | |
}, | |
"referencedDeclaration": 12027, | |
"src": "1416:11:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_PriceOracle_$12027", | |
"typeString": "contract PriceOracle" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "1387:56:22" | |
}, | |
"src": "1367:77:22" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6646, | |
"nodeType": "StructuredDocumentation", | |
"src": "1450:50:22", | |
"text": "@notice Emitted when pause guardian is changed" | |
}, | |
"eventSelector": "0613b6ee6a04f0d09f390e4d9318894b9f6ac7fd83897cd8d18896ba579c401e", | |
"id": 6652, | |
"name": "NewPauseGuardian", | |
"nameLocation": "1511:16:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6651, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6648, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "oldPauseGuardian", | |
"nameLocation": "1536:16:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6652, | |
"src": "1528:24:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6647, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "1528:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6650, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "newPauseGuardian", | |
"nameLocation": "1562:16:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6652, | |
"src": "1554:24:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6649, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "1554:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "1527:52:22" | |
}, | |
"src": "1505:75:22" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6653, | |
"nodeType": "StructuredDocumentation", | |
"src": "1586:53:22", | |
"text": "@notice Emitted when an action is paused globally" | |
}, | |
"eventSelector": "ef159d9a32b2472e32b098f954f3ce62d232939f1c207070b584df1814de2de0", | |
"id": 6659, | |
"name": "ActionPaused", | |
"nameLocation": "1650:12:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6658, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6655, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "action", | |
"nameLocation": "1670:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6659, | |
"src": "1663:13:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string" | |
}, | |
"typeName": { | |
"id": 6654, | |
"name": "string", | |
"nodeType": "ElementaryTypeName", | |
"src": "1663:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage_ptr", | |
"typeString": "string" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6657, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "pauseState", | |
"nameLocation": "1683:10:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6659, | |
"src": "1678:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 6656, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "1678:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "1662:32:22" | |
}, | |
"src": "1644:51:22" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6660, | |
"nodeType": "StructuredDocumentation", | |
"src": "1701:56:22", | |
"text": "@notice Emitted when an action is paused on a market" | |
}, | |
"eventSelector": "71aec636243f9709bb0007ae15e9afb8150ab01716d75fd7573be5cc096e03b0", | |
"id": 6669, | |
"name": "ActionPaused", | |
"nameLocation": "1768:12:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6668, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6663, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "1788:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6669, | |
"src": "1781:13:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
"typeName": { | |
"id": 6662, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6661, | |
"name": "CToken", | |
"nameLocations": [ | |
"1781:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "1781:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "1781:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6665, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "action", | |
"nameLocation": "1803:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6669, | |
"src": "1796:13:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string" | |
}, | |
"typeName": { | |
"id": 6664, | |
"name": "string", | |
"nodeType": "ElementaryTypeName", | |
"src": "1796:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage_ptr", | |
"typeString": "string" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6667, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "pauseState", | |
"nameLocation": "1816:10:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6669, | |
"src": "1811:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 6666, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "1811:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "1780:47:22" | |
}, | |
"src": "1762:66:22" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6670, | |
"nodeType": "StructuredDocumentation", | |
"src": "1834:59:22", | |
"text": "@notice Emitted when borrow cap for a cToken is changed" | |
}, | |
"eventSelector": "6f1951b2aad10f3fc81b86d91105b413a5b3f847a34bbc5ce1904201b14438f6", | |
"id": 6677, | |
"name": "NewBorrowCap", | |
"nameLocation": "1904:12:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6676, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6673, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "1932:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6677, | |
"src": "1917:21:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
"typeName": { | |
"id": 6672, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6671, | |
"name": "CToken", | |
"nameLocations": [ | |
"1917:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "1917:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "1917:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6675, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "newBorrowCap", | |
"nameLocation": "1945:12:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6677, | |
"src": "1940:17:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6674, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1940:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "1916:42:22" | |
}, | |
"src": "1898:61:22" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6678, | |
"nodeType": "StructuredDocumentation", | |
"src": "1965:55:22", | |
"text": "@notice Emitted when borrow cap guardian is changed" | |
}, | |
"eventSelector": "eda98690e518e9a05f8ec6837663e188211b2da8f4906648b323f2c1d4434e29", | |
"id": 6684, | |
"name": "NewBorrowCapGuardian", | |
"nameLocation": "2031:20:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6683, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6680, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "oldBorrowCapGuardian", | |
"nameLocation": "2060:20:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6684, | |
"src": "2052:28:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6679, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2052:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6682, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "newBorrowCapGuardian", | |
"nameLocation": "2090:20:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6684, | |
"src": "2082:28:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6681, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2082:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "2051:60:22" | |
}, | |
"src": "2025:87:22" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6685, | |
"nodeType": "StructuredDocumentation", | |
"src": "2118:49:22", | |
"text": "@notice Emitted when COMP is granted by admin" | |
}, | |
"eventSelector": "98b2f82a3a07f223a0be64b3d0f47711c64dccd1feafb94aa28156b38cd9695c", | |
"id": 6691, | |
"name": "CompGranted", | |
"nameLocation": "2178:11:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6690, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6687, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "recipient", | |
"nameLocation": "2198:9:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6691, | |
"src": "2190:17:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6686, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2190:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6689, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "amount", | |
"nameLocation": "2214:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6691, | |
"src": "2209:11:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6688, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2209:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "2189:32:22" | |
}, | |
"src": "2172:50:22" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6692, | |
"nodeType": "StructuredDocumentation", | |
"src": "2228:76:22", | |
"text": "@notice Emitted when COMP accrued for a user has been manually adjusted." | |
}, | |
"eventSelector": "4a5c134e28b537a76546993ea37f3b60d9190476df7356d3842aa40902e20f04", | |
"id": 6700, | |
"name": "CompAccruedAdjusted", | |
"nameLocation": "2315:19:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6699, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6694, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "user", | |
"nameLocation": "2351:4:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6700, | |
"src": "2335:20:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6693, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2335:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6696, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "oldCompAccrued", | |
"nameLocation": "2362:14:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6700, | |
"src": "2357:19:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6695, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2357:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6698, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "newCompAccrued", | |
"nameLocation": "2383:14:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6700, | |
"src": "2378:19:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6697, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2378:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "2334:64:22" | |
}, | |
"src": "2309:90:22" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": { | |
"id": 6701, | |
"nodeType": "StructuredDocumentation", | |
"src": "2405:69:22", | |
"text": "@notice Emitted when COMP receivable for a user has been updated." | |
}, | |
"eventSelector": "17fea09d9a7ca41b2f9f9118f18f44848a62e9c70d55dd4385131eb2cf1b7e47", | |
"id": 6709, | |
"name": "CompReceivableUpdated", | |
"nameLocation": "2485:21:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6708, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6703, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "user", | |
"nameLocation": "2523:4:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6709, | |
"src": "2507:20:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6702, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2507:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6705, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "oldCompReceivable", | |
"nameLocation": "2534:17:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6709, | |
"src": "2529:22:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6704, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2529:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6707, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "newCompReceivable", | |
"nameLocation": "2558:17:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6709, | |
"src": "2553:22:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6706, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2553:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "2506:70:22" | |
}, | |
"src": "2479:98:22" | |
}, | |
{ | |
"anonymous": false, | |
"eventSelector": "3abf2bf49c89fa908baced07de549f91502a77cf395abef774f3ea1705b8c5c1", | |
"id": 6721, | |
"name": "InterestShortfallTopUp", | |
"nameLocation": "2589:22:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6720, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6711, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "borrower", | |
"nameLocation": "2620:8:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6721, | |
"src": "2612:16:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6710, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2612:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6713, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "cTokenInterestMarket", | |
"nameLocation": "2638:20:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6721, | |
"src": "2630:28:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6712, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2630:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6715, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "cTokenCollateral", | |
"nameLocation": "2668:16:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6721, | |
"src": "2660:24:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6714, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2660:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6717, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "topUpAmount", | |
"nameLocation": "2691:11:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6721, | |
"src": "2686:16:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6716, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2686:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6719, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "seizeAmount", | |
"nameLocation": "2709:11:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6721, | |
"src": "2704:16:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6718, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2704:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "2611:110:22" | |
}, | |
"src": "2583:139:22" | |
}, | |
{ | |
"anonymous": false, | |
"eventSelector": "7f9c2432fb9b0bd460d23bda178f4a153d0f3b5023e8298dabe655864ae8aa6d", | |
"id": 6734, | |
"name": "LiquidateBorrow", | |
"nameLocation": "2734:15:22", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 6733, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6723, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "borrower", | |
"nameLocation": "2758:8:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6734, | |
"src": "2750:16:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6722, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2750:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6725, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "liquidatedValueTotal", | |
"nameLocation": "2773:20:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6734, | |
"src": "2768:25:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6724, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2768:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6729, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "cTokenCollaterals", | |
"nameLocation": "2813:17:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6734, | |
"src": "2795:35:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CTokenInterface_$16294_$dyn_memory_ptr", | |
"typeString": "contract CTokenInterface[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 6727, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6726, | |
"name": "CTokenInterface", | |
"nameLocations": [ | |
"2795:15:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 16294, | |
"src": "2795:15:22" | |
}, | |
"referencedDeclaration": 16294, | |
"src": "2795:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CTokenInterface_$16294", | |
"typeString": "contract CTokenInterface" | |
} | |
}, | |
"id": 6728, | |
"nodeType": "ArrayTypeName", | |
"src": "2795:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CTokenInterface_$16294_$dyn_storage_ptr", | |
"typeString": "contract CTokenInterface[]" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6732, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "seizeTokensList", | |
"nameLocation": "2839:15:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6734, | |
"src": "2832:22:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 6730, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2832:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 6731, | |
"nodeType": "ArrayTypeName", | |
"src": "2832:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "2749:106:22" | |
}, | |
"src": "2728:128:22" | |
}, | |
{ | |
"constant": true, | |
"documentation": { | |
"id": 6735, | |
"nodeType": "StructuredDocumentation", | |
"src": "2862:47:22", | |
"text": "@notice The initial COMP index for a market" | |
}, | |
"functionSelector": "a7f0e231", | |
"id": 6738, | |
"mutability": "constant", | |
"name": "compInitialIndex", | |
"nameLocation": "2938:16:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 10778, | |
"src": "2914:47:22", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint224", | |
"typeString": "uint224" | |
}, | |
"typeName": { | |
"id": 6736, | |
"name": "uint224", | |
"nodeType": "ElementaryTypeName", | |
"src": "2914:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint224", | |
"typeString": "uint224" | |
} | |
}, | |
"value": { | |
"hexValue": "31653336", | |
"id": 6737, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "2957:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1000000000000000000000000000000000000_by_1", | |
"typeString": "int_const 1000...(29 digits omitted)...0000" | |
}, | |
"value": "1e36" | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"constant": true, | |
"id": 6741, | |
"mutability": "constant", | |
"name": "collateralFactorMaxMantissa", | |
"nameLocation": "3312:27:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 10778, | |
"src": "3289:59:22", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6739, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "3289:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": { | |
"hexValue": "302e39653138", | |
"id": 6740, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3342:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_900000000000000000_by_1", | |
"typeString": "int_const 900000000000000000" | |
}, | |
"value": "0.9e18" | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"body": { | |
"id": 6749, | |
"nodeType": "Block", | |
"src": "3376:35:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 6747, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 6744, | |
"name": "admin", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10785, | |
"src": "3386:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"expression": { | |
"id": 6745, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "3394:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 6746, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "3398:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "3394:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"src": "3386:18:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"id": 6748, | |
"nodeType": "ExpressionStatement", | |
"src": "3386:18:22" | |
} | |
] | |
}, | |
"id": 6750, | |
"implemented": true, | |
"kind": "constructor", | |
"modifiers": [], | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 6742, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "3373:2:22" | |
}, | |
"returnParameters": { | |
"id": 6743, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "3376:0:22" | |
}, | |
"scope": 10778, | |
"src": "3362:49:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 6773, | |
"nodeType": "Block", | |
"src": "3446:257:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"id": 6765, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"id": 6760, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"id": 6754, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "3464:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 6755, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "3468:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "3464:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"arguments": [ | |
{ | |
"id": 6758, | |
"name": "this", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -28, | |
"src": "3486:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_Comptroller_$10778", | |
"typeString": "contract Comptroller" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_Comptroller_$10778", | |
"typeString": "contract Comptroller" | |
} | |
], | |
"id": 6757, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "3478:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 6756, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "3478:7:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 6759, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3478:13:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"src": "3464:27:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "||", | |
"rightExpression": { | |
"commonType": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"id": 6764, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"id": 6761, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "3495:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 6762, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "3499:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "3495:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"id": 6763, | |
"name": "admin", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10785, | |
"src": "3509:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"src": "3495:19:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"src": "3464:50:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "6f6e6c792061646d696e206d617920696e697469616c697a652074686520636f6d7074726f6c6c6572", | |
"id": 6766, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3516:43:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_4b340fea0d0c177218211d82f3f57f98c46a5b3b0995a514a22a748fe77392f0", | |
"typeString": "literal_string \"only admin may initialize the comptroller\"" | |
}, | |
"value": "only admin may initialize the comptroller" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_4b340fea0d0c177218211d82f3f57f98c46a5b3b0995a514a22a748fe77392f0", | |
"typeString": "literal_string \"only admin may initialize the comptroller\"" | |
} | |
], | |
"id": 6753, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "3456:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 6767, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3456:104:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 6768, | |
"nodeType": "ExpressionStatement", | |
"src": "3456:104:22" | |
}, | |
{ | |
"expression": { | |
"id": 6771, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 6769, | |
"name": "_notEntered", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10964, | |
"src": "3678:11:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"hexValue": "74727565", | |
"id": 6770, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "bool", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3692:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"value": "true" | |
}, | |
"src": "3678:18:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 6772, | |
"nodeType": "ExpressionStatement", | |
"src": "3678:18:22" | |
} | |
] | |
}, | |
"functionSelector": "8129fc1c", | |
"id": 6774, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "initialize", | |
"nameLocation": "3426:10:22", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 6751, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "3436:2:22" | |
}, | |
"returnParameters": { | |
"id": 6752, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "3446:0:22" | |
}, | |
"scope": 10778, | |
"src": "3417:286:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 6795, | |
"nodeType": "Block", | |
"src": "4031:92:22", | |
"statements": [ | |
{ | |
"assignments": [ | |
6788 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 6788, | |
"mutability": "mutable", | |
"name": "assetsIn", | |
"nameLocation": "4057:8:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6795, | |
"src": "4041:24:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_memory_ptr", | |
"typeString": "contract CToken[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 6786, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6785, | |
"name": "CToken", | |
"nameLocations": [ | |
"4041:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "4041:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "4041:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"id": 6787, | |
"nodeType": "ArrayTypeName", | |
"src": "4041:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_storage_ptr", | |
"typeString": "contract CToken[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 6792, | |
"initialValue": { | |
"baseExpression": { | |
"id": 6789, | |
"name": "accountAssets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10817, | |
"src": "4068:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_array$_t_contract$_CToken_$6186_$dyn_storage_$", | |
"typeString": "mapping(address => contract CToken[] storage ref)" | |
} | |
}, | |
"id": 6791, | |
"indexExpression": { | |
"id": 6790, | |
"name": "account", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6777, | |
"src": "4082:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "4068:22:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_storage", | |
"typeString": "contract CToken[] storage ref" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "4041:49:22" | |
}, | |
{ | |
"expression": { | |
"id": 6793, | |
"name": "assetsIn", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6788, | |
"src": "4108:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_memory_ptr", | |
"typeString": "contract CToken[] memory" | |
} | |
}, | |
"functionReturnParameters": 6783, | |
"id": 6794, | |
"nodeType": "Return", | |
"src": "4101:15:22" | |
} | |
] | |
}, | |
"documentation": { | |
"id": 6775, | |
"nodeType": "StructuredDocumentation", | |
"src": "3742:206:22", | |
"text": " @notice Returns the assets an account has entered\n @param account The address of the account to pull assets for\n @return A dynamic list with the assets the account has entered" | |
}, | |
"functionSelector": "abfceffc", | |
"id": 6796, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "getAssetsIn", | |
"nameLocation": "3962:11:22", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 6778, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6777, | |
"mutability": "mutable", | |
"name": "account", | |
"nameLocation": "3982:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6796, | |
"src": "3974:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6776, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "3974:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "3973:17:22" | |
}, | |
"returnParameters": { | |
"id": 6783, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6782, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 6796, | |
"src": "4014:15:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_memory_ptr", | |
"typeString": "contract CToken[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 6780, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6779, | |
"name": "CToken", | |
"nameLocations": [ | |
"4014:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "4014:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "4014:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"id": 6781, | |
"nodeType": "ArrayTypeName", | |
"src": "4014:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_storage_ptr", | |
"typeString": "contract CToken[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "4013:17:22" | |
}, | |
"scope": 10778, | |
"src": "3953:170:22", | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"body": { | |
"id": 6817, | |
"nodeType": "Block", | |
"src": "4478:75:22", | |
"statements": [ | |
{ | |
"expression": { | |
"baseExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 6807, | |
"name": "markets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10837, | |
"src": "4495:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Market_$10831_storage_$", | |
"typeString": "mapping(address => struct ComptrollerV2Storage.Market storage ref)" | |
} | |
}, | |
"id": 6812, | |
"indexExpression": { | |
"arguments": [ | |
{ | |
"id": 6810, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6802, | |
"src": "4511:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
], | |
"id": 6809, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "4503:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 6808, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "4503:7:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 6811, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "4503:15:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "4495:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage", | |
"typeString": "struct ComptrollerV2Storage.Market storage ref" | |
} | |
}, | |
"id": 6813, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "4520:17:22", | |
"memberName": "accountMembership", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10828, | |
"src": "4495:42:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$", | |
"typeString": "mapping(address => bool)" | |
} | |
}, | |
"id": 6815, | |
"indexExpression": { | |
"id": 6814, | |
"name": "account", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6799, | |
"src": "4538:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "4495:51:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"functionReturnParameters": 6806, | |
"id": 6816, | |
"nodeType": "Return", | |
"src": "4488:58:22" | |
} | |
] | |
}, | |
"documentation": { | |
"id": 6797, | |
"nodeType": "StructuredDocumentation", | |
"src": "4129:258:22", | |
"text": " @notice Returns whether the given account is entered in the given asset\n @param account The address of the account to check\n @param cToken The cToken to check\n @return True if the account is in the asset, otherwise false." | |
}, | |
"functionSelector": "929fe9a1", | |
"id": 6818, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "checkMembership", | |
"nameLocation": "4401:15:22", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 6803, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6799, | |
"mutability": "mutable", | |
"name": "account", | |
"nameLocation": "4425:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6818, | |
"src": "4417:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6798, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "4417:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6802, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "4441:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6818, | |
"src": "4434:13:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
"typeName": { | |
"id": 6801, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6800, | |
"name": "CToken", | |
"nameLocations": [ | |
"4434:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "4434:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "4434:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "4416:32:22" | |
}, | |
"returnParameters": { | |
"id": 6806, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6805, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 6818, | |
"src": "4472:4:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 6804, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "4472:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "4471:6:22" | |
}, | |
"scope": 10778, | |
"src": "4392:161:22", | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"baseFunctions": [ | |
16429 | |
], | |
"body": { | |
"id": 6839, | |
"nodeType": "Block", | |
"src": "4773:108:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
}, | |
"id": 6835, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 6828, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "4818:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 6829, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "4822:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "4818:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 6827, | |
"name": "CToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6186, | |
"src": "4811:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_CToken_$6186_$", | |
"typeString": "type(contract CToken)" | |
} | |
}, | |
"id": 6830, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "4811:18:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
{ | |
"id": 6831, | |
"name": "account", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6821, | |
"src": "4831:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 6826, | |
"name": "addToMarketInternal", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6969, | |
"src": "4791:19:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_CToken_$6186_$_t_address_$returns$_t_enum$_Error_$16825_$", | |
"typeString": "function (contract CToken,address) returns (enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 6832, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "4791:48:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"expression": { | |
"id": 6833, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "4843:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 6834, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "4849:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "4843:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"src": "4791:66:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "756e617574686f72697a6564", | |
"id": 6836, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "4859:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_926a1b84b861d31f2d45224162461e1d5ff4377725d977d8f792bb84825a0348", | |
"typeString": "literal_string \"unauthorized\"" | |
}, | |
"value": "unauthorized" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_926a1b84b861d31f2d45224162461e1d5ff4377725d977d8f792bb84825a0348", | |
"typeString": "literal_string \"unauthorized\"" | |
} | |
], | |
"id": 6825, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "4783:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 6837, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "4783:91:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 6838, | |
"nodeType": "ExpressionStatement", | |
"src": "4783:91:22" | |
} | |
] | |
}, | |
"documentation": { | |
"id": 6819, | |
"nodeType": "StructuredDocumentation", | |
"src": "4559:150:22", | |
"text": " @notice When a market calls this function the account is added to this market\n @param account The account to enter the market" | |
}, | |
"functionSelector": "89cdf2ba", | |
"id": 6840, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "autoEnterMarkets", | |
"nameLocation": "4723:16:22", | |
"nodeType": "FunctionDefinition", | |
"overrides": { | |
"id": 6823, | |
"nodeType": "OverrideSpecifier", | |
"overrides": [], | |
"src": "4757:8:22" | |
}, | |
"parameters": { | |
"id": 6822, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6821, | |
"mutability": "mutable", | |
"name": "account", | |
"nameLocation": "4748:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6840, | |
"src": "4740:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6820, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "4740:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "4739:17:22" | |
}, | |
"returnParameters": { | |
"id": 6824, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "4773:0:22" | |
}, | |
"scope": 10778, | |
"src": "4714:167:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "public" | |
}, | |
{ | |
"baseFunctions": [ | |
16443 | |
], | |
"body": { | |
"id": 6903, | |
"nodeType": "Block", | |
"src": "5228:289:22", | |
"statements": [ | |
{ | |
"assignments": [ | |
6852 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 6852, | |
"mutability": "mutable", | |
"name": "len", | |
"nameLocation": "5243:3:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6903, | |
"src": "5238:8:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6851, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "5238:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 6855, | |
"initialValue": { | |
"expression": { | |
"id": 6853, | |
"name": "cTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6844, | |
"src": "5249:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", | |
"typeString": "address[] memory" | |
} | |
}, | |
"id": 6854, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "5257:6:22", | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "5249:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "5238:25:22" | |
}, | |
{ | |
"assignments": [ | |
6860 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 6860, | |
"mutability": "mutable", | |
"name": "results", | |
"nameLocation": "5288:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6903, | |
"src": "5274:21:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 6858, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "5274:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 6859, | |
"nodeType": "ArrayTypeName", | |
"src": "5274:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 6866, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 6864, | |
"name": "len", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6852, | |
"src": "5309:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 6863, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "NewExpression", | |
"src": "5298:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "function (uint256) pure returns (uint256[] memory)" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 6861, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "5302:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 6862, | |
"nodeType": "ArrayTypeName", | |
"src": "5302:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
} | |
}, | |
"id": 6865, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "5298:15:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "5274:39:22" | |
}, | |
{ | |
"body": { | |
"id": 6899, | |
"nodeType": "Block", | |
"src": "5354:132:22", | |
"statements": [ | |
{ | |
"assignments": [ | |
6879 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 6879, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "5375:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6899, | |
"src": "5368:13:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
"typeName": { | |
"id": 6878, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6877, | |
"name": "CToken", | |
"nameLocations": [ | |
"5368:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "5368:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "5368:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 6885, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"baseExpression": { | |
"id": 6881, | |
"name": "cTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6844, | |
"src": "5391:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", | |
"typeString": "address[] memory" | |
} | |
}, | |
"id": 6883, | |
"indexExpression": { | |
"id": 6882, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6868, | |
"src": "5399:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "5391:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 6880, | |
"name": "CToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6186, | |
"src": "5384:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_CToken_$6186_$", | |
"typeString": "type(contract CToken)" | |
} | |
}, | |
"id": 6884, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "5384:18:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "5368:34:22" | |
}, | |
{ | |
"expression": { | |
"id": 6897, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"id": 6886, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6860, | |
"src": "5417:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 6888, | |
"indexExpression": { | |
"id": 6887, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6868, | |
"src": "5425:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "5417:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"id": 6892, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6879, | |
"src": "5455:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
{ | |
"expression": { | |
"id": 6893, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "5463:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 6894, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "5467:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "5463:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 6891, | |
"name": "addToMarketInternal", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6969, | |
"src": "5435:19:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_CToken_$6186_$_t_address_$returns$_t_enum$_Error_$16825_$", | |
"typeString": "function (contract CToken,address) returns (enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 6895, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "5435:39:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 6890, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "5430:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 6889, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "5430:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 6896, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "5430:45:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5417:58:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 6898, | |
"nodeType": "ExpressionStatement", | |
"src": "5417:58:22" | |
} | |
] | |
}, | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 6873, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 6871, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6868, | |
"src": "5340:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"id": 6872, | |
"name": "len", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6852, | |
"src": "5344:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5340:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 6900, | |
"initializationExpression": { | |
"assignments": [ | |
6868 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 6868, | |
"mutability": "mutable", | |
"name": "i", | |
"nameLocation": "5333:1:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6900, | |
"src": "5328:6:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6867, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "5328:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 6870, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 6869, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "5337:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "5328:10:22" | |
}, | |
"loopExpression": { | |
"expression": { | |
"id": 6875, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "++", | |
"prefix": false, | |
"src": "5349:3:22", | |
"subExpression": { | |
"id": 6874, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6868, | |
"src": "5349:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 6876, | |
"nodeType": "ExpressionStatement", | |
"src": "5349:3:22" | |
}, | |
"nodeType": "ForStatement", | |
"src": "5323:163:22" | |
}, | |
{ | |
"expression": { | |
"id": 6901, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6860, | |
"src": "5503:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"functionReturnParameters": 6850, | |
"id": 6902, | |
"nodeType": "Return", | |
"src": "5496:14:22" | |
} | |
] | |
}, | |
"documentation": { | |
"id": 6841, | |
"nodeType": "StructuredDocumentation", | |
"src": "4887:248:22", | |
"text": " @notice Add assets to be included in account liquidity calculation\n @param cTokens The list of addresses of the cToken markets to be enabled\n @return Success indicator for whether each corresponding market was entered" | |
}, | |
"functionSelector": "c2998238", | |
"id": 6904, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "enterMarkets", | |
"nameLocation": "5149:12:22", | |
"nodeType": "FunctionDefinition", | |
"overrides": { | |
"id": 6846, | |
"nodeType": "OverrideSpecifier", | |
"overrides": [], | |
"src": "5188:8:22" | |
}, | |
"parameters": { | |
"id": 6845, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6844, | |
"mutability": "mutable", | |
"name": "cTokens", | |
"nameLocation": "5179:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6904, | |
"src": "5162:24:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", | |
"typeString": "address[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 6842, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "5162:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"id": 6843, | |
"nodeType": "ArrayTypeName", | |
"src": "5162:9:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", | |
"typeString": "address[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "5161:26:22" | |
}, | |
"returnParameters": { | |
"id": 6850, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6849, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 6904, | |
"src": "5213:13:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 6847, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "5213:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 6848, | |
"nodeType": "ArrayTypeName", | |
"src": "5213:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "5212:15:22" | |
}, | |
"scope": 10778, | |
"src": "5140:377:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 6968, | |
"nodeType": "Block", | |
"src": "5882:907:22", | |
"statements": [ | |
{ | |
"assignments": [ | |
6918 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 6918, | |
"mutability": "mutable", | |
"name": "marketToJoin", | |
"nameLocation": "5907:12:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6968, | |
"src": "5892:27:22", | |
"stateVariable": false, | |
"storageLocation": "storage", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage_ptr", | |
"typeString": "struct ComptrollerV2Storage.Market" | |
}, | |
"typeName": { | |
"id": 6917, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6916, | |
"name": "Market", | |
"nameLocations": [ | |
"5892:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 10831, | |
"src": "5892:6:22" | |
}, | |
"referencedDeclaration": 10831, | |
"src": "5892:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage_ptr", | |
"typeString": "struct ComptrollerV2Storage.Market" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 6925, | |
"initialValue": { | |
"baseExpression": { | |
"id": 6919, | |
"name": "markets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10837, | |
"src": "5922:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Market_$10831_storage_$", | |
"typeString": "mapping(address => struct ComptrollerV2Storage.Market storage ref)" | |
} | |
}, | |
"id": 6924, | |
"indexExpression": { | |
"arguments": [ | |
{ | |
"id": 6922, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6908, | |
"src": "5938:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
], | |
"id": 6921, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "5930:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 6920, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "5930:7:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 6923, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "5930:15:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "5922:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage", | |
"typeString": "struct ComptrollerV2Storage.Market storage ref" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "5892:54:22" | |
}, | |
{ | |
"condition": { | |
"id": 6928, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "!", | |
"prefix": true, | |
"src": "5961:22:22", | |
"subExpression": { | |
"expression": { | |
"id": 6926, | |
"name": "marketToJoin", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6918, | |
"src": "5962:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage_ptr", | |
"typeString": "struct ComptrollerV2Storage.Market storage pointer" | |
} | |
}, | |
"id": 6927, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "5975:8:22", | |
"memberName": "isListed", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10822, | |
"src": "5962:21:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 6933, | |
"nodeType": "IfStatement", | |
"src": "5957:132:22", | |
"trueBody": { | |
"id": 6932, | |
"nodeType": "Block", | |
"src": "5985:104:22", | |
"statements": [ | |
{ | |
"expression": { | |
"expression": { | |
"id": 6929, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "6055:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 6930, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "6061:17:22", | |
"memberName": "MARKET_NOT_LISTED", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16812, | |
"src": "6055:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"functionReturnParameters": 6915, | |
"id": 6931, | |
"nodeType": "Return", | |
"src": "6048:30:22" | |
} | |
] | |
} | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"id": 6939, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"baseExpression": { | |
"expression": { | |
"id": 6934, | |
"name": "marketToJoin", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6918, | |
"src": "6103:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage_ptr", | |
"typeString": "struct ComptrollerV2Storage.Market storage pointer" | |
} | |
}, | |
"id": 6935, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "6116:17:22", | |
"memberName": "accountMembership", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10828, | |
"src": "6103:30:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$", | |
"typeString": "mapping(address => bool)" | |
} | |
}, | |
"id": 6937, | |
"indexExpression": { | |
"id": 6936, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6910, | |
"src": "6134:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "6103:40:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"hexValue": "74727565", | |
"id": 6938, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "bool", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "6147:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"value": "true" | |
}, | |
"src": "6103:48:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 6944, | |
"nodeType": "IfStatement", | |
"src": "6099:130:22", | |
"trueBody": { | |
"id": 6943, | |
"nodeType": "Block", | |
"src": "6153:76:22", | |
"statements": [ | |
{ | |
"expression": { | |
"expression": { | |
"id": 6940, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "6204:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 6941, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "6210:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "6204:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"functionReturnParameters": 6915, | |
"id": 6942, | |
"nodeType": "Return", | |
"src": "6197:21:22" | |
} | |
] | |
} | |
}, | |
{ | |
"expression": { | |
"id": 6951, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"expression": { | |
"id": 6945, | |
"name": "marketToJoin", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6918, | |
"src": "6610:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage_ptr", | |
"typeString": "struct ComptrollerV2Storage.Market storage pointer" | |
} | |
}, | |
"id": 6948, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "6623:17:22", | |
"memberName": "accountMembership", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10828, | |
"src": "6610:30:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$", | |
"typeString": "mapping(address => bool)" | |
} | |
}, | |
"id": 6949, | |
"indexExpression": { | |
"id": 6947, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6910, | |
"src": "6641:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "6610:40:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"hexValue": "74727565", | |
"id": 6950, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "bool", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "6653:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"value": "true" | |
}, | |
"src": "6610:47:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 6952, | |
"nodeType": "ExpressionStatement", | |
"src": "6610:47:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 6957, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6908, | |
"src": "6696:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
], | |
"expression": { | |
"baseExpression": { | |
"id": 6953, | |
"name": "accountAssets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10817, | |
"src": "6667:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_array$_t_contract$_CToken_$6186_$dyn_storage_$", | |
"typeString": "mapping(address => contract CToken[] storage ref)" | |
} | |
}, | |
"id": 6955, | |
"indexExpression": { | |
"id": 6954, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6910, | |
"src": "6681:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "6667:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_storage", | |
"typeString": "contract CToken[] storage ref" | |
} | |
}, | |
"id": 6956, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "6691:4:22", | |
"memberName": "push", | |
"nodeType": "MemberAccess", | |
"src": "6667:28:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_contract$_CToken_$6186_$dyn_storage_ptr_$_t_contract$_CToken_$6186_$returns$__$attached_to$_t_array$_t_contract$_CToken_$6186_$dyn_storage_ptr_$", | |
"typeString": "function (contract CToken[] storage pointer,contract CToken)" | |
} | |
}, | |
"id": 6958, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "6667:36:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 6959, | |
"nodeType": "ExpressionStatement", | |
"src": "6667:36:22" | |
}, | |
{ | |
"eventCall": { | |
"arguments": [ | |
{ | |
"id": 6961, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6908, | |
"src": "6733:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
{ | |
"id": 6962, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6910, | |
"src": "6741:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 6960, | |
"name": "MarketEntered", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6611, | |
"src": "6719:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_event_nonpayable$_t_contract$_CToken_$6186_$_t_address_$returns$__$", | |
"typeString": "function (contract CToken,address)" | |
} | |
}, | |
"id": 6963, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "6719:31:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 6964, | |
"nodeType": "EmitStatement", | |
"src": "6714:36:22" | |
}, | |
{ | |
"expression": { | |
"expression": { | |
"id": 6965, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "6768:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 6966, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "6774:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "6768:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"functionReturnParameters": 6915, | |
"id": 6967, | |
"nodeType": "Return", | |
"src": "6761:21:22" | |
} | |
] | |
}, | |
"documentation": { | |
"id": 6905, | |
"nodeType": "StructuredDocumentation", | |
"src": "5523:267:22", | |
"text": " @notice Add the market to the borrower's \"assets in\" for liquidity calculations\n @param cToken The market to enter\n @param borrower The address of the account to modify\n @return Success indicator for whether the market was entered" | |
}, | |
"id": 6969, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "addToMarketInternal", | |
"nameLocation": "5804:19:22", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 6911, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6908, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "5831:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6969, | |
"src": "5824:13:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
"typeName": { | |
"id": 6907, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6906, | |
"name": "CToken", | |
"nameLocations": [ | |
"5824:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "5824:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "5824:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6910, | |
"mutability": "mutable", | |
"name": "borrower", | |
"nameLocation": "5847:8:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6969, | |
"src": "5839:16:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6909, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "5839:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "5823:33:22" | |
}, | |
"returnParameters": { | |
"id": 6915, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6914, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 6969, | |
"src": "5875:5:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
}, | |
"typeName": { | |
"id": 6913, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 6912, | |
"name": "Error", | |
"nameLocations": [ | |
"5875:5:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 16825, | |
"src": "5875:5:22" | |
}, | |
"referencedDeclaration": 16825, | |
"src": "5875:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "5874:7:22" | |
}, | |
"scope": 10778, | |
"src": "5795:994:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "internal" | |
}, | |
{ | |
"baseFunctions": [ | |
16434 | |
], | |
"body": { | |
"id": 6990, | |
"nodeType": "Block", | |
"src": "7011:111:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
}, | |
"id": 6986, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 6979, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "7059:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 6980, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "7063:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "7059:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 6978, | |
"name": "CToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6186, | |
"src": "7052:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_CToken_$6186_$", | |
"typeString": "type(contract CToken)" | |
} | |
}, | |
"id": 6981, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "7052:18:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
{ | |
"id": 6982, | |
"name": "account", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6972, | |
"src": "7072:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 6977, | |
"name": "exitFromMarketInternal", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7212, | |
"src": "7029:22:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_CToken_$6186_$_t_address_$returns$_t_enum$_Error_$16825_$", | |
"typeString": "function (contract CToken,address) returns (enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 6983, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "7029:51:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"expression": { | |
"id": 6984, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "7084:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 6985, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "7090:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "7084:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"src": "7029:69:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "756e617574686f72697a6564", | |
"id": 6987, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "7100:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_926a1b84b861d31f2d45224162461e1d5ff4377725d977d8f792bb84825a0348", | |
"typeString": "literal_string \"unauthorized\"" | |
}, | |
"value": "unauthorized" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_926a1b84b861d31f2d45224162461e1d5ff4377725d977d8f792bb84825a0348", | |
"typeString": "literal_string \"unauthorized\"" | |
} | |
], | |
"id": 6976, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "7021:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 6988, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "7021:94:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 6989, | |
"nodeType": "ExpressionStatement", | |
"src": "7021:94:22" | |
} | |
] | |
}, | |
"documentation": { | |
"id": 6970, | |
"nodeType": "StructuredDocumentation", | |
"src": "6795:153:22", | |
"text": " @notice When a market calls this function the account is removed from this market\n @param account The account to exit the market" | |
}, | |
"functionSelector": "50598ca4", | |
"id": 6991, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "autoExitMarkets", | |
"nameLocation": "6962:15:22", | |
"nodeType": "FunctionDefinition", | |
"overrides": { | |
"id": 6974, | |
"nodeType": "OverrideSpecifier", | |
"overrides": [], | |
"src": "6995:8:22" | |
}, | |
"parameters": { | |
"id": 6973, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6972, | |
"mutability": "mutable", | |
"name": "account", | |
"nameLocation": "6986:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 6991, | |
"src": "6978:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6971, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "6978:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "6977:17:22" | |
}, | |
"returnParameters": { | |
"id": 6975, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "7011:0:22" | |
}, | |
"scope": 10778, | |
"src": "6953:169:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "public" | |
}, | |
{ | |
"baseFunctions": [ | |
16450 | |
], | |
"body": { | |
"id": 7083, | |
"nodeType": "Block", | |
"src": "7582:1101:22", | |
"statements": [ | |
{ | |
"assignments": [ | |
7002 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7002, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "7599:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7083, | |
"src": "7592:13:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
"typeName": { | |
"id": 7001, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 7000, | |
"name": "CToken", | |
"nameLocations": [ | |
"7592:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "7592:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "7592:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7006, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 7004, | |
"name": "cTokenAddress", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6994, | |
"src": "7615:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7003, | |
"name": "CToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6186, | |
"src": "7608:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_CToken_$6186_$", | |
"typeString": "type(contract CToken)" | |
} | |
}, | |
"id": 7005, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "7608:21:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "7592:37:22" | |
}, | |
{ | |
"assignments": [ | |
7008, | |
7010, | |
7012, | |
null, | |
7014 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7008, | |
"mutability": "mutable", | |
"name": "oErr", | |
"nameLocation": "7723:4:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7083, | |
"src": "7718:9:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7007, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7718:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7010, | |
"mutability": "mutable", | |
"name": "tokensHeld", | |
"nameLocation": "7734:10:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7083, | |
"src": "7729:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7009, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7729:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7012, | |
"mutability": "mutable", | |
"name": "amountOwed", | |
"nameLocation": "7751:10:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7083, | |
"src": "7746:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7011, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7746:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
null, | |
{ | |
"constant": false, | |
"id": 7014, | |
"mutability": "mutable", | |
"name": "interestBalance", | |
"nameLocation": "7770:15:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7083, | |
"src": "7765:20:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7013, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7765:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7020, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7017, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "7815:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 7018, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "7819:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "7815:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"expression": { | |
"id": 7015, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7002, | |
"src": "7789:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"id": 7016, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "7796:18:22", | |
"memberName": "getAccountSnapshot", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 4497, | |
"src": "7789:25:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", | |
"typeString": "function (address) view external returns (uint256,uint256,uint256,uint256,uint256)" | |
} | |
}, | |
"id": 7019, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "7789:37:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", | |
"typeString": "tuple(uint256,uint256,uint256,uint256,uint256)" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "7717:109:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7024, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7022, | |
"name": "oErr", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7008, | |
"src": "7844:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 7023, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "7852:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "7844:9:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "657869744d61726b65743a206765744163636f756e74536e617073686f74206661696c6564", | |
"id": 7025, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "7855:39:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_cafc76453fc83e3f10c72a8efc5040b77c059e2a8eb73233cb1b8ec3356ff222", | |
"typeString": "literal_string \"exitMarket: getAccountSnapshot failed\"" | |
}, | |
"value": "exitMarket: getAccountSnapshot failed" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_cafc76453fc83e3f10c72a8efc5040b77c059e2a8eb73233cb1b8ec3356ff222", | |
"typeString": "literal_string \"exitMarket: getAccountSnapshot failed\"" | |
} | |
], | |
"id": 7021, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "7836:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7026, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "7836:59:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7027, | |
"nodeType": "ExpressionStatement", | |
"src": "7836:59:22" | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7030, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7028, | |
"name": "amountOwed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7012, | |
"src": "7990:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 7029, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "8004:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "7990:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 7039, | |
"nodeType": "IfStatement", | |
"src": "7986:125:22", | |
"trueBody": { | |
"id": 7038, | |
"nodeType": "Block", | |
"src": "8007:104:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7032, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "8033:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7033, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "8039:22:22", | |
"memberName": "NONZERO_BORROW_BALANCE", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16815, | |
"src": "8033:28:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
{ | |
"expression": { | |
"id": 7034, | |
"name": "FailureInfo", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16846, | |
"src": "8063:11:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_FailureInfo_$16846_$", | |
"typeString": "type(enum ComptrollerErrorReporter.FailureInfo)" | |
} | |
}, | |
"id": 7035, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "8075:24:22", | |
"memberName": "EXIT_MARKET_BALANCE_OWED", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16828, | |
"src": "8063:36:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_FailureInfo_$16846", | |
"typeString": "enum ComptrollerErrorReporter.FailureInfo" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
}, | |
{ | |
"typeIdentifier": "t_enum$_FailureInfo_$16846", | |
"typeString": "enum ComptrollerErrorReporter.FailureInfo" | |
} | |
], | |
"id": 7031, | |
"name": "fail", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16885, | |
"src": "8028:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Error_$16825_$_t_enum$_FailureInfo_$16846_$returns$_t_uint256_$", | |
"typeString": "function (enum ComptrollerErrorReporter.Error,enum ComptrollerErrorReporter.FailureInfo) returns (uint256)" | |
} | |
}, | |
"id": 7036, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "8028:72:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 6999, | |
"id": 7037, | |
"nodeType": "Return", | |
"src": "8021:79:22" | |
} | |
] | |
} | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7042, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7040, | |
"name": "interestBalance", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7014, | |
"src": "8187:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 7041, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "8206:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "8187:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 7051, | |
"nodeType": "IfStatement", | |
"src": "8183:132:22", | |
"trueBody": { | |
"id": 7050, | |
"nodeType": "Block", | |
"src": "8209:106:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7044, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "8235:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7045, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "8241:24:22", | |
"memberName": "NONZERO_INTEREST_BALANCE", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16823, | |
"src": "8235:30:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
{ | |
"expression": { | |
"id": 7046, | |
"name": "FailureInfo", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16846, | |
"src": "8267:11:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_FailureInfo_$16846_$", | |
"typeString": "type(enum ComptrollerErrorReporter.FailureInfo)" | |
} | |
}, | |
"id": 7047, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "8279:24:22", | |
"memberName": "EXIT_MARKET_BALANCE_OWED", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16828, | |
"src": "8267:36:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_FailureInfo_$16846", | |
"typeString": "enum ComptrollerErrorReporter.FailureInfo" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
}, | |
{ | |
"typeIdentifier": "t_enum$_FailureInfo_$16846", | |
"typeString": "enum ComptrollerErrorReporter.FailureInfo" | |
} | |
], | |
"id": 7043, | |
"name": "fail", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16885, | |
"src": "8230:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Error_$16825_$_t_enum$_FailureInfo_$16846_$returns$_t_uint256_$", | |
"typeString": "function (enum ComptrollerErrorReporter.Error,enum ComptrollerErrorReporter.FailureInfo) returns (uint256)" | |
} | |
}, | |
"id": 7048, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "8230:74:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 6999, | |
"id": 7049, | |
"nodeType": "Return", | |
"src": "8223:81:22" | |
} | |
] | |
} | |
}, | |
{ | |
"assignments": [ | |
7053 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7053, | |
"mutability": "mutable", | |
"name": "allowed", | |
"nameLocation": "8410:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7083, | |
"src": "8405:12:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7052, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8405:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7060, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 7055, | |
"name": "cTokenAddress", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6994, | |
"src": "8442:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"expression": { | |
"id": 7056, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "8457:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 7057, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "8461:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "8457:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7058, | |
"name": "tokensHeld", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7010, | |
"src": "8469:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 7054, | |
"name": "redeemAllowedInternal", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8070, | |
"src": "8420:21:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", | |
"typeString": "function (address,address,uint256) view returns (uint256)" | |
} | |
}, | |
"id": 7059, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "8420:60:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "8405:75:22" | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7063, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7061, | |
"name": "allowed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7053, | |
"src": "8494:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 7062, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "8505:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "8494:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 7073, | |
"nodeType": "IfStatement", | |
"src": "8490:121:22", | |
"trueBody": { | |
"id": 7072, | |
"nodeType": "Block", | |
"src": "8508:103:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7065, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "8540:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7066, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "8546:9:22", | |
"memberName": "REJECTION", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16817, | |
"src": "8540:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
{ | |
"expression": { | |
"id": 7067, | |
"name": "FailureInfo", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16846, | |
"src": "8557:11:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_FailureInfo_$16846_$", | |
"typeString": "type(enum ComptrollerErrorReporter.FailureInfo)" | |
} | |
}, | |
"id": 7068, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "8569:21:22", | |
"memberName": "EXIT_MARKET_REJECTION", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16829, | |
"src": "8557:33:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_FailureInfo_$16846", | |
"typeString": "enum ComptrollerErrorReporter.FailureInfo" | |
} | |
}, | |
{ | |
"id": 7069, | |
"name": "allowed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7053, | |
"src": "8592:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
}, | |
{ | |
"typeIdentifier": "t_enum$_FailureInfo_$16846", | |
"typeString": "enum ComptrollerErrorReporter.FailureInfo" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 7064, | |
"name": "failOpaque", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16917, | |
"src": "8529:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Error_$16825_$_t_enum$_FailureInfo_$16846_$_t_uint256_$returns$_t_uint256_$", | |
"typeString": "function (enum ComptrollerErrorReporter.Error,enum ComptrollerErrorReporter.FailureInfo,uint256) returns (uint256)" | |
} | |
}, | |
"id": 7070, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "8529:71:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 6999, | |
"id": 7071, | |
"nodeType": "Return", | |
"src": "8522:78:22" | |
} | |
] | |
} | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"id": 7077, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7002, | |
"src": "8656:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
{ | |
"expression": { | |
"id": 7078, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "8664:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 7079, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "8668:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "8664:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7076, | |
"name": "exitFromMarketInternal", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7212, | |
"src": "8633:22:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_CToken_$6186_$_t_address_$returns$_t_enum$_Error_$16825_$", | |
"typeString": "function (contract CToken,address) returns (enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7080, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "8633:42:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 7075, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "8628:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 7074, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8628:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7081, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "8628:48:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 6999, | |
"id": 7082, | |
"nodeType": "Return", | |
"src": "8621:55:22" | |
} | |
] | |
}, | |
"documentation": { | |
"id": 6992, | |
"nodeType": "StructuredDocumentation", | |
"src": "7128:373:22", | |
"text": " @notice Removes asset from sender's account liquidity calculation\n @dev Sender must not have an outstanding borrow balance in the asset,\n or be providing necessary collateral for an outstanding borrow.\n @param cTokenAddress The address of the asset to be removed\n @return Whether or not the account successfully exited the market" | |
}, | |
"functionSelector": "ede4edd0", | |
"id": 7084, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "exitMarket", | |
"nameLocation": "7515:10:22", | |
"nodeType": "FunctionDefinition", | |
"overrides": { | |
"id": 6996, | |
"nodeType": "OverrideSpecifier", | |
"overrides": [], | |
"src": "7549:8:22" | |
}, | |
"parameters": { | |
"id": 6995, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6994, | |
"mutability": "mutable", | |
"name": "cTokenAddress", | |
"nameLocation": "7534:13:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7084, | |
"src": "7526:21:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 6993, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "7526:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "7525:23:22" | |
}, | |
"returnParameters": { | |
"id": 6999, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 6998, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 7084, | |
"src": "7576:4:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 6997, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7576:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "7575:6:22" | |
}, | |
"scope": 10778, | |
"src": "7506:1177:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"body": { | |
"id": 7211, | |
"nodeType": "Block", | |
"src": "9082:1388:22", | |
"statements": [ | |
{ | |
"assignments": [ | |
7098 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7098, | |
"mutability": "mutable", | |
"name": "marketToExit", | |
"nameLocation": "9107:12:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7211, | |
"src": "9092:27:22", | |
"stateVariable": false, | |
"storageLocation": "storage", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage_ptr", | |
"typeString": "struct ComptrollerV2Storage.Market" | |
}, | |
"typeName": { | |
"id": 7097, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 7096, | |
"name": "Market", | |
"nameLocations": [ | |
"9092:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 10831, | |
"src": "9092:6:22" | |
}, | |
"referencedDeclaration": 10831, | |
"src": "9092:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage_ptr", | |
"typeString": "struct ComptrollerV2Storage.Market" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7105, | |
"initialValue": { | |
"baseExpression": { | |
"id": 7099, | |
"name": "markets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10837, | |
"src": "9122:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Market_$10831_storage_$", | |
"typeString": "mapping(address => struct ComptrollerV2Storage.Market storage ref)" | |
} | |
}, | |
"id": 7104, | |
"indexExpression": { | |
"arguments": [ | |
{ | |
"id": 7102, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7088, | |
"src": "9138:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
], | |
"id": 7101, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "9130:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 7100, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "9130:7:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7103, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "9130:15:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "9122:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage", | |
"typeString": "struct ComptrollerV2Storage.Market storage ref" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "9092:54:22" | |
}, | |
{ | |
"condition": { | |
"id": 7108, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "!", | |
"prefix": true, | |
"src": "9161:22:22", | |
"subExpression": { | |
"expression": { | |
"id": 7106, | |
"name": "marketToExit", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7098, | |
"src": "9162:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage_ptr", | |
"typeString": "struct ComptrollerV2Storage.Market storage pointer" | |
} | |
}, | |
"id": 7107, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "9175:8:22", | |
"memberName": "isListed", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10822, | |
"src": "9162:21:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 7113, | |
"nodeType": "IfStatement", | |
"src": "9157:132:22", | |
"trueBody": { | |
"id": 7112, | |
"nodeType": "Block", | |
"src": "9185:104:22", | |
"statements": [ | |
{ | |
"expression": { | |
"expression": { | |
"id": 7109, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "9255:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7110, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "9261:17:22", | |
"memberName": "MARKET_NOT_LISTED", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16812, | |
"src": "9255:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"functionReturnParameters": 7095, | |
"id": 7111, | |
"nodeType": "Return", | |
"src": "9248:30:22" | |
} | |
] | |
} | |
}, | |
{ | |
"condition": { | |
"id": 7118, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "!", | |
"prefix": true, | |
"src": "9387:41:22", | |
"subExpression": { | |
"baseExpression": { | |
"expression": { | |
"id": 7114, | |
"name": "marketToExit", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7098, | |
"src": "9388:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage_ptr", | |
"typeString": "struct ComptrollerV2Storage.Market storage pointer" | |
} | |
}, | |
"id": 7115, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "9401:17:22", | |
"memberName": "accountMembership", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10828, | |
"src": "9388:30:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$", | |
"typeString": "mapping(address => bool)" | |
} | |
}, | |
"id": 7117, | |
"indexExpression": { | |
"id": 7116, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7090, | |
"src": "9419:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "9388:40:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 7123, | |
"nodeType": "IfStatement", | |
"src": "9383:93:22", | |
"trueBody": { | |
"id": 7122, | |
"nodeType": "Block", | |
"src": "9430:46:22", | |
"statements": [ | |
{ | |
"expression": { | |
"expression": { | |
"id": 7119, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "9451:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7120, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "9457:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "9451:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"functionReturnParameters": 7095, | |
"id": 7121, | |
"nodeType": "Return", | |
"src": "9444:21:22" | |
} | |
] | |
} | |
}, | |
{ | |
"expression": { | |
"id": 7128, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "delete", | |
"prefix": true, | |
"src": "9539:47:22", | |
"subExpression": { | |
"baseExpression": { | |
"expression": { | |
"id": 7124, | |
"name": "marketToExit", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7098, | |
"src": "9546:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage_ptr", | |
"typeString": "struct ComptrollerV2Storage.Market storage pointer" | |
} | |
}, | |
"id": 7125, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "9559:17:22", | |
"memberName": "accountMembership", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10828, | |
"src": "9546:30:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$", | |
"typeString": "mapping(address => bool)" | |
} | |
}, | |
"id": 7127, | |
"indexExpression": { | |
"id": 7126, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7090, | |
"src": "9577:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "9546:40:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7129, | |
"nodeType": "ExpressionStatement", | |
"src": "9539:47:22" | |
}, | |
{ | |
"assignments": [ | |
7134 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7134, | |
"mutability": "mutable", | |
"name": "userAssetList", | |
"nameLocation": "9731:13:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7211, | |
"src": "9715:29:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_memory_ptr", | |
"typeString": "contract CToken[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 7132, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 7131, | |
"name": "CToken", | |
"nameLocations": [ | |
"9715:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "9715:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "9715:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"id": 7133, | |
"nodeType": "ArrayTypeName", | |
"src": "9715:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_storage_ptr", | |
"typeString": "contract CToken[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7138, | |
"initialValue": { | |
"baseExpression": { | |
"id": 7135, | |
"name": "accountAssets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10817, | |
"src": "9747:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_array$_t_contract$_CToken_$6186_$dyn_storage_$", | |
"typeString": "mapping(address => contract CToken[] storage ref)" | |
} | |
}, | |
"id": 7137, | |
"indexExpression": { | |
"id": 7136, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7090, | |
"src": "9761:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "9747:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_storage", | |
"typeString": "contract CToken[] storage ref" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "9715:55:22" | |
}, | |
{ | |
"assignments": [ | |
7140 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7140, | |
"mutability": "mutable", | |
"name": "len", | |
"nameLocation": "9785:3:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7211, | |
"src": "9780:8:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7139, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "9780:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7143, | |
"initialValue": { | |
"expression": { | |
"id": 7141, | |
"name": "userAssetList", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7134, | |
"src": "9791:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_memory_ptr", | |
"typeString": "contract CToken[] memory" | |
} | |
}, | |
"id": 7142, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "9805:6:22", | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "9791:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "9780:31:22" | |
}, | |
{ | |
"assignments": [ | |
7145 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7145, | |
"mutability": "mutable", | |
"name": "assetIndex", | |
"nameLocation": "9826:10:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7211, | |
"src": "9821:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7144, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "9821:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7147, | |
"initialValue": { | |
"id": 7146, | |
"name": "len", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7140, | |
"src": "9839:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "9821:21:22" | |
}, | |
{ | |
"body": { | |
"id": 7170, | |
"nodeType": "Block", | |
"src": "9883:126:22", | |
"statements": [ | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
"id": 7162, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"baseExpression": { | |
"id": 7158, | |
"name": "userAssetList", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7134, | |
"src": "9901:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_memory_ptr", | |
"typeString": "contract CToken[] memory" | |
} | |
}, | |
"id": 7160, | |
"indexExpression": { | |
"id": 7159, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7149, | |
"src": "9915:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "9901:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"id": 7161, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7088, | |
"src": "9921:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"src": "9901:26:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 7169, | |
"nodeType": "IfStatement", | |
"src": "9897:102:22", | |
"trueBody": { | |
"id": 7168, | |
"nodeType": "Block", | |
"src": "9929:70:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7165, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 7163, | |
"name": "assetIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7145, | |
"src": "9947:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 7164, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7149, | |
"src": "9960:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "9947:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7166, | |
"nodeType": "ExpressionStatement", | |
"src": "9947:14:22" | |
}, | |
{ | |
"id": 7167, | |
"nodeType": "Break", | |
"src": "9979:5:22" | |
} | |
] | |
} | |
} | |
] | |
}, | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7154, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7152, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7149, | |
"src": "9869:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"id": 7153, | |
"name": "len", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7140, | |
"src": "9873:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "9869:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 7171, | |
"initializationExpression": { | |
"assignments": [ | |
7149 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7149, | |
"mutability": "mutable", | |
"name": "i", | |
"nameLocation": "9862:1:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7171, | |
"src": "9857:6:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7148, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "9857:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7151, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 7150, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "9866:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "9857:10:22" | |
}, | |
"loopExpression": { | |
"expression": { | |
"id": 7156, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "++", | |
"prefix": false, | |
"src": "9878:3:22", | |
"subExpression": { | |
"id": 7155, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7149, | |
"src": "9878:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7157, | |
"nodeType": "ExpressionStatement", | |
"src": "9878:3:22" | |
}, | |
"nodeType": "ForStatement", | |
"src": "9852:157:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7175, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7173, | |
"name": "assetIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7145, | |
"src": "10122:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"id": 7174, | |
"name": "len", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7140, | |
"src": "10135:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10122:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
], | |
"id": 7172, | |
"name": "assert", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -3, | |
"src": "10115:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", | |
"typeString": "function (bool) pure" | |
} | |
}, | |
"id": 7176, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "10115:24:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7177, | |
"nodeType": "ExpressionStatement", | |
"src": "10115:24:22" | |
}, | |
{ | |
"assignments": [ | |
7182 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7182, | |
"mutability": "mutable", | |
"name": "storedList", | |
"nameLocation": "10255:10:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7211, | |
"src": "10238:27:22", | |
"stateVariable": false, | |
"storageLocation": "storage", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_storage_ptr", | |
"typeString": "contract CToken[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 7180, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 7179, | |
"name": "CToken", | |
"nameLocations": [ | |
"10238:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "10238:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "10238:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"id": 7181, | |
"nodeType": "ArrayTypeName", | |
"src": "10238:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_storage_ptr", | |
"typeString": "contract CToken[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7186, | |
"initialValue": { | |
"baseExpression": { | |
"id": 7183, | |
"name": "accountAssets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10817, | |
"src": "10268:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_array$_t_contract$_CToken_$6186_$dyn_storage_$", | |
"typeString": "mapping(address => contract CToken[] storage ref)" | |
} | |
}, | |
"id": 7185, | |
"indexExpression": { | |
"id": 7184, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7090, | |
"src": "10282:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "10268:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_storage", | |
"typeString": "contract CToken[] storage ref" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "10238:53:22" | |
}, | |
{ | |
"expression": { | |
"id": 7196, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"id": 7187, | |
"name": "storedList", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7182, | |
"src": "10301:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_storage_ptr", | |
"typeString": "contract CToken[] storage pointer" | |
} | |
}, | |
"id": 7189, | |
"indexExpression": { | |
"id": 7188, | |
"name": "assetIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7145, | |
"src": "10312:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "10301:22:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"baseExpression": { | |
"id": 7190, | |
"name": "storedList", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7182, | |
"src": "10326:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_storage_ptr", | |
"typeString": "contract CToken[] storage pointer" | |
} | |
}, | |
"id": 7195, | |
"indexExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7194, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"id": 7191, | |
"name": "storedList", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7182, | |
"src": "10337:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_storage_ptr", | |
"typeString": "contract CToken[] storage pointer" | |
} | |
}, | |
"id": 7192, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "10348:6:22", | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "10337:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"hexValue": "31", | |
"id": 7193, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "10357:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"src": "10337:21:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "10326:33:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"src": "10301:58:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"id": 7197, | |
"nodeType": "ExpressionStatement", | |
"src": "10301:58:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"id": 7198, | |
"name": "storedList", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7182, | |
"src": "10369:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CToken_$6186_$dyn_storage_ptr", | |
"typeString": "contract CToken[] storage pointer" | |
} | |
}, | |
"id": 7200, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "10380:3:22", | |
"memberName": "pop", | |
"nodeType": "MemberAccess", | |
"src": "10369:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_arraypop_nonpayable$_t_array$_t_contract$_CToken_$6186_$dyn_storage_ptr_$returns$__$attached_to$_t_array$_t_contract$_CToken_$6186_$dyn_storage_ptr_$", | |
"typeString": "function (contract CToken[] storage pointer)" | |
} | |
}, | |
"id": 7201, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "10369:16:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7202, | |
"nodeType": "ExpressionStatement", | |
"src": "10369:16:22" | |
}, | |
{ | |
"eventCall": { | |
"arguments": [ | |
{ | |
"id": 7204, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7088, | |
"src": "10414:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
{ | |
"id": 7205, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7090, | |
"src": "10422:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7203, | |
"name": "MarketExited", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6619, | |
"src": "10401:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_event_nonpayable$_t_contract$_CToken_$6186_$_t_address_$returns$__$", | |
"typeString": "function (contract CToken,address)" | |
} | |
}, | |
"id": 7206, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "10401:30:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7207, | |
"nodeType": "EmitStatement", | |
"src": "10396:35:22" | |
}, | |
{ | |
"expression": { | |
"expression": { | |
"id": 7208, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "10449:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7209, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "10455:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "10449:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"functionReturnParameters": 7095, | |
"id": 7210, | |
"nodeType": "Return", | |
"src": "10442:21:22" | |
} | |
] | |
}, | |
"documentation": { | |
"id": 7085, | |
"nodeType": "StructuredDocumentation", | |
"src": "8689:298:22", | |
"text": " @notice Removes asset from sender's account liquidity calculation\n @param cToken The address of the asset to be removed\n @param borrower The address of the account to remove the asset from\n @return Error Whether or not the account successfully exited the market" | |
}, | |
"id": 7212, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "exitFromMarketInternal", | |
"nameLocation": "9001:22:22", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 7091, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7088, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "9031:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7212, | |
"src": "9024:13:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
"typeName": { | |
"id": 7087, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 7086, | |
"name": "CToken", | |
"nameLocations": [ | |
"9024:6:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 6186, | |
"src": "9024:6:22" | |
}, | |
"referencedDeclaration": 6186, | |
"src": "9024:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7090, | |
"mutability": "mutable", | |
"name": "borrower", | |
"nameLocation": "9047:8:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7212, | |
"src": "9039:16:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 7089, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "9039:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "9023:33:22" | |
}, | |
"returnParameters": { | |
"id": 7095, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7094, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 7212, | |
"src": "9075:5:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
}, | |
"typeName": { | |
"id": 7093, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 7092, | |
"name": "Error", | |
"nameLocations": [ | |
"9075:5:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 16825, | |
"src": "9075:5:22" | |
}, | |
"referencedDeclaration": 16825, | |
"src": "9075:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "9074:7:22" | |
}, | |
"scope": 10778, | |
"src": "8992:1478:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "internal" | |
}, | |
{ | |
"baseFunctions": [ | |
16459 | |
], | |
"body": { | |
"id": 7311, | |
"nodeType": "Block", | |
"src": "10962:529:22", | |
"statements": [ | |
{ | |
"assignments": [ | |
7224 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7224, | |
"mutability": "mutable", | |
"name": "len", | |
"nameLocation": "10977:3:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7311, | |
"src": "10972:8:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7223, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10972:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7227, | |
"initialValue": { | |
"expression": { | |
"id": 7225, | |
"name": "cTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7216, | |
"src": "10983:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", | |
"typeString": "address[] memory" | |
} | |
}, | |
"id": 7226, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "10991:6:22", | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "10983:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "10972:25:22" | |
}, | |
{ | |
"assignments": [ | |
7232 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7232, | |
"mutability": "mutable", | |
"name": "results", | |
"nameLocation": "11022:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7311, | |
"src": "11008:21:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 7230, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11008:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7231, | |
"nodeType": "ArrayTypeName", | |
"src": "11008:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7238, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 7236, | |
"name": "len", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7224, | |
"src": "11043:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 7235, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "NewExpression", | |
"src": "11032:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "function (uint256) pure returns (uint256[] memory)" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 7233, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11036:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7234, | |
"nodeType": "ArrayTypeName", | |
"src": "11036:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
} | |
}, | |
"id": 7237, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "11032:15:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "11008:39:22" | |
}, | |
{ | |
"body": { | |
"id": 7307, | |
"nodeType": "Block", | |
"src": "11088:372:22", | |
"statements": [ | |
{ | |
"condition": { | |
"id": 7255, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "!", | |
"prefix": true, | |
"src": "11106:29:22", | |
"subExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 7249, | |
"name": "markets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10837, | |
"src": "11107:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Market_$10831_storage_$", | |
"typeString": "mapping(address => struct ComptrollerV2Storage.Market storage ref)" | |
} | |
}, | |
"id": 7253, | |
"indexExpression": { | |
"baseExpression": { | |
"id": 7250, | |
"name": "cTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7216, | |
"src": "11115:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", | |
"typeString": "address[] memory" | |
} | |
}, | |
"id": 7252, | |
"indexExpression": { | |
"id": 7251, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7240, | |
"src": "11123:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "11115:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "11107:19:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage", | |
"typeString": "struct ComptrollerV2Storage.Market storage ref" | |
} | |
}, | |
"id": 7254, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "11127:8:22", | |
"memberName": "isListed", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10822, | |
"src": "11107:28:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"falseBody": { | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7275, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"arguments": [ | |
{ | |
"baseExpression": { | |
"id": 7268, | |
"name": "cTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7216, | |
"src": "11229:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", | |
"typeString": "address[] memory" | |
} | |
}, | |
"id": 7270, | |
"indexExpression": { | |
"id": 7269, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7240, | |
"src": "11237:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "11229:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7267, | |
"name": "CToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6186, | |
"src": "11222:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_CToken_$6186_$", | |
"typeString": "type(contract CToken)" | |
} | |
}, | |
"id": 7271, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "11222:18:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"id": 7272, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "11241:10:22", | |
"memberName": "marketType", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 15955, | |
"src": "11222:29:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", | |
"typeString": "function () view external returns (uint256)" | |
} | |
}, | |
"id": 7273, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "11222:31:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "32", | |
"id": 7274, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "11257:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_2_by_1", | |
"typeString": "int_const 2" | |
}, | |
"value": "2" | |
}, | |
"src": "11222:36:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"falseBody": { | |
"id": 7304, | |
"nodeType": "Block", | |
"src": "11343:107:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7302, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"id": 7287, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7232, | |
"src": "11361:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 7289, | |
"indexExpression": { | |
"id": 7288, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7240, | |
"src": "11369:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "11361:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7298, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "11423:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 7299, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "11427:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "11423:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"expression": { | |
"arguments": [ | |
{ | |
"baseExpression": { | |
"id": 7293, | |
"name": "cTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7216, | |
"src": "11396:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", | |
"typeString": "address[] memory" | |
} | |
}, | |
"id": 7295, | |
"indexExpression": { | |
"id": 7294, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7240, | |
"src": "11404:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "11396:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7292, | |
"name": "CErc721Interface", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 15741, | |
"src": "11379:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_CErc721Interface_$15741_$", | |
"typeString": "type(contract CErc721Interface)" | |
} | |
}, | |
"id": 7296, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "11379:28:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CErc721Interface_$15741", | |
"typeString": "contract CErc721Interface" | |
} | |
}, | |
"id": 7297, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "11408:14:22", | |
"memberName": "redeemInterest", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 15548, | |
"src": "11379:43:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$_t_uint256_$", | |
"typeString": "function (address) external returns (uint256)" | |
} | |
}, | |
"id": 7300, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "11379:55:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 7291, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "11374:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 7290, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11374:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7301, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "11374:61:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "11361:74:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7303, | |
"nodeType": "ExpressionStatement", | |
"src": "11361:74:22" | |
} | |
] | |
}, | |
"id": 7305, | |
"nodeType": "IfStatement", | |
"src": "11218:232:22", | |
"trueBody": { | |
"id": 7286, | |
"nodeType": "Block", | |
"src": "11260:77:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7284, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"id": 7276, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7232, | |
"src": "11278:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 7278, | |
"indexExpression": { | |
"id": 7277, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7240, | |
"src": "11286:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "11278:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7281, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "11296:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7282, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "11302:19:22", | |
"memberName": "INVALID_MARKET_TYPE", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16821, | |
"src": "11296:25:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 7280, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "11291:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 7279, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11291:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7283, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "11291:31:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "11278:44:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7285, | |
"nodeType": "ExpressionStatement", | |
"src": "11278:44:22" | |
} | |
] | |
} | |
}, | |
"id": 7306, | |
"nodeType": "IfStatement", | |
"src": "11102:348:22", | |
"trueBody": { | |
"id": 7266, | |
"nodeType": "Block", | |
"src": "11137:75:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7264, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"id": 7256, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7232, | |
"src": "11155:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 7258, | |
"indexExpression": { | |
"id": 7257, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7240, | |
"src": "11163:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "11155:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7261, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "11173:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7262, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "11179:17:22", | |
"memberName": "MARKET_NOT_LISTED", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16812, | |
"src": "11173:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 7260, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "11168:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 7259, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11168:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7263, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "11168:29:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "11155:42:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7265, | |
"nodeType": "ExpressionStatement", | |
"src": "11155:42:22" | |
} | |
] | |
} | |
} | |
] | |
}, | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7245, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7243, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7240, | |
"src": "11074:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"id": 7244, | |
"name": "len", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7224, | |
"src": "11078:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "11074:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 7308, | |
"initializationExpression": { | |
"assignments": [ | |
7240 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7240, | |
"mutability": "mutable", | |
"name": "i", | |
"nameLocation": "11067:1:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7308, | |
"src": "11062:6:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7239, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11062:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7242, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 7241, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "11071:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "11062:10:22" | |
}, | |
"loopExpression": { | |
"expression": { | |
"id": 7247, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "++", | |
"prefix": false, | |
"src": "11083:3:22", | |
"subExpression": { | |
"id": 7246, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7240, | |
"src": "11083:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7248, | |
"nodeType": "ExpressionStatement", | |
"src": "11083:3:22" | |
}, | |
"nodeType": "ForStatement", | |
"src": "11057:403:22" | |
}, | |
{ | |
"expression": { | |
"id": 7309, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7232, | |
"src": "11477:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"functionReturnParameters": 7222, | |
"id": 7310, | |
"nodeType": "Return", | |
"src": "11470:14:22" | |
} | |
] | |
}, | |
"documentation": { | |
"id": 7213, | |
"nodeType": "StructuredDocumentation", | |
"src": "10476:388:22", | |
"text": " @notice Redeems the interest accrued for the given cTokens.\n @param cTokens The list of cToken addresses to redeem interest from.\n Only possible for cErc721 markets.\n @return uint[] Amount of interest redeemed for each corresponding cToken\n or Error.MARKET_NOT_LISTED, Error.INVALID_MARKET_TYPE for invalid markets." | |
}, | |
"functionSelector": "8a21f4ed", | |
"id": 7312, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "redeemAllInterest", | |
"nameLocation": "10878:17:22", | |
"nodeType": "FunctionDefinition", | |
"overrides": { | |
"id": 7218, | |
"nodeType": "OverrideSpecifier", | |
"overrides": [], | |
"src": "10922:8:22" | |
}, | |
"parameters": { | |
"id": 7217, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7216, | |
"mutability": "mutable", | |
"name": "cTokens", | |
"nameLocation": "10913:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7312, | |
"src": "10896:24:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", | |
"typeString": "address[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 7214, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "10896:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"id": 7215, | |
"nodeType": "ArrayTypeName", | |
"src": "10896:9:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", | |
"typeString": "address[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "10895:26:22" | |
}, | |
"returnParameters": { | |
"id": 7222, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7221, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 7312, | |
"src": "10947:13:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 7219, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10947:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7220, | |
"nodeType": "ArrayTypeName", | |
"src": "10947:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "10946:15:22" | |
}, | |
"scope": 10778, | |
"src": "10869:622:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 7471, | |
"nodeType": "Block", | |
"src": "12249:1499:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"baseExpression": { | |
"id": 7331, | |
"name": "adminWhitelist", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10968, | |
"src": "12267:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$", | |
"typeString": "mapping(address => bool)" | |
} | |
}, | |
"id": 7334, | |
"indexExpression": { | |
"expression": { | |
"id": 7332, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "12282:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 7333, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "12286:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "12282:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "12267:26:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "756e617574686f72697a6564", | |
"id": 7335, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12295:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_926a1b84b861d31f2d45224162461e1d5ff4377725d977d8f792bb84825a0348", | |
"typeString": "literal_string \"unauthorized\"" | |
}, | |
"value": "unauthorized" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_926a1b84b861d31f2d45224162461e1d5ff4377725d977d8f792bb84825a0348", | |
"typeString": "literal_string \"unauthorized\"" | |
} | |
], | |
"id": 7330, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "12259:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7336, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12259:51:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7337, | |
"nodeType": "ExpressionStatement", | |
"src": "12259:51:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 7340, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "!", | |
"prefix": true, | |
"src": "12328:20:22", | |
"subExpression": { | |
"id": 7339, | |
"name": "seizeGuardianPaused", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10848, | |
"src": "12329:19:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "7365697a6520697320706175736564", | |
"id": 7341, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12350:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_d90a41fca4bdd602e58925aa5ca016279f8a08da0f3958dcc966cb5624a4ebe8", | |
"typeString": "literal_string \"seize is paused\"" | |
}, | |
"value": "seize is paused" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_d90a41fca4bdd602e58925aa5ca016279f8a08da0f3958dcc966cb5624a4ebe8", | |
"typeString": "literal_string \"seize is paused\"" | |
} | |
], | |
"id": 7338, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "12320:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7342, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12320:48:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7343, | |
"nodeType": "ExpressionStatement", | |
"src": "12320:48:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7347, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7345, | |
"name": "maxTopUpTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7317, | |
"src": "12386:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 7346, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12404:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "12386:19:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "6d6178546f705570546f6b656e732069732030", | |
"id": 7348, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12407:21:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_8dca6486832abe9a8faaec3c00455454f764f0cb549d868a16d088f51e3987b1", | |
"typeString": "literal_string \"maxTopUpTokens is 0\"" | |
}, | |
"value": "maxTopUpTokens is 0" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_8dca6486832abe9a8faaec3c00455454f764f0cb549d868a16d088f51e3987b1", | |
"typeString": "literal_string \"maxTopUpTokens is 0\"" | |
} | |
], | |
"id": 7344, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "12378:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7349, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12378:51:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7350, | |
"nodeType": "ExpressionStatement", | |
"src": "12378:51:22" | |
}, | |
{ | |
"assignments": [ | |
7352, | |
null, | |
7354 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7352, | |
"mutability": "mutable", | |
"name": "err", | |
"nameLocation": "12446:3:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7471, | |
"src": "12441:8:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7351, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12441:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
null, | |
{ | |
"constant": false, | |
"id": 7354, | |
"mutability": "mutable", | |
"name": "shortfallUsd", | |
"nameLocation": "12458:12:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7471, | |
"src": "12453:17:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7353, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12453:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7358, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 7356, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7315, | |
"src": "12494:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7355, | |
"name": "getAccountLiquidity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8967, | |
"src": "12474:19:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$_t_uint256_$_t_uint256_$", | |
"typeString": "function (address) view returns (uint256,uint256,uint256)" | |
} | |
}, | |
"id": 7357, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12474:29:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", | |
"typeString": "tuple(uint256,uint256,uint256)" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "12440:63:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"id": 7370, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7366, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7360, | |
"name": "err", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7352, | |
"src": "12521:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7363, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "12533:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7364, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "12539:27:22", | |
"memberName": "TOO_LITTLE_INTEREST_RESERVE", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16822, | |
"src": "12533:33:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 7362, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "12528:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 7361, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12528:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7365, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12528:39:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12521:46:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "&&", | |
"rightExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7369, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7367, | |
"name": "shortfallUsd", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7354, | |
"src": "12571:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 7368, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12587:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "12571:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"src": "12521:67:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "494e53554646494349454e545f53484f525446414c4c", | |
"id": 7371, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12590:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_836be6d9dbc925eee1362f56b24eb63e5522340c3c5c12c9324e296187f83dd4", | |
"typeString": "literal_string \"INSUFFICIENT_SHORTFALL\"" | |
}, | |
"value": "INSUFFICIENT_SHORTFALL" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_836be6d9dbc925eee1362f56b24eb63e5522340c3c5c12c9324e296187f83dd4", | |
"typeString": "literal_string \"INSUFFICIENT_SHORTFALL\"" | |
} | |
], | |
"id": 7359, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "12513:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7372, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12513:102:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7373, | |
"nodeType": "ExpressionStatement", | |
"src": "12513:102:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"id": 7377, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7375, | |
"name": "cTokenInterestMarket", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7319, | |
"src": "12634:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"id": 7376, | |
"name": "cTokenCollateral", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7321, | |
"src": "12658:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"src": "12634:40:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "73616d65206d61726b6574", | |
"id": 7378, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12676:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_09333849941bf6b4f92adba68bbe53deb5733bedc42c62233738c535aa3d7e0c", | |
"typeString": "literal_string \"same market\"" | |
}, | |
"value": "same market" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_09333849941bf6b4f92adba68bbe53deb5733bedc42c62233738c535aa3d7e0c", | |
"typeString": "literal_string \"same market\"" | |
} | |
], | |
"id": 7374, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "12626:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7379, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12626:64:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7380, | |
"nodeType": "ExpressionStatement", | |
"src": "12626:64:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"id": 7390, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 7382, | |
"name": "markets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10837, | |
"src": "12708:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Market_$10831_storage_$", | |
"typeString": "mapping(address => struct ComptrollerV2Storage.Market storage ref)" | |
} | |
}, | |
"id": 7384, | |
"indexExpression": { | |
"id": 7383, | |
"name": "cTokenInterestMarket", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7319, | |
"src": "12716:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "12708:29:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage", | |
"typeString": "struct ComptrollerV2Storage.Market storage ref" | |
} | |
}, | |
"id": 7385, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "12738:8:22", | |
"memberName": "isListed", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10822, | |
"src": "12708:38:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "&&", | |
"rightExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 7386, | |
"name": "markets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10837, | |
"src": "12750:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Market_$10831_storage_$", | |
"typeString": "mapping(address => struct ComptrollerV2Storage.Market storage ref)" | |
} | |
}, | |
"id": 7388, | |
"indexExpression": { | |
"id": 7387, | |
"name": "cTokenCollateral", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7321, | |
"src": "12758:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "12750:25:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage", | |
"typeString": "struct ComptrollerV2Storage.Market storage ref" | |
} | |
}, | |
"id": 7389, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "12776:8:22", | |
"memberName": "isListed", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10822, | |
"src": "12750:34:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"src": "12708:76:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "6d61726b6574206e6f74206c6973746564", | |
"id": 7391, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12786:19:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_f09a85d62af12e510c62f89099671739dbbd53d1678428aa3344943aa87fea49", | |
"typeString": "literal_string \"market not listed\"" | |
}, | |
"value": "market not listed" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_f09a85d62af12e510c62f89099671739dbbd53d1678428aa3344943aa87fea49", | |
"typeString": "literal_string \"market not listed\"" | |
} | |
], | |
"id": 7381, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "12700:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7392, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12700:106:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7393, | |
"nodeType": "ExpressionStatement", | |
"src": "12700:106:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7401, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 7396, | |
"name": "cTokenInterestMarket", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7319, | |
"src": "12840:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7395, | |
"name": "CTokenInterface", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16294, | |
"src": "12824:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_CTokenInterface_$16294_$", | |
"typeString": "type(contract CTokenInterface)" | |
} | |
}, | |
"id": 7397, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12824:37:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CTokenInterface_$16294", | |
"typeString": "contract CTokenInterface" | |
} | |
}, | |
"id": 7398, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "12862:10:22", | |
"memberName": "marketType", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 15955, | |
"src": "12824:48:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", | |
"typeString": "function () view external returns (uint256)" | |
} | |
}, | |
"id": 7399, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12824:50:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"hexValue": "33", | |
"id": 7400, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12878:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_3_by_1", | |
"typeString": "int_const 3" | |
}, | |
"value": "3" | |
}, | |
"src": "12824:55:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "77726f6e67206d61726b6574", | |
"id": 7402, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12881:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_8949b29f6f88849142b6b6f69f149f8900ad48d188a04649fae3d74a947a4450", | |
"typeString": "literal_string \"wrong market\"" | |
}, | |
"value": "wrong market" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_8949b29f6f88849142b6b6f69f149f8900ad48d188a04649fae3d74a947a4450", | |
"typeString": "literal_string \"wrong market\"" | |
} | |
], | |
"id": 7394, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "12816:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7403, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12816:80:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7404, | |
"nodeType": "ExpressionStatement", | |
"src": "12816:80:22" | |
}, | |
{ | |
"expression": { | |
"id": 7411, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 7405, | |
"name": "shortfallUsd", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7354, | |
"src": "12992:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7410, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7408, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7406, | |
"name": "shortfallUsd", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7354, | |
"src": "13007:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"hexValue": "313035", | |
"id": 7407, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "13022:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_105_by_1", | |
"typeString": "int_const 105" | |
}, | |
"value": "105" | |
}, | |
"src": "13007:18:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"hexValue": "313030", | |
"id": 7409, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "13028:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_100_by_1", | |
"typeString": "int_const 100" | |
}, | |
"value": "100" | |
}, | |
"src": "13007:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12992:39:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7412, | |
"nodeType": "ExpressionStatement", | |
"src": "12992:39:22" | |
}, | |
{ | |
"assignments": [ | |
7414, | |
7416 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7414, | |
"mutability": "mutable", | |
"name": "actualTopUpTokens", | |
"nameLocation": "13048:17:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7471, | |
"src": "13043:22:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7413, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "13043:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7416, | |
"mutability": "mutable", | |
"name": "actualSeizeTokens", | |
"nameLocation": "13072:17:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7471, | |
"src": "13067:22:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7415, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "13067:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7423, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 7418, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7315, | |
"src": "13112:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7419, | |
"name": "shortfallUsd", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7354, | |
"src": "13122:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 7420, | |
"name": "cTokenInterestMarket", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7319, | |
"src": "13136:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7421, | |
"name": "cTokenCollateral", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7321, | |
"src": "13158:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7417, | |
"name": "_adjustTopUpValues", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 9695, | |
"src": "13093:18:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_address_$_t_address_$returns$_t_uint256_$_t_uint256_$", | |
"typeString": "function (address,uint256,address,address) view returns (uint256,uint256)" | |
} | |
}, | |
"id": 7422, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13093:82:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", | |
"typeString": "tuple(uint256,uint256)" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "13042:133:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7427, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7425, | |
"name": "maxTopUpTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7317, | |
"src": "13193:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": ">=", | |
"rightExpression": { | |
"id": 7426, | |
"name": "actualTopUpTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7414, | |
"src": "13211:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "13193:35:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "6d6178206578636565646564", | |
"id": 7428, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "13230:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_ca0e6d0afd04ec71159f7ca1ff98b9849d6a54dc4574049873d671742ad8fc12", | |
"typeString": "literal_string \"max exceeded\"" | |
}, | |
"value": "max exceeded" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_ca0e6d0afd04ec71159f7ca1ff98b9849d6a54dc4574049873d671742ad8fc12", | |
"typeString": "literal_string \"max exceeded\"" | |
} | |
], | |
"id": 7424, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "13185:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7429, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13185:60:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7430, | |
"nodeType": "ExpressionStatement", | |
"src": "13185:60:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7442, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7436, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "13329:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 7437, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "13333:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "13329:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7438, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7315, | |
"src": "13341:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7439, | |
"name": "actualSeizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7416, | |
"src": "13351:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 7433, | |
"name": "cTokenCollateral", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7321, | |
"src": "13304:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7432, | |
"name": "CTokenInterface", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16294, | |
"src": "13288:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_CTokenInterface_$16294_$", | |
"typeString": "type(contract CTokenInterface)" | |
} | |
}, | |
"id": 7434, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13288:33:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CTokenInterface_$16294", | |
"typeString": "contract CTokenInterface" | |
} | |
}, | |
"id": 7435, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "13322:6:22", | |
"memberName": "_seize", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16244, | |
"src": "13288:40:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", | |
"typeString": "function (address,address,uint256) external returns (uint256)" | |
} | |
}, | |
"id": 7440, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13288:81:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"id": 7441, | |
"name": "actualSeizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7416, | |
"src": "13373:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "13288:102:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "746f6b656e207365697a757265206661696c6564", | |
"id": 7443, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "13392:22:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_ef895053050823f299d1eac7edac9fbaf6b5ee335d1b858874856cee7182bcda", | |
"typeString": "literal_string \"token seizure failed\"" | |
}, | |
"value": "token seizure failed" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_ef895053050823f299d1eac7edac9fbaf6b5ee335d1b858874856cee7182bcda", | |
"typeString": "literal_string \"token seizure failed\"" | |
} | |
], | |
"id": 7431, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "13280:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7444, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13280:135:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7445, | |
"nodeType": "ExpressionStatement", | |
"src": "13280:135:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7451, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "13502:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 7452, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "13506:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "13502:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7453, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7315, | |
"src": "13514:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7454, | |
"name": "actualTopUpTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7414, | |
"src": "13524:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 7448, | |
"name": "cTokenInterestMarket", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7319, | |
"src": "13467:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7447, | |
"name": "CToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6186, | |
"src": "13460:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_CToken_$6186_$", | |
"typeString": "type(contract CToken)" | |
} | |
}, | |
"id": 7449, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13460:28:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
"id": 7450, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "13489:12:22", | |
"memberName": "transferFrom", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 4377, | |
"src": "13460:41:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", | |
"typeString": "function (address,address,uint256) external returns (bool)" | |
} | |
}, | |
"id": 7455, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13460:82:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "746f707570206661696c6564", | |
"id": 7456, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "13544:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_fbede6495418c000d37630e12badf10d6025bc43decdc7c8d585a352082a6299", | |
"typeString": "literal_string \"topup failed\"" | |
}, | |
"value": "topup failed" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_fbede6495418c000d37630e12badf10d6025bc43decdc7c8d585a352082a6299", | |
"typeString": "literal_string \"topup failed\"" | |
} | |
], | |
"id": 7446, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "13452:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7457, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13452:107:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7458, | |
"nodeType": "ExpressionStatement", | |
"src": "13452:107:22" | |
}, | |
{ | |
"eventCall": { | |
"arguments": [ | |
{ | |
"id": 7460, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7315, | |
"src": "13598:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7461, | |
"name": "cTokenInterestMarket", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7319, | |
"src": "13608:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7462, | |
"name": "cTokenCollateral", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7321, | |
"src": "13630:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7463, | |
"name": "actualTopUpTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7414, | |
"src": "13648:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 7464, | |
"name": "actualSeizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7416, | |
"src": "13667:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 7459, | |
"name": "InterestShortfallTopUp", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6721, | |
"src": "13575:22:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", | |
"typeString": "function (address,address,address,uint256,uint256)" | |
} | |
}, | |
"id": 7465, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13575:110:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7466, | |
"nodeType": "EmitStatement", | |
"src": "13570:115:22" | |
}, | |
{ | |
"expression": { | |
"components": [ | |
{ | |
"id": 7467, | |
"name": "actualTopUpTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7414, | |
"src": "13704:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 7468, | |
"name": "actualSeizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7416, | |
"src": "13723:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 7469, | |
"isConstant": false, | |
"isInlineArray": true, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "13703:38:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", | |
"typeString": "uint256[2] memory" | |
} | |
}, | |
"functionReturnParameters": 7329, | |
"id": 7470, | |
"nodeType": "Return", | |
"src": "13696:45:22" | |
} | |
] | |
}, | |
"documentation": { | |
"id": 7313, | |
"nodeType": "StructuredDocumentation", | |
"src": "11497:573:22", | |
"text": " @notice Topup interest shortfall of a borrower and seize collateral tokens.\n @param borrower The borrower whose shortfall to topup\n @param maxTopUpTokens Maximum amount of shortfall to topup (actual amount will be <= maxTopUpTokens)\n The caller must have enough tokens of the interest market\n @param cTokenInterestMarket The market where the borrower has the shortfall\n @param cTokenCollateral The market where the collateral is held\n @return (uint, uint) Actual topup amount, actual seize amount" | |
}, | |
"functionSelector": "e1884014", | |
"id": 7472, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [ | |
{ | |
"id": 7324, | |
"kind": "modifierInvocation", | |
"modifierName": { | |
"id": 7323, | |
"name": "nonReentrant", | |
"nameLocations": [ | |
"12211:12:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 10986, | |
"src": "12211:12:22" | |
}, | |
"nodeType": "ModifierInvocation", | |
"src": "12211:12:22" | |
} | |
], | |
"name": "topUpInterestShortfall", | |
"nameLocation": "12084:22:22", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 7322, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7315, | |
"mutability": "mutable", | |
"name": "borrower", | |
"nameLocation": "12115:8:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7472, | |
"src": "12107:16:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 7314, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "12107:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7317, | |
"mutability": "mutable", | |
"name": "maxTopUpTokens", | |
"nameLocation": "12130:14:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7472, | |
"src": "12125:19:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7316, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12125:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7319, | |
"mutability": "mutable", | |
"name": "cTokenInterestMarket", | |
"nameLocation": "12154:20:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7472, | |
"src": "12146:28:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 7318, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "12146:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7321, | |
"mutability": "mutable", | |
"name": "cTokenCollateral", | |
"nameLocation": "12184:16:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7472, | |
"src": "12176:24:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 7320, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "12176:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "12106:95:22" | |
}, | |
"returnParameters": { | |
"id": 7329, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7328, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 7472, | |
"src": "12233:14:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", | |
"typeString": "uint256[2]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 7325, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12233:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7327, | |
"length": { | |
"hexValue": "32", | |
"id": 7326, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12238:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_2_by_1", | |
"typeString": "int_const 2" | |
}, | |
"value": "2" | |
}, | |
"nodeType": "ArrayTypeName", | |
"src": "12233:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr", | |
"typeString": "uint256[2]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "12232:16:22" | |
}, | |
"scope": 10778, | |
"src": "12075:1673:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"canonicalName": "Comptroller.Liquidatables", | |
"id": 7480, | |
"members": [ | |
{ | |
"constant": false, | |
"id": 7474, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "13793:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7480, | |
"src": "13785:14:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 7473, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "13785:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7476, | |
"mutability": "mutable", | |
"name": "amount", | |
"nameLocation": "13836:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7480, | |
"src": "13831:11:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7475, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "13831:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7479, | |
"mutability": "mutable", | |
"name": "nftIds", | |
"nameLocation": "13881:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7480, | |
"src": "13874:13:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 7477, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "13874:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7478, | |
"nodeType": "ArrayTypeName", | |
"src": "13874:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"name": "Liquidatables", | |
"nameLocation": "13761:13:22", | |
"nodeType": "StructDefinition", | |
"scope": 10778, | |
"src": "13754:156:22", | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 7870, | |
"nodeType": "Block", | |
"src": "14676:3751:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"baseExpression": { | |
"id": 7502, | |
"name": "adminWhitelist", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10968, | |
"src": "14694:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$", | |
"typeString": "mapping(address => bool)" | |
} | |
}, | |
"id": 7505, | |
"indexExpression": { | |
"expression": { | |
"id": 7503, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "14709:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 7504, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "14713:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "14709:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "14694:26:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "756e617574686f72697a6564", | |
"id": 7506, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "14722:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_926a1b84b861d31f2d45224162461e1d5ff4377725d977d8f792bb84825a0348", | |
"typeString": "literal_string \"unauthorized\"" | |
}, | |
"value": "unauthorized" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_926a1b84b861d31f2d45224162461e1d5ff4377725d977d8f792bb84825a0348", | |
"typeString": "literal_string \"unauthorized\"" | |
} | |
], | |
"id": 7501, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "14686:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7507, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14686:51:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7508, | |
"nodeType": "ExpressionStatement", | |
"src": "14686:51:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 7511, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "!", | |
"prefix": true, | |
"src": "14755:20:22", | |
"subExpression": { | |
"id": 7510, | |
"name": "seizeGuardianPaused", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10848, | |
"src": "14756:19:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "7365697a6520697320706175736564", | |
"id": 7512, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "14777:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_d90a41fca4bdd602e58925aa5ca016279f8a08da0f3958dcc966cb5624a4ebe8", | |
"typeString": "literal_string \"seize is paused\"" | |
}, | |
"value": "seize is paused" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_d90a41fca4bdd602e58925aa5ca016279f8a08da0f3958dcc966cb5624a4ebe8", | |
"typeString": "literal_string \"seize is paused\"" | |
} | |
], | |
"id": 7509, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "14747:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7513, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14747:48:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7514, | |
"nodeType": "ExpressionStatement", | |
"src": "14747:48:22" | |
}, | |
{ | |
"assignments": [ | |
7516, | |
7518 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7516, | |
"mutability": "mutable", | |
"name": "err", | |
"nameLocation": "14812:3:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7870, | |
"src": "14807:8:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7515, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "14807:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7518, | |
"mutability": "mutable", | |
"name": "beforeRatio", | |
"nameLocation": "14822:11:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7870, | |
"src": "14817:16:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7517, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "14817:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7522, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 7520, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7483, | |
"src": "14857:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7519, | |
"name": "getAccountDebtRatio", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8923, | |
"src": "14837:19:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$_t_uint256_$", | |
"typeString": "function (address) view returns (uint256,uint256)" | |
} | |
}, | |
"id": 7521, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14837:29:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", | |
"typeString": "tuple(uint256,uint256)" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "14806:60:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"id": 7534, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7530, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7524, | |
"name": "err", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7516, | |
"src": "14884:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7527, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "14896:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7528, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "14902:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "14896:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 7526, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "14891:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 7525, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "14891:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7529, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14891:20:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "14884:27:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "&&", | |
"rightExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7533, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7531, | |
"name": "beforeRatio", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7518, | |
"src": "14915:11:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 7532, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "14930:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "14915:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"src": "14884:47:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "494e53554646494349454e545f53484f525446414c4c", | |
"id": 7535, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "14933:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_836be6d9dbc925eee1362f56b24eb63e5522340c3c5c12c9324e296187f83dd4", | |
"typeString": "literal_string \"INSUFFICIENT_SHORTFALL\"" | |
}, | |
"value": "INSUFFICIENT_SHORTFALL" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_836be6d9dbc925eee1362f56b24eb63e5522340c3c5c12c9324e296187f83dd4", | |
"typeString": "literal_string \"INSUFFICIENT_SHORTFALL\"" | |
} | |
], | |
"id": 7523, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "14876:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7536, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14876:82:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7537, | |
"nodeType": "ExpressionStatement", | |
"src": "14876:82:22" | |
}, | |
{ | |
"expression": { | |
"id": 7547, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"id": 7538, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7499, | |
"src": "14969:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_array$_t_uint256_$dyn_memory_ptr_$2_memory_ptr", | |
"typeString": "uint256[] memory[2] memory" | |
} | |
}, | |
"id": 7540, | |
"indexExpression": { | |
"hexValue": "30", | |
"id": 7539, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "14977:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "14969:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7544, | |
"name": "liquidatables", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7487, | |
"src": "14993:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Liquidatables_$7480_memory_ptr_$dyn_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory[] memory" | |
} | |
}, | |
"id": 7545, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15007:6:22", | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "14993:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 7543, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "NewExpression", | |
"src": "14982:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "function (uint256) pure returns (uint256[] memory)" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 7541, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "14986:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7542, | |
"nodeType": "ArrayTypeName", | |
"src": "14986:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
} | |
}, | |
"id": 7546, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14982:32:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"src": "14969:45:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 7548, | |
"nodeType": "ExpressionStatement", | |
"src": "14969:45:22" | |
}, | |
{ | |
"expression": { | |
"id": 7558, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"id": 7549, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7499, | |
"src": "15024:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_array$_t_uint256_$dyn_memory_ptr_$2_memory_ptr", | |
"typeString": "uint256[] memory[2] memory" | |
} | |
}, | |
"id": 7551, | |
"indexExpression": { | |
"hexValue": "31", | |
"id": 7550, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "15032:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "15024:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7555, | |
"name": "cTokenCollaterals", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7491, | |
"src": "15048:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CTokenInterface_$16294_$dyn_memory_ptr", | |
"typeString": "contract CTokenInterface[] memory" | |
} | |
}, | |
"id": 7556, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15066:6:22", | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "15048:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 7554, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "NewExpression", | |
"src": "15037:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "function (uint256) pure returns (uint256[] memory)" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 7552, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "15041:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7553, | |
"nodeType": "ArrayTypeName", | |
"src": "15041:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
} | |
}, | |
"id": 7557, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "15037:36:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"src": "15024:49:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 7559, | |
"nodeType": "ExpressionStatement", | |
"src": "15024:49:22" | |
}, | |
{ | |
"assignments": [ | |
7562 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7562, | |
"mutability": "mutable", | |
"name": "oracle_", | |
"nameLocation": "15096:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7870, | |
"src": "15084:19:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_PriceOracle_$12027", | |
"typeString": "contract PriceOracle" | |
}, | |
"typeName": { | |
"id": 7561, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 7560, | |
"name": "PriceOracle", | |
"nameLocations": [ | |
"15084:11:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 12027, | |
"src": "15084:11:22" | |
}, | |
"referencedDeclaration": 12027, | |
"src": "15084:11:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_PriceOracle_$12027", | |
"typeString": "contract PriceOracle" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7564, | |
"initialValue": { | |
"id": 7563, | |
"name": "oracle", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10801, | |
"src": "15106:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_PriceOracle_$12027", | |
"typeString": "contract PriceOracle" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "15084:28:22" | |
}, | |
{ | |
"assignments": [ | |
7566 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7566, | |
"mutability": "mutable", | |
"name": "liquidatedValueTotal", | |
"nameLocation": "15129:20:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7870, | |
"src": "15124:25:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7565, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "15124:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7567, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "15124:25:22" | |
}, | |
{ | |
"id": 7686, | |
"nodeType": "Block", | |
"src": "15159:942:22", | |
"statements": [ | |
{ | |
"body": { | |
"id": 7677, | |
"nodeType": "Block", | |
"src": "15217:817:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"baseExpression": { | |
"id": 7577, | |
"name": "markets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10837, | |
"src": "15244:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Market_$10831_storage_$", | |
"typeString": "mapping(address => struct ComptrollerV2Storage.Market storage ref)" | |
} | |
}, | |
"id": 7582, | |
"indexExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 7578, | |
"name": "liquidatables", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7487, | |
"src": "15252:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Liquidatables_$7480_memory_ptr_$dyn_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory[] memory" | |
} | |
}, | |
"id": 7580, | |
"indexExpression": { | |
"id": 7579, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7569, | |
"src": "15266:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "15252:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Liquidatables_$7480_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory" | |
} | |
}, | |
"id": 7581, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15269:6:22", | |
"memberName": "cToken", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 7474, | |
"src": "15252:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "15244:32:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage", | |
"typeString": "struct ComptrollerV2Storage.Market storage ref" | |
} | |
}, | |
"id": 7583, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15277:8:22", | |
"memberName": "isListed", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10822, | |
"src": "15244:41:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "6d61726b6574206e6f74206c6973746564", | |
"id": 7584, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "15287:19:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_f09a85d62af12e510c62f89099671739dbbd53d1678428aa3344943aa87fea49", | |
"typeString": "literal_string \"market not listed\"" | |
}, | |
"value": "market not listed" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_f09a85d62af12e510c62f89099671739dbbd53d1678428aa3344943aa87fea49", | |
"typeString": "literal_string \"market not listed\"" | |
} | |
], | |
"id": 7576, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "15236:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7585, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "15236:71:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7586, | |
"nodeType": "ExpressionStatement", | |
"src": "15236:71:22" | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7592, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 7587, | |
"name": "liquidatables", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7487, | |
"src": "15330:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Liquidatables_$7480_memory_ptr_$dyn_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory[] memory" | |
} | |
}, | |
"id": 7589, | |
"indexExpression": { | |
"id": 7588, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7569, | |
"src": "15344:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "15330:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Liquidatables_$7480_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory" | |
} | |
}, | |
"id": 7590, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15347:6:22", | |
"memberName": "amount", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 7476, | |
"src": "15330:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 7591, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "15357:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "15330:28:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"falseBody": { | |
"id": 7638, | |
"nodeType": "Block", | |
"src": "15527:162:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7636, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"baseExpression": { | |
"id": 7616, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7499, | |
"src": "15549:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_array$_t_uint256_$dyn_memory_ptr_$2_memory_ptr", | |
"typeString": "uint256[] memory[2] memory" | |
} | |
}, | |
"id": 7619, | |
"indexExpression": { | |
"hexValue": "30", | |
"id": 7617, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "15557:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "15549:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 7620, | |
"indexExpression": { | |
"id": 7618, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7569, | |
"src": "15560:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "15549:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7628, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "15624:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 7629, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15628:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "15624:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7630, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7483, | |
"src": "15636:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"expression": { | |
"baseExpression": { | |
"id": 7631, | |
"name": "liquidatables", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7487, | |
"src": "15646:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Liquidatables_$7480_memory_ptr_$dyn_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory[] memory" | |
} | |
}, | |
"id": 7633, | |
"indexExpression": { | |
"id": 7632, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7569, | |
"src": "15660:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "15646:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Liquidatables_$7480_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory" | |
} | |
}, | |
"id": 7634, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15663:6:22", | |
"memberName": "nftIds", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 7479, | |
"src": "15646:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
], | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"baseExpression": { | |
"id": 7622, | |
"name": "liquidatables", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7487, | |
"src": "15582:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Liquidatables_$7480_memory_ptr_$dyn_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory[] memory" | |
} | |
}, | |
"id": 7624, | |
"indexExpression": { | |
"id": 7623, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7569, | |
"src": "15596:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "15582:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Liquidatables_$7480_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory" | |
} | |
}, | |
"id": 7625, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15599:6:22", | |
"memberName": "cToken", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 7474, | |
"src": "15582:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7621, | |
"name": "CErc721Interface", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 15741, | |
"src": "15565:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_CErc721Interface_$15741_$", | |
"typeString": "type(contract CErc721Interface)" | |
} | |
}, | |
"id": 7626, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "15565:41:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CErc721Interface_$15741", | |
"typeString": "contract CErc721Interface" | |
} | |
}, | |
"id": 7627, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15607:16:22", | |
"memberName": "_liquidateBorrow", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 15681, | |
"src": "15565:58:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$", | |
"typeString": "function (address,address,uint256[] memory) external returns (uint256)" | |
} | |
}, | |
"id": 7635, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "15565:105:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "15549:121:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7637, | |
"nodeType": "ExpressionStatement", | |
"src": "15549:121:22" | |
} | |
] | |
}, | |
"id": 7639, | |
"nodeType": "IfStatement", | |
"src": "15326:363:22", | |
"trueBody": { | |
"id": 7615, | |
"nodeType": "Block", | |
"src": "15360:161:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7613, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"baseExpression": { | |
"id": 7593, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7499, | |
"src": "15382:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_array$_t_uint256_$dyn_memory_ptr_$2_memory_ptr", | |
"typeString": "uint256[] memory[2] memory" | |
} | |
}, | |
"id": 7596, | |
"indexExpression": { | |
"hexValue": "30", | |
"id": 7594, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "15390:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "15382:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 7597, | |
"indexExpression": { | |
"id": 7595, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7569, | |
"src": "15393:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "15382:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7605, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "15456:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 7606, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15460:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "15456:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7607, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7483, | |
"src": "15468:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"expression": { | |
"baseExpression": { | |
"id": 7608, | |
"name": "liquidatables", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7487, | |
"src": "15478:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Liquidatables_$7480_memory_ptr_$dyn_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory[] memory" | |
} | |
}, | |
"id": 7610, | |
"indexExpression": { | |
"id": 7609, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7569, | |
"src": "15492:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "15478:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Liquidatables_$7480_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory" | |
} | |
}, | |
"id": 7611, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15495:6:22", | |
"memberName": "amount", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 7476, | |
"src": "15478:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"baseExpression": { | |
"id": 7599, | |
"name": "liquidatables", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7487, | |
"src": "15414:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Liquidatables_$7480_memory_ptr_$dyn_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory[] memory" | |
} | |
}, | |
"id": 7601, | |
"indexExpression": { | |
"id": 7600, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7569, | |
"src": "15428:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "15414:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Liquidatables_$7480_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory" | |
} | |
}, | |
"id": 7602, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15431:6:22", | |
"memberName": "cToken", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 7474, | |
"src": "15414:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7598, | |
"name": "CErc20Interface", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16381, | |
"src": "15398:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_CErc20Interface_$16381_$", | |
"typeString": "type(contract CErc20Interface)" | |
} | |
}, | |
"id": 7603, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "15398:40:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CErc20Interface_$16381", | |
"typeString": "contract CErc20Interface" | |
} | |
}, | |
"id": 7604, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15439:16:22", | |
"memberName": "_liquidateBorrow", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16373, | |
"src": "15398:57:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", | |
"typeString": "function (address,address,uint256) external returns (uint256)" | |
} | |
}, | |
"id": 7612, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "15398:104:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "15382:120:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7614, | |
"nodeType": "ExpressionStatement", | |
"src": "15382:120:22" | |
} | |
] | |
} | |
}, | |
{ | |
"assignments": [ | |
7641 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7641, | |
"mutability": "mutable", | |
"name": "priceMantissa", | |
"nameLocation": "15712:13:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7677, | |
"src": "15707:18:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7640, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "15707:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7651, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"expression": { | |
"baseExpression": { | |
"id": 7645, | |
"name": "liquidatables", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7487, | |
"src": "15762:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Liquidatables_$7480_memory_ptr_$dyn_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory[] memory" | |
} | |
}, | |
"id": 7647, | |
"indexExpression": { | |
"id": 7646, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7569, | |
"src": "15776:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "15762:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Liquidatables_$7480_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory" | |
} | |
}, | |
"id": 7648, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15779:6:22", | |
"memberName": "cToken", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 7474, | |
"src": "15762:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7644, | |
"name": "CToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6186, | |
"src": "15755:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_CToken_$6186_$", | |
"typeString": "type(contract CToken)" | |
} | |
}, | |
"id": 7649, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "15755:31:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
], | |
"expression": { | |
"id": 7642, | |
"name": "oracle_", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7562, | |
"src": "15728:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_PriceOracle_$12027", | |
"typeString": "contract PriceOracle" | |
} | |
}, | |
"id": 7643, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15736:18:22", | |
"memberName": "getUnderlyingPrice", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 12026, | |
"src": "15728:26:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$_t_contract$_CToken_$6186_$returns$_t_uint256_$", | |
"typeString": "function (contract CToken) view external returns (uint256)" | |
} | |
}, | |
"id": 7650, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "15728:59:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "15707:80:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7655, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7653, | |
"name": "priceMantissa", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7641, | |
"src": "15813:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 7654, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "15830:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "15813:18:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "50524943455f4552524f52", | |
"id": 7656, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "15833:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_2785a2effea3a89e90e0a799ac87a48f4911c06952a952a712999d0310d0d64e", | |
"typeString": "literal_string \"PRICE_ERROR\"" | |
}, | |
"value": "PRICE_ERROR" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_2785a2effea3a89e90e0a799ac87a48f4911c06952a952a712999d0310d0d64e", | |
"typeString": "literal_string \"PRICE_ERROR\"" | |
} | |
], | |
"id": 7652, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "15805:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7657, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "15805:42:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7658, | |
"nodeType": "ExpressionStatement", | |
"src": "15805:42:22" | |
}, | |
{ | |
"expression": { | |
"id": 7671, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 7659, | |
"name": "liquidatedValueTotal", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7566, | |
"src": "15866:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"id": 7662, | |
"name": "priceMantissa", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7641, | |
"src": "15930:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 7661, | |
"name": "Exp", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 17040, | |
"src": "15915:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_struct$_Exp_$17040_storage_ptr_$", | |
"typeString": "type(struct ExponentialNoError.Exp storage pointer)" | |
} | |
}, | |
"id": 7663, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "structConstructorCall", | |
"lValueRequested": false, | |
"nameLocations": [ | |
"15920:8:22" | |
], | |
"names": [ | |
"mantissa" | |
], | |
"nodeType": "FunctionCall", | |
"src": "15915:30:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Exp_$17040_memory_ptr", | |
"typeString": "struct ExponentialNoError.Exp memory" | |
} | |
}, | |
{ | |
"baseExpression": { | |
"baseExpression": { | |
"id": 7664, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7499, | |
"src": "15947:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_array$_t_uint256_$dyn_memory_ptr_$2_memory_ptr", | |
"typeString": "uint256[] memory[2] memory" | |
} | |
}, | |
"id": 7666, | |
"indexExpression": { | |
"hexValue": "30", | |
"id": 7665, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "15955:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "15947:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 7668, | |
"indexExpression": { | |
"id": 7667, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7569, | |
"src": "15958:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "15947:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 7669, | |
"name": "liquidatedValueTotal", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7566, | |
"src": "15962:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_struct$_Exp_$17040_memory_ptr", | |
"typeString": "struct ExponentialNoError.Exp memory" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 7660, | |
"name": "mul_ScalarTruncateAddUInt", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 17111, | |
"src": "15889:25:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_struct$_Exp_$17040_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", | |
"typeString": "function (struct ExponentialNoError.Exp memory,uint256,uint256) pure returns (uint256)" | |
} | |
}, | |
"id": 7670, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "15889:94:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "15866:117:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7672, | |
"nodeType": "ExpressionStatement", | |
"src": "15866:117:22" | |
}, | |
{ | |
"id": 7676, | |
"nodeType": "UncheckedBlock", | |
"src": "16002:18:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7674, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "++", | |
"prefix": false, | |
"src": "16014:3:22", | |
"subExpression": { | |
"id": 7673, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7569, | |
"src": "16014:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7675, | |
"nodeType": "ExpressionStatement", | |
"src": "16014:3:22" | |
} | |
] | |
} | |
] | |
}, | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7575, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7572, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7569, | |
"src": "15190:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"expression": { | |
"id": 7573, | |
"name": "liquidatables", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7487, | |
"src": "15194:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Liquidatables_$7480_memory_ptr_$dyn_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables memory[] memory" | |
} | |
}, | |
"id": 7574, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "15208:6:22", | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "15194:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "15190:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 7678, | |
"initializationExpression": { | |
"assignments": [ | |
7569 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7569, | |
"mutability": "mutable", | |
"name": "i", | |
"nameLocation": "15183:1:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7678, | |
"src": "15178:6:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7568, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "15178:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7571, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 7570, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "15187:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "15178:10:22" | |
}, | |
"nodeType": "ForStatement", | |
"src": "15173:861:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7682, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7680, | |
"name": "liquidatedValueTotal", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7566, | |
"src": "16055:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 7681, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "16079:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "16055:25:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "6572726f72", | |
"id": 7683, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "16082:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_177f242d20ff7dc4598657e4355abd2b0df8f6351283a95d209db56ce73ef6e9", | |
"typeString": "literal_string \"error\"" | |
}, | |
"value": "error" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_177f242d20ff7dc4598657e4355abd2b0df8f6351283a95d209db56ce73ef6e9", | |
"typeString": "literal_string \"error\"" | |
} | |
], | |
"id": 7679, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "16047:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7684, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "16047:43:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7685, | |
"nodeType": "ExpressionStatement", | |
"src": "16047:43:22" | |
} | |
] | |
}, | |
{ | |
"id": 7823, | |
"nodeType": "Block", | |
"src": "16111:1788:22", | |
"statements": [ | |
{ | |
"assignments": [ | |
7688 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7688, | |
"mutability": "mutable", | |
"name": "liquidatedValueRemaining", | |
"nameLocation": "16130:24:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7823, | |
"src": "16125:29:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7687, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "16125:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7690, | |
"initialValue": { | |
"id": 7689, | |
"name": "liquidatedValueTotal", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7566, | |
"src": "16157:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "16125:52:22" | |
}, | |
{ | |
"body": { | |
"id": 7814, | |
"nodeType": "Block", | |
"src": "16272:1534:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"baseExpression": { | |
"id": 7704, | |
"name": "markets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10837, | |
"src": "16299:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Market_$10831_storage_$", | |
"typeString": "mapping(address => struct ComptrollerV2Storage.Market storage ref)" | |
} | |
}, | |
"id": 7711, | |
"indexExpression": { | |
"arguments": [ | |
{ | |
"baseExpression": { | |
"id": 7707, | |
"name": "cTokenCollaterals", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7491, | |
"src": "16315:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CTokenInterface_$16294_$dyn_memory_ptr", | |
"typeString": "contract CTokenInterface[] memory" | |
} | |
}, | |
"id": 7709, | |
"indexExpression": { | |
"id": 7708, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7692, | |
"src": "16333:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "16315:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CTokenInterface_$16294", | |
"typeString": "contract CTokenInterface" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_CTokenInterface_$16294", | |
"typeString": "contract CTokenInterface" | |
} | |
], | |
"id": 7706, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "16307:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 7705, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "16307:7:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7710, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "16307:29:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "16299:38:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage", | |
"typeString": "struct ComptrollerV2Storage.Market storage ref" | |
} | |
}, | |
"id": 7712, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "16338:8:22", | |
"memberName": "isListed", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10822, | |
"src": "16299:47:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "6d61726b6574206e6f74206c6973746564", | |
"id": 7713, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "16348:19:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_f09a85d62af12e510c62f89099671739dbbd53d1678428aa3344943aa87fea49", | |
"typeString": "literal_string \"market not listed\"" | |
}, | |
"value": "market not listed" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_f09a85d62af12e510c62f89099671739dbbd53d1678428aa3344943aa87fea49", | |
"typeString": "literal_string \"market not listed\"" | |
} | |
], | |
"id": 7703, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "16291:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7714, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "16291:77:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7715, | |
"nodeType": "ExpressionStatement", | |
"src": "16291:77:22" | |
}, | |
{ | |
"id": 7809, | |
"nodeType": "Block", | |
"src": "16387:1369:22", | |
"statements": [ | |
{ | |
"assignments": [ | |
7717 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7717, | |
"mutability": "mutable", | |
"name": "seizeTokens", | |
"nameLocation": "16505:11:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7809, | |
"src": "16500:16:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7716, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "16500:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7727, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"baseExpression": { | |
"id": 7721, | |
"name": "cTokenCollaterals", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7491, | |
"src": "16563:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CTokenInterface_$16294_$dyn_memory_ptr", | |
"typeString": "contract CTokenInterface[] memory" | |
} | |
}, | |
"id": 7723, | |
"indexExpression": { | |
"id": 7722, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7692, | |
"src": "16581:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "16563:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CTokenInterface_$16294", | |
"typeString": "contract CTokenInterface" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_CTokenInterface_$16294", | |
"typeString": "contract CTokenInterface" | |
} | |
], | |
"id": 7720, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "16555:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 7719, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "16555:7:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7724, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "16555:29:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7725, | |
"name": "liquidatedValueRemaining", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7688, | |
"src": "16586:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 7718, | |
"name": "liquidateCalculateSeizeTokensNormed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 9533, | |
"src": "16519:35:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_uint256_$", | |
"typeString": "function (address,uint256) view returns (uint256)" | |
} | |
}, | |
"id": 7726, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "16519:92:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "16500:111:22" | |
}, | |
{ | |
"assignments": [ | |
7729 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7729, | |
"mutability": "mutable", | |
"name": "actualSeizeTokens", | |
"nameLocation": "16638:17:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7809, | |
"src": "16633:22:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7728, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "16633:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7730, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "16633:22:22" | |
}, | |
{ | |
"assignments": [ | |
7732 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7732, | |
"mutability": "mutable", | |
"name": "borrowerBalance", | |
"nameLocation": "16683:15:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7809, | |
"src": "16678:20:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7731, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "16678:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7739, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 7737, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7483, | |
"src": "16732:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"expression": { | |
"baseExpression": { | |
"id": 7733, | |
"name": "cTokenCollaterals", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7491, | |
"src": "16701:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CTokenInterface_$16294_$dyn_memory_ptr", | |
"typeString": "contract CTokenInterface[] memory" | |
} | |
}, | |
"id": 7735, | |
"indexExpression": { | |
"id": 7734, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7692, | |
"src": "16719:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "16701:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CTokenInterface_$16294", | |
"typeString": "contract CTokenInterface" | |
} | |
}, | |
"id": 7736, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "16722:9:22", | |
"memberName": "balanceOf", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16151, | |
"src": "16701:30:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", | |
"typeString": "function (address) view external returns (uint256)" | |
} | |
}, | |
"id": 7738, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "16701:40:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "16678:63:22" | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7742, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7740, | |
"name": "borrowerBalance", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7732, | |
"src": "16767:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"id": 7741, | |
"name": "seizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7717, | |
"src": "16785:11:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "16767:29:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"falseBody": { | |
"id": 7752, | |
"nodeType": "Block", | |
"src": "16970:80:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7750, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 7748, | |
"name": "actualSeizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7729, | |
"src": "16996:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 7749, | |
"name": "seizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7717, | |
"src": "17016:11:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "16996:31:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7751, | |
"nodeType": "ExpressionStatement", | |
"src": "16996:31:22" | |
} | |
] | |
}, | |
"id": 7753, | |
"nodeType": "IfStatement", | |
"src": "16763:287:22", | |
"trueBody": { | |
"id": 7747, | |
"nodeType": "Block", | |
"src": "16798:166:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7745, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 7743, | |
"name": "actualSeizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7729, | |
"src": "16906:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 7744, | |
"name": "borrowerBalance", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7732, | |
"src": "16926:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "16906:35:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7746, | |
"nodeType": "ExpressionStatement", | |
"src": "16906:35:22" | |
} | |
] | |
} | |
}, | |
{ | |
"expression": { | |
"id": 7764, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 7754, | |
"name": "actualSeizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7729, | |
"src": "17072:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7759, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "17120:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 7760, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "17124:6:22", | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "17120:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7761, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7483, | |
"src": "17132:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7762, | |
"name": "actualSeizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7729, | |
"src": "17142:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"expression": { | |
"baseExpression": { | |
"id": 7755, | |
"name": "cTokenCollaterals", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7491, | |
"src": "17092:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CTokenInterface_$16294_$dyn_memory_ptr", | |
"typeString": "contract CTokenInterface[] memory" | |
} | |
}, | |
"id": 7757, | |
"indexExpression": { | |
"id": 7756, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7692, | |
"src": "17110:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "17092:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CTokenInterface_$16294", | |
"typeString": "contract CTokenInterface" | |
} | |
}, | |
"id": 7758, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "17113:6:22", | |
"memberName": "_seize", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16244, | |
"src": "17092:27:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", | |
"typeString": "function (address,address,uint256) external returns (uint256)" | |
} | |
}, | |
"id": 7763, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "17092:68:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "17072:88:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7765, | |
"nodeType": "ExpressionStatement", | |
"src": "17072:88:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7769, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7767, | |
"name": "actualSeizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7729, | |
"src": "17190:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 7768, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "17211:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "17190:22:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "746f6b656e207365697a757265206661696c6564", | |
"id": 7770, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "17214:22:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_ef895053050823f299d1eac7edac9fbaf6b5ee335d1b858874856cee7182bcda", | |
"typeString": "literal_string \"token seizure failed\"" | |
}, | |
"value": "token seizure failed" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_ef895053050823f299d1eac7edac9fbaf6b5ee335d1b858874856cee7182bcda", | |
"typeString": "literal_string \"token seizure failed\"" | |
} | |
], | |
"id": 7766, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "17182:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7771, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "17182:55:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7772, | |
"nodeType": "ExpressionStatement", | |
"src": "17182:55:22" | |
}, | |
{ | |
"assignments": [ | |
7774 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7774, | |
"mutability": "mutable", | |
"name": "actualRepayAmount", | |
"nameLocation": "17265:17:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7809, | |
"src": "17260:22:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7773, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "17260:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7776, | |
"initialValue": { | |
"id": 7775, | |
"name": "liquidatedValueRemaining", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7688, | |
"src": "17285:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "17260:49:22" | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7779, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7777, | |
"name": "actualSeizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7729, | |
"src": "17335:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"id": 7778, | |
"name": "seizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7717, | |
"src": "17356:11:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "17335:32:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 7789, | |
"nodeType": "IfStatement", | |
"src": "17331:158:22", | |
"trueBody": { | |
"id": 7788, | |
"nodeType": "Block", | |
"src": "17369:120:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7786, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 7780, | |
"name": "actualRepayAmount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7774, | |
"src": "17395:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7785, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7783, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7781, | |
"name": "actualRepayAmount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7774, | |
"src": "17415:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 7782, | |
"name": "actualSeizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7729, | |
"src": "17435:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "17415:37:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 7784, | |
"name": "seizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7717, | |
"src": "17455:11:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "17415:51:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "17395:71:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7787, | |
"nodeType": "ExpressionStatement", | |
"src": "17395:71:22" | |
} | |
] | |
} | |
}, | |
{ | |
"expression": { | |
"id": 7799, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 7790, | |
"name": "liquidatedValueRemaining", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7688, | |
"src": "17511:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7793, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7791, | |
"name": "liquidatedValueRemaining", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7688, | |
"src": "17538:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": ">", | |
"rightExpression": { | |
"id": 7792, | |
"name": "actualRepayAmount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7774, | |
"src": "17565:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "17538:44:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"falseExpression": { | |
"hexValue": "30", | |
"id": 7797, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "17680:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"id": 7798, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "Conditional", | |
"src": "17538:143:22", | |
"trueExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7796, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7794, | |
"name": "liquidatedValueRemaining", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7688, | |
"src": "17609:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"id": 7795, | |
"name": "actualRepayAmount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7774, | |
"src": "17636:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "17609:44:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "17511:170:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7800, | |
"nodeType": "ExpressionStatement", | |
"src": "17511:170:22" | |
}, | |
{ | |
"expression": { | |
"id": 7807, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"baseExpression": { | |
"id": 7801, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7499, | |
"src": "17704:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_array$_t_uint256_$dyn_memory_ptr_$2_memory_ptr", | |
"typeString": "uint256[] memory[2] memory" | |
} | |
}, | |
"id": 7804, | |
"indexExpression": { | |
"hexValue": "31", | |
"id": 7802, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "17712:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "17704:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 7805, | |
"indexExpression": { | |
"id": 7803, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7692, | |
"src": "17715:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "17704:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 7806, | |
"name": "actualSeizeTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7729, | |
"src": "17720:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "17704:33:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7808, | |
"nodeType": "ExpressionStatement", | |
"src": "17704:33:22" | |
} | |
] | |
}, | |
{ | |
"id": 7813, | |
"nodeType": "UncheckedBlock", | |
"src": "17774:18:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7811, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "++", | |
"prefix": false, | |
"src": "17786:3:22", | |
"subExpression": { | |
"id": 7810, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7692, | |
"src": "17786:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7812, | |
"nodeType": "ExpressionStatement", | |
"src": "17786:3:22" | |
} | |
] | |
} | |
] | |
}, | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"id": 7702, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7698, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7695, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7692, | |
"src": "16208:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"expression": { | |
"id": 7696, | |
"name": "cTokenCollaterals", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7491, | |
"src": "16212:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CTokenInterface_$16294_$dyn_memory_ptr", | |
"typeString": "contract CTokenInterface[] memory" | |
} | |
}, | |
"id": 7697, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "16230:6:22", | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "16212:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "16208:28:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "&&", | |
"rightExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7701, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7699, | |
"name": "liquidatedValueRemaining", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7688, | |
"src": "16240:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 7700, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "16268:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "16240:29:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"src": "16208:61:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 7815, | |
"initializationExpression": { | |
"assignments": [ | |
7692 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7692, | |
"mutability": "mutable", | |
"name": "i", | |
"nameLocation": "16201:1:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7815, | |
"src": "16196:6:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7691, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "16196:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7694, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 7693, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "16205:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "16196:10:22" | |
}, | |
"nodeType": "ForStatement", | |
"src": "16191:1615:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7819, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7817, | |
"name": "liquidatedValueRemaining", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7688, | |
"src": "17828:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 7818, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "17856:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "17828:29:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "4c49515549444154455f5345495a455f544f4f5f4c4954544c45", | |
"id": 7820, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "17859:28:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_849e3fd8cdfbcd675e28c2be9239fda4cd7c3c8b087e9dfb4db57e20a676de00", | |
"typeString": "literal_string \"LIQUIDATE_SEIZE_TOO_LITTLE\"" | |
}, | |
"value": "LIQUIDATE_SEIZE_TOO_LITTLE" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_849e3fd8cdfbcd675e28c2be9239fda4cd7c3c8b087e9dfb4db57e20a676de00", | |
"typeString": "literal_string \"LIQUIDATE_SEIZE_TOO_LITTLE\"" | |
} | |
], | |
"id": 7816, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "17820:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7821, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "17820:68:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7822, | |
"nodeType": "ExpressionStatement", | |
"src": "17820:68:22" | |
} | |
] | |
}, | |
{ | |
"eventCall": { | |
"arguments": [ | |
{ | |
"id": 7825, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7483, | |
"src": "17976:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7826, | |
"name": "liquidatedValueTotal", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7566, | |
"src": "17986:20:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 7827, | |
"name": "cTokenCollaterals", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7491, | |
"src": "18008:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CTokenInterface_$16294_$dyn_memory_ptr", | |
"typeString": "contract CTokenInterface[] memory" | |
} | |
}, | |
{ | |
"baseExpression": { | |
"id": 7828, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7499, | |
"src": "18027:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_array$_t_uint256_$dyn_memory_ptr_$2_memory_ptr", | |
"typeString": "uint256[] memory[2] memory" | |
} | |
}, | |
"id": 7830, | |
"indexExpression": { | |
"hexValue": "31", | |
"id": 7829, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "18035:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "18027:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_array$_t_contract$_CTokenInterface_$16294_$dyn_memory_ptr", | |
"typeString": "contract CTokenInterface[] memory" | |
}, | |
{ | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
], | |
"id": 7824, | |
"name": "LiquidateBorrow", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6734, | |
"src": "17960:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_array$_t_contract$_CTokenInterface_$16294_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", | |
"typeString": "function (address,uint256,contract CTokenInterface[] memory,uint256[] memory)" | |
} | |
}, | |
"id": 7831, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "17960:78:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7832, | |
"nodeType": "EmitStatement", | |
"src": "17955:83:22" | |
}, | |
{ | |
"assignments": [ | |
7834 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7834, | |
"mutability": "mutable", | |
"name": "afterRatio", | |
"nameLocation": "18054:10:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7870, | |
"src": "18049:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7833, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "18049:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7835, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "18049:15:22" | |
}, | |
{ | |
"expression": { | |
"id": 7842, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"components": [ | |
{ | |
"id": 7836, | |
"name": "err", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7516, | |
"src": "18075:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 7837, | |
"name": "afterRatio", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7834, | |
"src": "18080:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 7838, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "TupleExpression", | |
"src": "18074:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", | |
"typeString": "tuple(uint256,uint256)" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"id": 7840, | |
"name": "borrower", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7483, | |
"src": "18114:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 7839, | |
"name": "getAccountDebtRatio", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8923, | |
"src": "18094:19:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$_t_uint256_$", | |
"typeString": "function (address) view returns (uint256,uint256)" | |
} | |
}, | |
"id": 7841, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "18094:29:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", | |
"typeString": "tuple(uint256,uint256)" | |
} | |
}, | |
"src": "18074:49:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7843, | |
"nodeType": "ExpressionStatement", | |
"src": "18074:49:22" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"id": 7864, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"components": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"id": 7859, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7851, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7845, | |
"name": "err", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7516, | |
"src": "18257:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7848, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "18269:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7849, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "18275:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "18269:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 7847, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "18264:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 7846, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "18264:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7850, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "18264:20:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "18257:27:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "||", | |
"rightExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7858, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7852, | |
"name": "err", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7516, | |
"src": "18288:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7855, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "18300:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7856, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "18306:27:22", | |
"memberName": "TOO_LITTLE_INTEREST_RESERVE", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16822, | |
"src": "18300:33:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 7854, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "18295:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 7853, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "18295:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7857, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "18295:39:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "18288:46:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"src": "18257:77:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
} | |
], | |
"id": 7860, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "18256:79:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "&&", | |
"rightExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7863, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7861, | |
"name": "afterRatio", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7834, | |
"src": "18351:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<=", | |
"rightExpression": { | |
"id": 7862, | |
"name": "beforeRatio", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7518, | |
"src": "18365:11:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "18351:25:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"src": "18256:120:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "7365697a6520746f6f206d756368", | |
"id": 7865, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "18378:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_a7bcab9c473a639bb5fa204df46fd912504b685c6ba7ee5bf604bc4dcaa65fff", | |
"typeString": "literal_string \"seize too much\"" | |
}, | |
"value": "seize too much" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_a7bcab9c473a639bb5fa204df46fd912504b685c6ba7ee5bf604bc4dcaa65fff", | |
"typeString": "literal_string \"seize too much\"" | |
} | |
], | |
"id": 7844, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "18248:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7866, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "18248:147:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7867, | |
"nodeType": "ExpressionStatement", | |
"src": "18248:147:22" | |
}, | |
{ | |
"expression": { | |
"id": 7868, | |
"name": "results", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7499, | |
"src": "18413:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_array$_t_uint256_$dyn_memory_ptr_$2_memory_ptr", | |
"typeString": "uint256[] memory[2] memory" | |
} | |
}, | |
"functionReturnParameters": 7500, | |
"id": 7869, | |
"nodeType": "Return", | |
"src": "18406:14:22" | |
} | |
] | |
}, | |
"documentation": { | |
"id": 7481, | |
"nodeType": "StructuredDocumentation", | |
"src": "13916:568:22", | |
"text": " @notice Liquidates multiple positions in one transaction.\n @dev cETH is liquidated using WETH.\n @param borrower The borrower of this cToken to be liquidated\n @param liquidatables The list of Liquidatables\n If Liquidatables.amount is non-zero, we assume an ERC20 market and ignore nftIds, if zero we assume a NFT market.\n @param cTokenCollaterals The list of cTokenCollaterals\n @return results uint[][] 0:x the repay amount for the liquidatables. 1:x the seize amount for the cTokenCollaterals" | |
}, | |
"functionSelector": "954b10f9", | |
"id": 7871, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [ | |
{ | |
"id": 7494, | |
"kind": "modifierInvocation", | |
"modifierName": { | |
"id": 7493, | |
"name": "nonReentrant", | |
"nameLocations": [ | |
"14628:12:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 10986, | |
"src": "14628:12:22" | |
}, | |
"nodeType": "ModifierInvocation", | |
"src": "14628:12:22" | |
} | |
], | |
"name": "batchLiquidateBorrow", | |
"nameLocation": "14498:20:22", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 7492, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7483, | |
"mutability": "mutable", | |
"name": "borrower", | |
"nameLocation": "14527:8:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7871, | |
"src": "14519:16:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 7482, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "14519:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7487, | |
"mutability": "mutable", | |
"name": "liquidatables", | |
"nameLocation": "14560:13:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7871, | |
"src": "14537:36:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Liquidatables_$7480_memory_ptr_$dyn_memory_ptr", | |
"typeString": "struct Comptroller.Liquidatables[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 7485, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 7484, | |
"name": "Liquidatables", | |
"nameLocations": [ | |
"14537:13:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 7480, | |
"src": "14537:13:22" | |
}, | |
"referencedDeclaration": 7480, | |
"src": "14537:13:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Liquidatables_$7480_storage_ptr", | |
"typeString": "struct Comptroller.Liquidatables" | |
} | |
}, | |
"id": 7486, | |
"nodeType": "ArrayTypeName", | |
"src": "14537:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Liquidatables_$7480_storage_$dyn_storage_ptr", | |
"typeString": "struct Comptroller.Liquidatables[]" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7491, | |
"mutability": "mutable", | |
"name": "cTokenCollaterals", | |
"nameLocation": "14600:17:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7871, | |
"src": "14575:42:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CTokenInterface_$16294_$dyn_memory_ptr", | |
"typeString": "contract CTokenInterface[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 7489, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 7488, | |
"name": "CTokenInterface", | |
"nameLocations": [ | |
"14575:15:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 16294, | |
"src": "14575:15:22" | |
}, | |
"referencedDeclaration": 16294, | |
"src": "14575:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CTokenInterface_$16294", | |
"typeString": "contract CTokenInterface" | |
} | |
}, | |
"id": 7490, | |
"nodeType": "ArrayTypeName", | |
"src": "14575:17:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_contract$_CTokenInterface_$16294_$dyn_storage_ptr", | |
"typeString": "contract CTokenInterface[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "14518:100:22" | |
}, | |
"returnParameters": { | |
"id": 7500, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7499, | |
"mutability": "mutable", | |
"name": "results", | |
"nameLocation": "14667:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7871, | |
"src": "14650:24:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_array$_t_uint256_$dyn_memory_ptr_$2_memory_ptr", | |
"typeString": "uint256[][2]" | |
}, | |
"typeName": { | |
"baseType": { | |
"baseType": { | |
"id": 7495, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "14650:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7496, | |
"nodeType": "ArrayTypeName", | |
"src": "14650:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"id": 7498, | |
"length": { | |
"hexValue": "32", | |
"id": 7497, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "14657:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_2_by_1", | |
"typeString": "int_const 2" | |
}, | |
"value": "2" | |
}, | |
"nodeType": "ArrayTypeName", | |
"src": "14650:9:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_array$_t_uint256_$dyn_storage_$2_storage_ptr", | |
"typeString": "uint256[][2]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "14649:26:22" | |
}, | |
"scope": 10778, | |
"src": "14489:3938:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"baseFunctions": [ | |
16470 | |
], | |
"body": { | |
"id": 7915, | |
"nodeType": "Block", | |
"src": "18998:361:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 7888, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "!", | |
"prefix": true, | |
"src": "19095:27:22", | |
"subExpression": { | |
"baseExpression": { | |
"id": 7885, | |
"name": "mintGuardianPaused", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10856, | |
"src": "19096:18:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$", | |
"typeString": "mapping(address => bool)" | |
} | |
}, | |
"id": 7887, | |
"indexExpression": { | |
"id": 7886, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7874, | |
"src": "19115:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "19096:26:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "6d696e7420697320706175736564", | |
"id": 7889, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "19124:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_f20052e9c73751e3b6f0a0b0d6e756b61441e56378041bd3ee24195f79f7b047", | |
"typeString": "literal_string \"mint is paused\"" | |
}, | |
"value": "mint is paused" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_f20052e9c73751e3b6f0a0b0d6e756b61441e56378041bd3ee24195f79f7b047", | |
"typeString": "literal_string \"mint is paused\"" | |
} | |
], | |
"id": 7884, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "19087:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 7890, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "19087:54:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 7891, | |
"nodeType": "ExpressionStatement", | |
"src": "19087:54:22" | |
}, | |
{ | |
"expression": { | |
"id": 7892, | |
"name": "minter", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7876, | |
"src": "19186:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"id": 7893, | |
"nodeType": "ExpressionStatement", | |
"src": "19186:6:22" | |
}, | |
{ | |
"expression": { | |
"id": 7894, | |
"name": "mintAmount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7878, | |
"src": "19202:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7895, | |
"nodeType": "ExpressionStatement", | |
"src": "19202:10:22" | |
}, | |
{ | |
"condition": { | |
"id": 7900, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "!", | |
"prefix": true, | |
"src": "19227:25:22", | |
"subExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 7896, | |
"name": "markets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10837, | |
"src": "19228:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Market_$10831_storage_$", | |
"typeString": "mapping(address => struct ComptrollerV2Storage.Market storage ref)" | |
} | |
}, | |
"id": 7898, | |
"indexExpression": { | |
"id": 7897, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7874, | |
"src": "19236:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "19228:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage", | |
"typeString": "struct ComptrollerV2Storage.Market storage ref" | |
} | |
}, | |
"id": 7899, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "19244:8:22", | |
"memberName": "isListed", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10822, | |
"src": "19228:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 7908, | |
"nodeType": "IfStatement", | |
"src": "19223:92:22", | |
"trueBody": { | |
"id": 7907, | |
"nodeType": "Block", | |
"src": "19254:61:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7903, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "19280:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7904, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "19286:17:22", | |
"memberName": "MARKET_NOT_LISTED", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16812, | |
"src": "19280:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 7902, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "19275:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 7901, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "19275:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7905, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "19275:29:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 7883, | |
"id": 7906, | |
"nodeType": "Return", | |
"src": "19268:36:22" | |
} | |
] | |
} | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7911, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "19337:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7912, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "19343:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "19337:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 7910, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "19332:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 7909, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "19332:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7913, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "19332:20:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 7883, | |
"id": 7914, | |
"nodeType": "Return", | |
"src": "19325:27:22" | |
} | |
] | |
}, | |
"documentation": { | |
"id": 7872, | |
"nodeType": "StructuredDocumentation", | |
"src": "18461:429:22", | |
"text": " @notice Checks if the account should be allowed to mint tokens in the given market\n @param cToken The market to verify the mint against\n @param minter The account which would get the minted tokens\n @param mintAmount The amount of underlying being supplied to the market in exchange for tokens\n @return 0 if the mint is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)" | |
}, | |
"functionSelector": "4ef4c3e1", | |
"id": 7916, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "mintAllowed", | |
"nameLocation": "18904:11:22", | |
"nodeType": "FunctionDefinition", | |
"overrides": { | |
"id": 7880, | |
"nodeType": "OverrideSpecifier", | |
"overrides": [], | |
"src": "18965:8:22" | |
}, | |
"parameters": { | |
"id": 7879, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7874, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "18924:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7916, | |
"src": "18916:14:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 7873, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "18916:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7876, | |
"mutability": "mutable", | |
"name": "minter", | |
"nameLocation": "18940:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7916, | |
"src": "18932:14:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 7875, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "18932:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7878, | |
"mutability": "mutable", | |
"name": "mintAmount", | |
"nameLocation": "18953:10:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7916, | |
"src": "18948:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7877, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "18948:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "18915:49:22" | |
}, | |
"returnParameters": { | |
"id": 7883, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7882, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 7916, | |
"src": "18992:4:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7881, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "18992:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "18991:6:22" | |
}, | |
"scope": 10778, | |
"src": "18895:464:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"baseFunctions": [ | |
16481 | |
], | |
"body": { | |
"id": 7944, | |
"nodeType": "Block", | |
"src": "19792:250:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7929, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7919, | |
"src": "19836:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"id": 7930, | |
"nodeType": "ExpressionStatement", | |
"src": "19836:6:22" | |
}, | |
{ | |
"expression": { | |
"id": 7931, | |
"name": "minter", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7921, | |
"src": "19852:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"id": 7932, | |
"nodeType": "ExpressionStatement", | |
"src": "19852:6:22" | |
}, | |
{ | |
"expression": { | |
"id": 7933, | |
"name": "actualMintAmount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7923, | |
"src": "19868:16:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7934, | |
"nodeType": "ExpressionStatement", | |
"src": "19868:16:22" | |
}, | |
{ | |
"expression": { | |
"id": 7935, | |
"name": "mintTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7925, | |
"src": "19894:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7936, | |
"nodeType": "ExpressionStatement", | |
"src": "19894:10:22" | |
}, | |
{ | |
"condition": { | |
"hexValue": "66616c7365", | |
"id": 7937, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "bool", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "19983:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"value": "false" | |
}, | |
"id": 7943, | |
"nodeType": "IfStatement", | |
"src": "19979:57:22", | |
"trueBody": { | |
"id": 7942, | |
"nodeType": "Block", | |
"src": "19990:46:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7940, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 7938, | |
"name": "maxAssets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10810, | |
"src": "20004:9:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 7939, | |
"name": "maxAssets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10810, | |
"src": "20016:9:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "20004:21:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 7941, | |
"nodeType": "ExpressionStatement", | |
"src": "20004:21:22" | |
} | |
] | |
} | |
} | |
] | |
}, | |
"documentation": { | |
"id": 7917, | |
"nodeType": "StructuredDocumentation", | |
"src": "19365:312:22", | |
"text": " @notice Validates mint and reverts on rejection. May emit logs.\n @param cToken Asset being minted\n @param minter The address minting the tokens\n @param actualMintAmount The amount of the underlying asset being minted\n @param mintTokens The number of tokens being minted" | |
}, | |
"functionSelector": "41c728b9", | |
"id": 7945, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "mintVerify", | |
"nameLocation": "19691:10:22", | |
"nodeType": "FunctionDefinition", | |
"overrides": { | |
"id": 7927, | |
"nodeType": "OverrideSpecifier", | |
"overrides": [], | |
"src": "19774:8:22" | |
}, | |
"parameters": { | |
"id": 7926, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7919, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "19710:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7945, | |
"src": "19702:14:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 7918, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "19702:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7921, | |
"mutability": "mutable", | |
"name": "minter", | |
"nameLocation": "19726:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7945, | |
"src": "19718:14:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 7920, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "19718:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7923, | |
"mutability": "mutable", | |
"name": "actualMintAmount", | |
"nameLocation": "19739:16:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7945, | |
"src": "19734:21:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7922, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "19734:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7925, | |
"mutability": "mutable", | |
"name": "mintTokens", | |
"nameLocation": "19762:10:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7945, | |
"src": "19757:15:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7924, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "19757:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "19701:72:22" | |
}, | |
"returnParameters": { | |
"id": 7928, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "19792:0:22" | |
}, | |
"scope": 10778, | |
"src": "19682:360:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"baseFunctions": [ | |
16492 | |
], | |
"body": { | |
"id": 7983, | |
"nodeType": "Block", | |
"src": "20593:208:22", | |
"statements": [ | |
{ | |
"assignments": [ | |
7959 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 7959, | |
"mutability": "mutable", | |
"name": "allowed", | |
"nameLocation": "20608:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7983, | |
"src": "20603:12:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7958, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "20603:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 7965, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 7961, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7948, | |
"src": "20640:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7962, | |
"name": "redeemer", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7950, | |
"src": "20648:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 7963, | |
"name": "redeemTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7952, | |
"src": "20658:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 7960, | |
"name": "redeemAllowedInternal", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8070, | |
"src": "20618:21:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", | |
"typeString": "function (address,address,uint256) view returns (uint256)" | |
} | |
}, | |
"id": 7964, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "20618:53:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "20603:68:22" | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 7972, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 7966, | |
"name": "allowed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7959, | |
"src": "20685:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7969, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "20701:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7970, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "20707:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "20701:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 7968, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "20696:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 7967, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "20696:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7971, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "20696:20:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "20685:31:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 7976, | |
"nodeType": "IfStatement", | |
"src": "20681:76:22", | |
"trueBody": { | |
"id": 7975, | |
"nodeType": "Block", | |
"src": "20718:39:22", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 7973, | |
"name": "allowed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7959, | |
"src": "20739:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 7957, | |
"id": 7974, | |
"nodeType": "Return", | |
"src": "20732:14:22" | |
} | |
] | |
} | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 7979, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "20779:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 7980, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "20785:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "20779:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 7978, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "20774:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 7977, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "20774:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 7981, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "20774:20:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 7957, | |
"id": 7982, | |
"nodeType": "Return", | |
"src": "20767:27:22" | |
} | |
] | |
}, | |
"documentation": { | |
"id": 7946, | |
"nodeType": "StructuredDocumentation", | |
"src": "20048:431:22", | |
"text": " @notice Checks if the account should be allowed to redeem tokens in the given market\n @param cToken The market to verify the redeem against\n @param redeemer The account which would redeem the tokens\n @param redeemTokens The number of cTokens to exchange for the underlying asset in the market\n @return 0 if the redeem is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)" | |
}, | |
"functionSelector": "eabe7d91", | |
"id": 7984, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "redeemAllowed", | |
"nameLocation": "20493:13:22", | |
"nodeType": "FunctionDefinition", | |
"overrides": { | |
"id": 7954, | |
"nodeType": "OverrideSpecifier", | |
"overrides": [], | |
"src": "20560:8:22" | |
}, | |
"parameters": { | |
"id": 7953, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7948, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "20515:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7984, | |
"src": "20507:14:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 7947, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "20507:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7950, | |
"mutability": "mutable", | |
"name": "redeemer", | |
"nameLocation": "20531:8:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7984, | |
"src": "20523:16:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 7949, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "20523:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7952, | |
"mutability": "mutable", | |
"name": "redeemTokens", | |
"nameLocation": "20546:12:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 7984, | |
"src": "20541:17:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7951, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "20541:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "20506:53:22" | |
}, | |
"returnParameters": { | |
"id": 7957, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7956, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 7984, | |
"src": "20587:4:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7955, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "20587:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "20586:6:22" | |
}, | |
"scope": 10778, | |
"src": "20484:317:22", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"body": { | |
"id": 8069, | |
"nodeType": "Block", | |
"src": "20920:845:22", | |
"statements": [ | |
{ | |
"condition": { | |
"id": 7999, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "!", | |
"prefix": true, | |
"src": "20934:25:22", | |
"subExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 7995, | |
"name": "markets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10837, | |
"src": "20935:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Market_$10831_storage_$", | |
"typeString": "mapping(address => struct ComptrollerV2Storage.Market storage ref)" | |
} | |
}, | |
"id": 7997, | |
"indexExpression": { | |
"id": 7996, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7986, | |
"src": "20943:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "20935:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage", | |
"typeString": "struct ComptrollerV2Storage.Market storage ref" | |
} | |
}, | |
"id": 7998, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "20951:8:22", | |
"memberName": "isListed", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10822, | |
"src": "20935:24:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 8007, | |
"nodeType": "IfStatement", | |
"src": "20930:92:22", | |
"trueBody": { | |
"id": 8006, | |
"nodeType": "Block", | |
"src": "20961:61:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 8002, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "20987:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 8003, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "20993:17:22", | |
"memberName": "MARKET_NOT_LISTED", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16812, | |
"src": "20987:23:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 8001, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "20982:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 8000, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "20982:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 8004, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "20982:29:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 7994, | |
"id": 8005, | |
"nodeType": "Return", | |
"src": "20975:36:22" | |
} | |
] | |
} | |
}, | |
{ | |
"condition": { | |
"id": 8014, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "!", | |
"prefix": true, | |
"src": "21129:44:22", | |
"subExpression": { | |
"baseExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 8008, | |
"name": "markets", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 10837, | |
"src": "21130:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Market_$10831_storage_$", | |
"typeString": "mapping(address => struct ComptrollerV2Storage.Market storage ref)" | |
} | |
}, | |
"id": 8010, | |
"indexExpression": { | |
"id": 8009, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7986, | |
"src": "21138:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "21130:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Market_$10831_storage", | |
"typeString": "struct ComptrollerV2Storage.Market storage ref" | |
} | |
}, | |
"id": 8011, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberLocation": "21146:17:22", | |
"memberName": "accountMembership", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10828, | |
"src": "21130:33:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$", | |
"typeString": "mapping(address => bool)" | |
} | |
}, | |
"id": 8013, | |
"indexExpression": { | |
"id": 8012, | |
"name": "redeemer", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7988, | |
"src": "21164:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "21130:43:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 8022, | |
"nodeType": "IfStatement", | |
"src": "21125:102:22", | |
"trueBody": { | |
"id": 8021, | |
"nodeType": "Block", | |
"src": "21175:52:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 8017, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "21201:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 8018, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "21207:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "21201:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 8016, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "21196:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 8015, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "21196:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 8019, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "21196:20:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 7994, | |
"id": 8020, | |
"nodeType": "Return", | |
"src": "21189:27:22" | |
} | |
] | |
} | |
}, | |
{ | |
"assignments": [ | |
8025, | |
8029 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 8025, | |
"mutability": "mutable", | |
"name": "err", | |
"nameLocation": "21434:3:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 8069, | |
"src": "21428:9:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
}, | |
"typeName": { | |
"id": 8024, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 8023, | |
"name": "Error", | |
"nameLocations": [ | |
"21428:5:22" | |
], | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 16825, | |
"src": "21428:5:22" | |
}, | |
"referencedDeclaration": 16825, | |
"src": "21428:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 8029, | |
"mutability": "mutable", | |
"name": "retVals", | |
"nameLocation": "21454:7:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 8069, | |
"src": "21439:22:22", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", | |
"typeString": "uint256[4]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 8026, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "21439:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 8028, | |
"length": { | |
"hexValue": "34", | |
"id": 8027, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "21444:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_4_by_1", | |
"typeString": "int_const 4" | |
}, | |
"value": "4" | |
}, | |
"nodeType": "ArrayTypeName", | |
"src": "21439:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$4_storage_ptr", | |
"typeString": "uint256[4]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 8038, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 8031, | |
"name": "redeemer", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7988, | |
"src": "21505:8:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"arguments": [ | |
{ | |
"id": 8033, | |
"name": "cToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7986, | |
"src": "21522:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 8032, | |
"name": "CToken", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 6186, | |
"src": "21515:6:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_CToken_$6186_$", | |
"typeString": "type(contract CToken)" | |
} | |
}, | |
"id": 8034, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "21515:14:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
} | |
}, | |
{ | |
"id": 8035, | |
"name": "redeemTokens", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7990, | |
"src": "21531:12:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"hexValue": "30", | |
"id": 8036, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "21545:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_contract$_CToken_$6186", | |
"typeString": "contract CToken" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
} | |
], | |
"id": 8030, | |
"name": "getHypotheticalAccountLiquidityInternal", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 9476, | |
"src": "21465:39:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_address_$_t_contract$_CToken_$6186_$_t_uint256_$_t_uint256_$returns$_t_enum$_Error_$16825_$_t_array$_t_uint256_$4_memory_ptr_$", | |
"typeString": "function (address,contract CToken,uint256,uint256) view returns (enum ComptrollerErrorReporter.Error,uint256[4] memory)" | |
} | |
}, | |
"id": 8037, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "21465:82:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_enum$_Error_$16825_$_t_array$_t_uint256_$4_memory_ptr_$", | |
"typeString": "tuple(enum ComptrollerErrorReporter.Error,uint256[4] memory)" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "21427:120:22" | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
}, | |
"id": 8042, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 8039, | |
"name": "err", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8025, | |
"src": "21561:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"expression": { | |
"id": 8040, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "21568:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 8041, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "21574:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "21568:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
}, | |
"src": "21561:21:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 8049, | |
"nodeType": "IfStatement", | |
"src": "21557:68:22", | |
"trueBody": { | |
"id": 8048, | |
"nodeType": "Block", | |
"src": "21584:41:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 8045, | |
"name": "err", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8025, | |
"src": "21610:3:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 8044, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "21605:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 8043, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "21605:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 8046, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "21605:9:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 7994, | |
"id": 8047, | |
"nodeType": "Return", | |
"src": "21598:16:22" | |
} | |
] | |
} | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 8054, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"baseExpression": { | |
"id": 8050, | |
"name": "retVals", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8029, | |
"src": "21638:7:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr", | |
"typeString": "uint256[4] memory" | |
} | |
}, | |
"id": 8052, | |
"indexExpression": { | |
"hexValue": "31", | |
"id": 8051, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "21646:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "21638:10:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 8053, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "21652:1:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "21638:15:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 8062, | |
"nodeType": "IfStatement", | |
"src": "21634:87:22", | |
"trueBody": { | |
"id": 8061, | |
"nodeType": "Block", | |
"src": "21655:66:22", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 8057, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "21681:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 8058, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "21687:22:22", | |
"memberName": "INSUFFICIENT_LIQUIDITY", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16807, | |
"src": "21681:28:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 8056, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "21676:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 8055, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "21676:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 8059, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "21676:34:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 7994, | |
"id": 8060, | |
"nodeType": "Return", | |
"src": "21669:41:22" | |
} | |
] | |
} | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 8065, | |
"name": "Error", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16825, | |
"src": "21743:5:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_enum$_Error_$16825_$", | |
"typeString": "type(enum ComptrollerErrorReporter.Error)" | |
} | |
}, | |
"id": 8066, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberLocation": "21749:8:22", | |
"memberName": "NO_ERROR", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 16803, | |
"src": "21743:14:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_enum$_Error_$16825", | |
"typeString": "enum ComptrollerErrorReporter.Error" | |
} | |
], | |
"id": 8064, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "21738:4:22", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_uint256_$", | |
"typeString": "type(uint256)" | |
}, | |
"typeName": { | |
"id": 8063, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "21738:4:22", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 8067, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"nameLocations": [], | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "21738:20:22", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 7994, | |
"id": 8068, | |
"nodeType": "Return", | |
"src": "21731:27:22" | |
} | |
] | |
}, | |
"id": 8070, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "redeemAllowedInternal", | |
"nameLocation": "20816:21:22", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 7991, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 7986, | |
"mutability": "mutable", | |
"name": "cToken", | |
"nameLocation": "20846:6:22", | |
"nodeType": "VariableDeclaration", | |
"scope": 8070, | |
"src": "20838:14:22", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 7985, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "20838:7:22", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 7988, | |
"mutability": "mutable", | |
"name": "redeeme |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment