applications

package
v0.0.0-...-07d62d3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ApplicationNone is the nil value representing a transfer.
	ApplicationNone libApps.Application = iota
	ApplicationUniswapV3
	ApplicationUniswapV2
	ApplicationBalancerV2
	ApplicationOneInchLPV2
	ApplicationOneInchLPV1
	ApplicationMooniswap
	ApplicationOneInchFixedRateSwap
	ApplicationDodoV2
	ApplicationCurve
	ApplicationMultichain
	ApplicationXyFinance
	ApplicationApeswap
	ApplicationSaddle
	ApplicationGTradeV6_1
	ApplicationMeson
	ApplicationCamelot
	ApplicationChronos
	ApplicationSushiswap
	ApplicationKyberClassic
	ApplicationWombat
	ApplicationSeawaterAmm
	ApplicationTraderJoe
	ApplicationRamses
	ApplicationJumper
	ApplicationCamelotV3
	ApplicationLifi
	ApplicationOdos
	ApplicationBetSwirl
	ApplicationParaswap
	ApplicationPancakeswap
)

Applications supported via the app. refer to lib/types/applications/applications.go for the stringified implementation. Tests depend on the number in this iota, and the frontend/database depends on the stringified representation.

Variables

This section is empty.

Functions

func AppsListFromEnvOrFatal

func AppsListFromEnvOrFatal(key string) map[ethereum.Address]applications.Application

AppsListFromEnvOrFatal parses a list of `app:address:address,app:address:address` into a map of {address => app}

func GetApplicationFee

func GetApplicationFee(transfer worker.EthereumApplicationTransfer, client *ethclient.Client, fluidTokenContract ethCommon.Address, tokenDecimals int, txReceipt ethereum.Receipt, inputData misc.Blob) (applications.ApplicationFeeData, applications.ApplicationData, worker.EthereumAppFees, error)

GetApplicationFee to find the fee (in USD) paid by a user for the application interaction returns (feeData with Fee set to nil, nil) in the case where the application event is legitimate, but doesn't involve the fluid asset we're tracking, e.g. in a multi-token pool where two other tokens are swapped if a receipt is passed, will be passed to the application if it can use it

func GetApplicationTransferParties

func GetApplicationTransferParties(transaction ethereum.Transaction, transfer worker.EthereumApplicationTransfer) (libEthereum.Address, libEthereum.Address, error)

GetApplicationTransferParties to find the parties considered for payout from an application interaction. In the case of an AMM (such as Uniswap) the transaction sender receives the majority payout every time, with the recipient tokens being effectively burnt (sent to the contract). In the case of a P2P swap, such as a DEX, the party sending the fluid tokens receives the majority payout.

func UtilityListFromEnvOrFatal

func UtilityListFromEnvOrFatal(key string) map[ethereum.Address]applications.UtilityName

UtilityListFromEnvOrFatal parses a list of `utility:address:address,utility:address:address` into a map of {utility => app}

Types

type Application

type Application = libApps.Application

func ParseApplicationName

func ParseApplicationName(name string) (Application, error)

ParseApplicationName shadows the lib types definition

Jump to

Keyboard shortcuts

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