Module brontes_classifier::DodoDPPPool
source · Expand description
Generated by the following Solidity interface…
interface DodoDPPPool {
type RState is uint8;
struct PMMState {
uint256 i;
uint256 K;
uint256 B;
uint256 Q;
uint256 B0;
uint256 Q0;
RState R;
}
event DODOFlashLoan(address borrower, address assetTo, uint256 baseAmount, uint256 quoteAmount);
event DODOSwap(address fromToken, address toToken, uint256 fromAmount, uint256 toAmount, address trader, address receiver);
event LpFeeRateChange(uint256 newLpFeeRate);
event OwnershipTransferPrepared(address indexed previousOwner, address indexed newOwner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event RChange(RState newRState);
function _BASE_PRICE_CUMULATIVE_LAST_() external view returns (uint256);
function _BASE_RESERVE_() external view returns (uint112);
function _BASE_TARGET_() external view returns (uint112);
function _BASE_TOKEN_() external view returns (address);
function _BLOCK_TIMESTAMP_LAST_() external view returns (uint32);
function _IS_OPEN_TWAP_() external view returns (bool);
function _I_() external view returns (uint128);
function _K_() external view returns (uint64);
function _LP_FEE_RATE_() external view returns (uint64);
function _MAINTAINER_() external view returns (address);
function _MT_FEE_RATE_MODEL_() external view returns (address);
function _NEW_OWNER_() external view returns (address);
function _OWNER_() external view returns (address);
function _QUOTE_RESERVE_() external view returns (uint112);
function _QUOTE_TARGET_() external view returns (uint112);
function _QUOTE_TOKEN_() external view returns (address);
function _RState_() external view returns (uint32);
function claimOwnership() external;
function flashLoan(uint256 baseAmount, uint256 quoteAmount, address assetTo, bytes memory data) external;
function getBaseInput() external view returns (uint256 input);
function getMidPrice() external view returns (uint256 midPrice);
function getPMMState() external view returns (PMMState memory state);
function getPMMStateForCall() external view returns (uint256 i, uint256 K, uint256 B, uint256 Q, uint256 B0, uint256 Q0, uint256 R);
function getQuoteInput() external view returns (uint256 input);
function getUserFeeRate(address user) external view returns (uint256 lpFeeRate, uint256 mtFeeRate);
function getVaultReserve() external view returns (uint256 baseReserve, uint256 quoteReserve);
function init(address owner, address maintainer, address baseTokenAddress, address quoteTokenAddress, uint256 lpFeeRate, address mtFeeRateModel, uint256 k, uint256 i, bool isOpenTWAP) external;
function initOwner(address newOwner) external;
function querySellBase(address trader, uint256 payBaseAmount) external view returns (uint256 receiveQuoteAmount, uint256 mtFee, RState newRState, uint256 newBaseTarget);
function querySellQuote(address trader, uint256 payQuoteAmount) external view returns (uint256 receiveBaseAmount, uint256 mtFee, RState newRState, uint256 newQuoteTarget);
function ratioSync() external;
function reset(address assetTo, uint256 newLpFeeRate, uint256 newI, uint256 newK, uint256 baseOutAmount, uint256 quoteOutAmount, uint256 minBaseReserve, uint256 minQuoteReserve) external returns (bool);
function retrieve(address to, address token, uint256 amount) external;
function sellBase(address to) external returns (uint256 receiveQuoteAmount);
function sellQuote(address to) external returns (uint256 receiveBaseAmount);
function transferOwnership(address newOwner) external;
function version() external pure returns (string memory);
}
…which was generated by the following JSON ABI:
[
{
"type": "function",
"name": "_BASE_PRICE_CUMULATIVE_LAST_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_BASE_RESERVE_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint112",
"internalType": "uint112"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_BASE_TARGET_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint112",
"internalType": "uint112"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_BASE_TOKEN_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IERC20"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_BLOCK_TIMESTAMP_LAST_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint32",
"internalType": "uint32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_IS_OPEN_TWAP_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_I_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint128",
"internalType": "uint128"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_K_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint64",
"internalType": "uint64"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_LP_FEE_RATE_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint64",
"internalType": "uint64"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_MAINTAINER_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_MT_FEE_RATE_MODEL_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IFeeRateModel"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_NEW_OWNER_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_OWNER_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_QUOTE_RESERVE_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint112",
"internalType": "uint112"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_QUOTE_TARGET_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint112",
"internalType": "uint112"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_QUOTE_TOKEN_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IERC20"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_RState_",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint32",
"internalType": "uint32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "claimOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "flashLoan",
"inputs": [
{
"name": "baseAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "quoteAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "assetTo",
"type": "address",
"internalType": "address"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "getBaseInput",
"inputs": [],
"outputs": [
{
"name": "input",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getMidPrice",
"inputs": [],
"outputs": [
{
"name": "midPrice",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getPMMState",
"inputs": [],
"outputs": [
{
"name": "state",
"type": "tuple",
"internalType": "struct PMMPricing.PMMState",
"components": [
{
"name": "i",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "K",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "B",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "Q",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "B0",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "Q0",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "R",
"type": "uint8",
"internalType": "enum PMMPricing.RState"
}
]
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getPMMStateForCall",
"inputs": [],
"outputs": [
{
"name": "i",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "K",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "B",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "Q",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "B0",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "Q0",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "R",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getQuoteInput",
"inputs": [],
"outputs": [
{
"name": "input",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getUserFeeRate",
"inputs": [
{
"name": "user",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "lpFeeRate",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "mtFeeRate",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getVaultReserve",
"inputs": [],
"outputs": [
{
"name": "baseReserve",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "quoteReserve",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "init",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "maintainer",
"type": "address",
"internalType": "address"
},
{
"name": "baseTokenAddress",
"type": "address",
"internalType": "address"
},
{
"name": "quoteTokenAddress",
"type": "address",
"internalType": "address"
},
{
"name": "lpFeeRate",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "mtFeeRateModel",
"type": "address",
"internalType": "address"
},
{
"name": "k",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "i",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "isOpenTWAP",
"type": "bool",
"internalType": "bool"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "initOwner",
"inputs": [
{
"name": "newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "querySellBase",
"inputs": [
{
"name": "trader",
"type": "address",
"internalType": "address"
},
{
"name": "payBaseAmount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "receiveQuoteAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "mtFee",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "newRState",
"type": "uint8",
"internalType": "enum PMMPricing.RState"
},
{
"name": "newBaseTarget",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "querySellQuote",
"inputs": [
{
"name": "trader",
"type": "address",
"internalType": "address"
},
{
"name": "payQuoteAmount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "receiveBaseAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "mtFee",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "newRState",
"type": "uint8",
"internalType": "enum PMMPricing.RState"
},
{
"name": "newQuoteTarget",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "ratioSync",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "reset",
"inputs": [
{
"name": "assetTo",
"type": "address",
"internalType": "address"
},
{
"name": "newLpFeeRate",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "newI",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "newK",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "baseOutAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "quoteOutAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "minBaseReserve",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "minQuoteReserve",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "retrieve",
"inputs": [
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "token",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "sellBase",
"inputs": [
{
"name": "to",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "receiveQuoteAmount",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "sellQuote",
"inputs": [
{
"name": "to",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "receiveBaseAmount",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "version",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "pure"
},
{
"type": "event",
"name": "DODOFlashLoan",
"inputs": [
{
"name": "borrower",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "assetTo",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "baseAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "quoteAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "DODOSwap",
"inputs": [
{
"name": "fromToken",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "toToken",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "fromAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "toAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "trader",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "receiver",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "LpFeeRateChange",
"inputs": [
{
"name": "newLpFeeRate",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferPrepared",
"inputs": [
{
"name": "previousOwner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "previousOwner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RChange",
"inputs": [
{
"name": "newRState",
"type": "uint8",
"indexed": false,
"internalType": "enum PMMPricing.RState"
}
],
"anonymous": false
}
]
Structs§
- Event with signature
DODOFlashLoan(address,address,uint256,uint256)and selector0x0b82e93068db15abd9fbb2682c65462ea8a0a10582dce93a5664818e296f54eb. - Event with signature
DODOSwap(address,address,uint256,uint256,address,address)and selector0xc2c0245e056d5fb095f04cd6373bc770802ebd1e6c918eb78fdef843cdb37b0f. - Event with signature
LpFeeRateChange(uint256)and selector0x9950d5a2f2c7264863d40100bf993f0cdbc4711806caba6284d07e80fd500879. - Event with signature
OwnershipTransferPrepared(address,address)and selector0xdcf55418cee3220104fef63f979ff3c4097ad240c0c43dcb33ce837748983e62. - Event with signature
OwnershipTransferred(address,address)and selector0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. - Event with signature
RChange(uint8)and selector0xdf176ad18be4f9f32efaa32f06e9d1175476504739a745f1399a6d3fa4b75917. - Function with signature
_BASE_PRICE_CUMULATIVE_LAST_()and selector0xfe24cb7f. - Container type for the return parameters of the
_BASE_PRICE_CUMULATIVE_LAST_()function. - Function with signature
_BASE_RESERVE_()and selector0x7d721504. - Container type for the return parameters of the
_BASE_RESERVE_()function. - Function with signature
_BASE_TARGET_()and selector0xe539ef49. - Container type for the return parameters of the
_BASE_TARGET_()function. - Function with signature
_BASE_TOKEN_()and selector0x4a248d2a. - Container type for the return parameters of the
_BASE_TOKEN_()function. - Function with signature
_BLOCK_TIMESTAMP_LAST_()and selector0x880a4d87. - Container type for the return parameters of the
_BLOCK_TIMESTAMP_LAST_()function. - Function with signature
_IS_OPEN_TWAP_()and selector0x2df6cb48. - Container type for the return parameters of the
_IS_OPEN_TWAP_()function. - Function with signature
_I_()and selector0xf811d692. - Container type for the return parameters of the
_I_()function. - Function with signature
_K_()and selector0xec2fd46d. - Container type for the return parameters of the
_K_()function. - Function with signature
_LP_FEE_RATE_()and selector0xab44a7a3. - Container type for the return parameters of the
_LP_FEE_RATE_()function. - Function with signature
_MAINTAINER_()and selector0x4322ec83. - Container type for the return parameters of the
_MAINTAINER_()function. - Function with signature
_MT_FEE_RATE_MODEL_()and selector0xf6b06e70. - Container type for the return parameters of the
_MT_FEE_RATE_MODEL_()function. - Function with signature
_NEW_OWNER_()and selector0x8456db15. - Container type for the return parameters of the
_NEW_OWNER_()function. - Function with signature
_OWNER_()and selector0x16048bc4. - Container type for the return parameters of the
_OWNER_()function. - Function with signature
_QUOTE_RESERVE_()and selector0xbbf5ce78. - Container type for the return parameters of the
_QUOTE_RESERVE_()function. - Function with signature
_QUOTE_TARGET_()and selector0x77f58657. - Container type for the return parameters of the
_QUOTE_TARGET_()function. - Function with signature
_QUOTE_TOKEN_()and selector0xd4b97046. - Container type for the return parameters of the
_QUOTE_TOKEN_()function. - Function with signature
_RState_()and selector0xbf357dae. - Container type for the return parameters of the
_RState_()function. - Function with signature
claimOwnership()and selector0x4e71e0c8. - Container type for the return parameters of the
claimOwnership()function. - Function with signature
flashLoan(uint256,uint256,address,bytes)and selector0xd0a494e4. - Container type for the return parameters of the
flashLoan(uint256,uint256,address,bytes)function. - Function with signature
getBaseInput()and selector0x65f6fcbb. - Container type for the return parameters of the
getBaseInput()function. - Function with signature
getMidPrice()and selector0xee27c689. - Container type for the return parameters of the
getMidPrice()function. - Function with signature
getPMMState()and selector0xa382d1b9. - Function with signature
getPMMStateForCall()and selector0xfd1ed7e9. - Container type for the return parameters of the
getPMMStateForCall()function. - Container type for the return parameters of the
getPMMState()function. - Function with signature
getQuoteInput()and selector0x71f9100c. - Container type for the return parameters of the
getQuoteInput()function. - Function with signature
getUserFeeRate(address)and selector0x44096609. - Container type for the return parameters of the
getUserFeeRate(address)function. - Function with signature
getVaultReserve()and selector0x36223ce9. - Container type for the return parameters of the
getVaultReserve()function. - Function with signature
init(address,address,address,address,uint256,address,uint256,uint256,bool)and selector0x01a3c30b. - Function with signature
initOwner(address)and selector0x0d009297. - Container type for the return parameters of the
initOwner(address)function. - Container type for the return parameters of the
init(address,address,address,address,uint256,address,uint256,uint256,bool)function. - Function with signature
querySellBase(address,uint256)and selector0x79a04876. - Container type for the return parameters of the
querySellBase(address,uint256)function. - Function with signature
querySellQuote(address,uint256)and selector0x66410a21. - Container type for the return parameters of the
querySellQuote(address,uint256)function. - Function with signature
ratioSync()and selector0xc57a5d03. - Container type for the return parameters of the
ratioSync()function. - Function with signature
reset(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256)and selector0x8ff3928c. - Container type for the return parameters of the
reset(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256)function. - Function with signature
retrieve(address,address,uint256)and selector0x28c4e24c. - Container type for the return parameters of the
retrieve(address,address,uint256)function. - Function with signature
sellBase(address)and selector0xbd6015b4. - Container type for the return parameters of the
sellBase(address)function. - Function with signature
sellQuote(address)and selector0xdd93f59a. - Container type for the return parameters of the
sellQuote(address)function. - Function with signature
transferOwnership(address)and selector0xf2fde38b. - Container type for the return parameters of the
transferOwnership(address)function. - Function with signature
version()and selector0x54fd4d50. - Container type for the return parameters of the
version()function.
Enums§
- Container for all the
DodoDPPPoolfunction calls. - Container for all the
DodoDPPPoolevents.