UniswapV3Adapter Smart Contract Module in Bunzz

The UniswapV3Adapter module serves as a common interface for external contracts to perform queries and swaps for Uniswap V3 Factories.

DexAggregator can use adapter to find the best offer between two assets for a given amount and execute this offer. It also accounts for query & swap gas-cost of the offer and for that needs gasEstimate from the adapter.

You can access this Module and the code here: https://bit.ly/3KbjZcj

How to Use

  1. Deploy smart contract via Bunzz. When deploying, users can specify name, factory and static quoter address, swapGasEstimate and quoterGasEstimate.
  2. Users can call query function to perform queries (find the best offer) betwen two assets for a given amount.
  3. Users can also call swap function to perform swaps between two assets for a given amount.

Functions

#WRITE

  • revokeRole
  • setQuoterGasLimit
  • recoverETH
  • removeMaintainer
  • renounceRole
  • setSwapGasEstimate
  • swap
  • uniswapV3SwapCallback
  • transferOwnership
  • addMaintainer
  • enableFeeAmounts
  • grantRole
  • recoverERC20
  • renounceRole
  • revokeAllowance
  • setQuoter

#READ

  • hasRole
  • query
  • quoter
  • quoterGasLimit
  • name
  • supportsInterface
  • swapGasEstimate
  • MAINTAINER_ROLE
  • feeAmounts
  • getRoleAdmin
  • isFeeAmountEnabled
  • DEFAULT_ADMIN_ROLE
  • getQuoteForPool

You can access this Module and the code here: https://bit.ly/3KbjZcj

If you still haven’t signed up to Bunzz, what are you waiting for?

Sign up here https://app.bunzz.dev/signup and get your smart contracts deployed in 5 minutes through our great GUI.

Share this article:

Leave a Comment

Your email address will not be published. Required fields are marked *