CanonicCanonic Docs
Documentation

Docs

MAOBPreviewer

Source: contracts/contracts/MAOBPreviewer.sol Route: /reference/maob-previewer

Views

  • previewBuyBaseExactOut(address maob, uint256 baseAmount, uint256 maxQuoteIn, uint16 maxRung, uint256 minQuotePerRung) public view returns (uint256 quoteUsed, uint256 baseFeePaid, uint256 baseOut)
  • previewBuyBaseExactOut(address maob, uint256 baseAmount, uint256 maxQuoteIn, uint256 minQuotePerRung) external view returns (uint256 quoteUsed, uint256 baseFeePaid, uint256 baseOut)
  • previewBuyBaseTargetIn(address maob, uint256 quoteIn, uint256 minBaseOut, uint16 maxRung, uint256 minQuotePerRung) public view returns (uint256 baseOut, uint256 baseFeePaid, uint256 quoteUsed)
  • previewBuyBaseTargetIn(address maob, uint256 quoteIn, uint256 minBaseOut, uint256 minQuotePerRung) external view returns (uint256 baseOut, uint256 baseFeePaid, uint256 quoteUsed)
  • previewSellBaseExactOut(address maob, uint256 quoteOut, uint256 maxBaseIn, uint16 maxRung, uint256 minQuotePerRung) public view returns (uint256 baseUsed, uint256 quoteFeePaid, uint256 netQuoteOut)
  • previewSellBaseExactOut(address maob, uint256 quoteOut, uint256 maxBaseIn, uint256 minQuotePerRung) external view returns (uint256 baseUsed, uint256 quoteFeePaid, uint256 netQuoteOut)
  • previewSellBaseTargetIn(address maob, uint256 baseAmount, uint256 minQuoteOut, uint16 maxRung, uint256 minQuotePerRung) public view returns (uint256 quoteOut, uint256 quoteFeePaid, uint256 baseUsed)
  • previewSellBaseTargetIn(address maob, uint256 baseAmount, uint256 minQuoteOut, uint256 minQuotePerRung) external view returns (uint256 quoteOut, uint256 quoteFeePaid, uint256 baseUsed)

Errors

  • MAOB__InsufficientLiquidity()
  • MAOB__InvalidAmount()
  • MAOB__InvalidRung()
  • MAOB__MaxBaseExceeded()
  • MAOB__MaxQuoteExceeded()
  • MAOB__MinBaseNotMet()
  • MAOB__MinQuoteNotMet()
  • MAOB__OracleOutOfRange()
  • MAOB__OraclePriceMissing()
  • MAOB__OracleStale()
  • MAOB__QuoteAmountTooLow()
  • MAOB__TakerPaused()