uniswap

package
v0.0.0-...-2ac5be2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const UniswapV2SwapLogTopic = "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822"

Variables

This section is empty.

Functions

func GetUniswapV2Fees

func GetUniswapV2Fees(transfer worker.EthereumApplicationTransfer, client *ethclient.Client, fluidTokenContract ethCommon.Address, tokenDecimals int) (applications.ApplicationFeeData, error)

GetUniswapFees returns Uniswap V2's fee of 0.3% of the amount swapped. If the token swapped from was the fluid token, get the exact amount, otherwise approximate the cost based on the received amount of the fluid token

func GetUniswapV3Fees

func GetUniswapV3Fees(transfer worker.EthereumApplicationTransfer, client *ethclient.Client, fluidTokenContract ethCommon.Address, tokenDecimals int) (applications.ApplicationFeeData, error)

GetUniswapV3Fees returns Uniswap V3's fee of the amount swapped. The fee is dependent on the pool being swapped on

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL