1 tx
4 calls
constructor
No constructor.
functions
_BASE_PRICE_CUMULATIVE_LAST_
viewfunction _BASE_PRICE_CUMULATIVE_LAST_() view returns (uint256)
_BASE_RESERVE_
viewfunction _BASE_RESERVE_() view returns (uint112)
_BASE_TOKEN_
viewfunction _BASE_TOKEN_() view returns (address)
_BLOCK_TIMESTAMP_LAST_
viewfunction _BLOCK_TIMESTAMP_LAST_() view returns (uint32)
_I_
viewfunction _I_() view returns (uint256)
_IS_OPEN_TWAP_
viewfunction _IS_OPEN_TWAP_() view returns (bool)
_K_
viewfunction _K_() view returns (uint256)
_LP_FEE_RATE_
viewfunction _LP_FEE_RATE_() view returns (uint256)
_MAINTAINER_
viewfunction _MAINTAINER_() view returns (address)
_MT_FEE_RATE_MODEL_
viewfunction _MT_FEE_RATE_MODEL_() view returns (address)
_QUOTE_RESERVE_
viewfunction _QUOTE_RESERVE_() view returns (uint112)
_QUOTE_TOKEN_
viewfunction _QUOTE_TOKEN_() view returns (address)
addressToShortString
purefunction addressToShortString(address _addr) pure returns (string)
allowance
viewfunction allowance(address owner, address spender) view returns (uint256)
balanceOf
viewfunction balanceOf(address owner) view returns (uint256 balance)
decimals
viewfunction decimals() view returns (uint8)
DOMAIN_SEPARATOR
viewfunction DOMAIN_SEPARATOR() view returns (bytes32)
getBaseInput
viewfunction getBaseInput() view returns (uint256 input)
getMidPrice
viewfunction getMidPrice() view returns (uint256 midPrice)
getPMMState
viewfunction getPMMState() view returns (tuple state)
getPMMStateForCall
viewfunction getPMMStateForCall() view returns (uint256 i, uint256 K, uint256 B, uint256 Q, uint256 B0, uint256 Q0, uint256 R)
getQuoteInput
viewfunction getQuoteInput() view returns (uint256 input)
getUserFeeRate
viewfunction getUserFeeRate(address user) view returns (uint256 lpFeeRate, uint256 mtFeeRate)
getVaultReserve
viewfunction getVaultReserve() view returns (uint256 baseReserve, uint256 quoteReserve)
name
viewfunction name() view returns (string)
nonces
viewfunction nonces(address) view returns (uint256)
PERMIT_TYPEHASH
viewfunction PERMIT_TYPEHASH() view returns (bytes32)
querySellBase
viewfunction querySellBase(address trader, uint256 payBaseAmount) view returns (uint256 receiveQuoteAmount, uint256 mtFee)
querySellQuote
viewfunction querySellQuote(address trader, uint256 payQuoteAmount) view returns (uint256 receiveBaseAmount, uint256 mtFee)
symbol
viewfunction symbol() view returns (string)
totalSupply
viewfunction totalSupply() view returns (uint256)
version
purefunction version() pure returns (string)
approve
nonpayablefunction approve(address spender, uint256 amount) returns (bool)
buyShares
nonpayablefunction buyShares(address to) returns (uint256 shares, uint256 baseInput, uint256 quoteInput)
flashLoan
nonpayablefunction flashLoan(uint256 baseAmount, uint256 quoteAmount, address assetTo, bytes data)
init
nonpayablefunction init(address maintainer, address baseTokenAddress, address quoteTokenAddress, uint256 lpFeeRate, address mtFeeRateModel, uint256 i, uint256 k, bool isOpenTWAP)
permit
nonpayablefunction permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
sellBase
nonpayablefunction sellBase(address to) returns (uint256 receiveQuoteAmount)
sellQuote
nonpayablefunction sellQuote(address to) returns (uint256 receiveBaseAmount)
sellShares
nonpayablefunction sellShares(uint256 shareAmount, address to, uint256 baseMinAmount, uint256 quoteMinAmount, bytes data, uint256 deadline) returns (uint256 baseAmount, uint256 quoteAmount)
sync
nonpayablefunction sync()
transfer
nonpayablefunction transfer(address to, uint256 amount) returns (bool)
transferFrom
nonpayablefunction transferFrom(address from, address to, uint256 amount) returns (bool)
events
Approval
event Approval(address indexed owner, address indexed spender, uint256 amount)
Burn
event Burn(address indexed user, uint256 value)
BuyShares
event BuyShares(address to, uint256 increaseShares, uint256 totalShares)
DODOFlashLoan
event DODOFlashLoan(address borrower, address assetTo, uint256 baseAmount, uint256 quoteAmount)
DODOSwap
event DODOSwap(address fromToken, address toToken, uint256 fromAmount, uint256 toAmount, address trader, address receiver)
Mint
event Mint(address indexed user, uint256 value)
SellShares
event SellShares(address payer, address to, uint256 decreaseShares, uint256 totalShares)
Transfer
event Transfer(address indexed from, address indexed to, uint256 amount)
errors
No errors.
creation bytecode
0x3d602d80600a3d3981f3363d3d373d3d3d363d738319b7081f611052884d774eb7547fe23d0d7d815af43d82803e903d91602b57fd5bf3