amm

package
v0.0.0-...-4494a5e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AmmAbi ethAbi.ABI

Functions

This section is empty.

Types

type AmmEventCollectFees

type AmmEventCollectFees struct {
	Id      misc.BigInt
	Pool    ethereum.Address
	To      ethereum.Address
	Amount0 misc.BigInt
	Amount1 misc.BigInt
}

Decoded data from the AMM events

func DecodeCollectFees

func DecodeCollectFees(log ethTypes.Log) (collect AmmEventCollectFees, err error)

type AmmEventPositionMint

type AmmEventPositionMint struct {
	Id    misc.BigInt      `json:"id"`
	Lower int32            `json:"lower_tick"`
	Upper int32            `json:"upper_tick"`
	Pool  ethereum.Address `json:"pool"`
}

Decoded data from the AMM events

func DecodeMint

func DecodeMint(log ethTypes.Log) (mint AmmEventPositionMint, err error)

type AmmEventPositionUpdate

type AmmEventPositionUpdate struct {
	Id    misc.BigInt `json:"id"`
	Delta misc.BigInt `json:"liquidity_delta"`
}

Decoded data from the AMM events

func DecodeUpdatePosition

func DecodeUpdatePosition(log ethTypes.Log) (update AmmEventPositionUpdate, err error)

type AmmEventSwap1

type AmmEventSwap1 struct {
	User       ethereum.Address
	Pool       ethereum.Address
	ZeroForOne bool
	Amount0    misc.BigInt
	Amount1    misc.BigInt
	FinalTick  int32
}

Decoded data from the AMM events

func DecodeSwap1

func DecodeSwap1(log ethereum.Log) (swap AmmEventSwap1, err error)

type AmmEventSwap2

type AmmEventSwap2 struct {
	User        ethereum.Address
	From        ethereum.Address
	To          ethereum.Address
	AmountIn    misc.BigInt
	AmountOut   misc.BigInt
	FluidVolume misc.BigInt
	FinalTick0  int32
	FinalTick1  int32
}

Decoded data from the AMM events

func DecodeSwap2

func DecodeSwap2(log ethereum.Log) (swap AmmEventSwap2, err error)

Jump to

Keyboard shortcuts

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