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​
  • constructor​
  • swap​
  • rescueFunds​
  • destroy
  • Events​
  • Swapped​
  1. Aggregation Protocol
  2. Smart contracts

Aggregation VulpeFI

PreviousSmart contractsNextClipperRouter

Last updated 4 months ago

Derives

  • Permitable

  • EthReceiver

Functions

constructor

function constructor(
  address weth,
  contract IClipperExchangeInterface _clipperExchange
) public

Parameters:

Name
Type
Description

weth

address

_clipperExchange

contract IClipperExchangeInterface

function swap(
  contract IAggregationExecutor caller,
  struct AggregationRouterV4.SwapDescription desc,
  bytes data
) external returns (uint256 returnAmount, uint256 gasLeft)

Performs a swap, delegating all calls encoded in data to caller. See tests for usage examples

Parameters:

Name
Type
Description

caller

contract IAggregationExecutor

Aggregation executor that executes calls described in data

desc

struct AggregationRouterV4.SwapDescription

Swap description

data

bytes

Encoded calls that caller should execute in between of swaps

Return Values:

Name
Type
Description

returnAmount

uint256

Resulting token amount

gasLeft

uint256

Gas left

function rescueFunds(
  contract IERC20 token,
  uint256 amount
) external
Name
Type
Description

token

contract IERC20

amount

uint256

destroy

unction destroy(
) external
event Swapped(
  address sender,
  contract IERC20 srcToken,
  contract IERC20 dstToken,
  address dstReceiver,
  uint256 spentAmount,
  uint256 returnAmount
)
Name
Type
Description

sender

address

srcToken

contract IERC20

dstToken

contract IERC20

dstReceiver

address

spentAmount

uint256

returnAmount

uint256

swap

rescueFunds

Parameters:

Events

Swapped

Parameters:

​
ClipperRouter
LimitOrderProtocol
UnoswapRouter
EIP712
Ownable
Context
​
​
​
​
​
​
​
​