meson

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: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Meson token ID of fluid token
	// currently this is USDC!
	FluidTokenIndex = 1

	// Meson github says all values use 6 decimals
	MesonDecimals = 6

	// End of the txn function discriminant bytes
	EncodedSwapStart = 4
	// Size of the encodedswap
	EncodedSwapSize = 32

	// Bitmask to check if the service fee was waived
	ServiceFeeWaiveMask = "0x40000000000000000000"
	// Service fee rate (n/10000)
	ServiceFeeRate = 10

	// Bitmask to check if a swap was signed in the non-typed manner
	SignNonTypedMask = "0x0800000000000000000000000000000000000000000000000000"

	// Start of amount bytes within encodedswap
	AmountBytesStart = 1
	// Size of amount bytes
	AmountBytesSize = 5
	// Start of swap salt bytes within encodedswap
	SaltBytesStart = 6
	// Size of swap salt bytes
	SaltBytesSize = 10
	// Start of LP fee bytes within encodedswap
	LPFeeBytesStart = 16
	// Size of LP fee bytes
	LPFeeBytesSize = 5
	// Location of token out index within encodedswap
	OutTokenIndexByte = 28
	// Location of token in index within encodedswap
	InTokenIndexByte = 31

	// Constant values to be hashed
	EthereumSignHeader52 = "\x19Ethereum Signed Message:\n52"

	ReleaseTypeHash = "bytes32 Sign to release a swap on Mesonaddress Recipient"
)

Variables

This section is empty.

Functions

func GetInitiator

func GetInitiator(inputData misc.Blob) (string, error)

func GetMesonFees

GetMesonFees returns meson's LP and Service Fees as reported by the encoded swap TODO does not calculate fluid volume

Types

This section is empty.

Jump to

Keyboard shortcuts

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