VulpeFI Docs
  • Whitepaper
  • VulpeFI Overview
  • Wallet VulpeFI
    • Wallet auto-connect
  • Aggregation Protocol
    • Introduction
    • Guide
      • Quick start
    • API
      • Swagger
        • Binance Smart Chain
        • Ethereum Network
        • BASE
        • Arbitrum
        • Polygon
      • Swap params
      • Quote params
    • Smart contracts
      • Aggregation VulpeFI
      • ClipperRouter
      • LimitOrderProtocol
      • UnoswapRouter
    • Limit order protocol
      • Introduction
      • Limit vs. RFQ Orders
      • Smart contracts
        • LimitOrderProtocol
        • LimitOrderProtocolPro
        • OrderLib
        • OrderMixin
        • OrderRFQMixin
        • helpers
          • AmountCalculator
          • ChainlinkCalculator
          • ERC1155Proxy
          • ERC721Proxy
          • ERC721ProxySafe
          • ImmutableOwner
          • NonceManager
          • PredicateHelper
          • SeriesNonceManager
          • WethUnwrapper
        • Interfaces
          • IDaiLikePermit
          • IWithdrawable
          • Interaction
          • PostInteraction
          • PreInteraction
      • Liquidity Source and API
        • Ethereum Network
        • Binance Smart Chain
        • Polygon
        • Avalanche
        • Gnosis Chain
    • Spot Price aggregator
      • Examples
      • Spot Price Aggregator
Powered by GitBook
On this page
  • Derives​
  • Functions​
  • invalidatorForOrderRFQ​
  • cancelOrderRFQ​
  • fillOrderRFQ​
  • fillOrderRFQToWithPermit​
  • fillOrderRFQTo​
  • Events​
  • OrderFilledRFQ​
  1. Aggregation Protocol
  2. Limit order protocol
  3. Smart contracts

OrderRFQMixin

PreviousOrderMixinNexthelpers

Last updated 1 year ago

RFQ Limit Order mixin

Derives

  • Permitable

Functions

invalidatorForOrderRFQ

function invalidatorForOrderRFQ(
  address maker,
  uint256 slot
) external returns (uint256)

Returns bitmask for double-spend invalidators based on lowest byte of order.info and filled quotes

Parameters:

Name
Type
Description

maker

address

slot

uint256

Return Values:

Name
Type
Description

Result

uint256

Each bit represents whether corresponding was already invalidated

function cancelOrderRFQ(
  uint256 orderInfo
) external

Cancels order's quote

Name
Type
Description

orderInfo

uint256

function fillOrderRFQ(
  struct OrderRFQMixin.Order order,
  bytes signature,
  uint256 makingAmount,
  uint256 takingAmount
) external returns (uint256, uint256)

Fills order's quote, fully or partially (whichever is possible)

Name
Type
Description

order

struct OrderRFQMixin.Order

Order quote to fill

signature

bytes

Signature to confirm quote ownership

makingAmount

uint256

Making amount

takingAmount

uint256

Taking amount

function fillOrderRFQToWithPermit(
  struct OrderRFQMixin.Order order,
  bytes signature,
  uint256 makingAmount,
  uint256 takingAmount,
  address target,
  bytes permit
) external returns (uint256, uint256)

Fills Same as fillOrderRFQ but calls permit first, allowing to approve token spending and make a swap in one transaction. Also allows to specify funds destination instead of msg.sender

See tests for examples

Name
Type
Description

order

struct OrderRFQMixin.Order

Order quote to fill

signature

bytes

Signature to confirm quote ownership

makingAmount

uint256

Making amount

takingAmount

uint256

Taking amount

target

address

Address that will receive swap funds

permit

bytes

Should consist of abiencoded token address and encoded IERC20Permit.permit call.

function fillOrderRFQTo(
  struct OrderRFQMixin.Order order,
  bytes signature,
  uint256 makingAmount,
  uint256 takingAmount,
  address target
) public returns (uint256, uint256)

Same as fillOrderRFQ but allows to specify funds destination instead of msg.sender

Name
Type
Description

order

struct OrderRFQMixin.Order

Order quote to fill

signature

bytes

Signature to confirm quote ownership

makingAmount

uint256

Making amount

takingAmount

uint256

Taking amount

target

address

Address that will receive swap funds

event OrderFilledRFQ(
  bytes32 orderHash,
  uint256 makingAmount
)

Emitted when RFQ gets filled

Name
Type
Description

orderHash

bytes32

makingAmount

uint256

cancelOrderRFQ

Parameters:

fillOrderRFQ

Parameters:

fillOrderRFQToWithPermit

Parameters:

fillOrderRFQTo

Parameters:

Events

OrderFilledRFQ

Parameters:

​
AmountCalculator
EIP712
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​