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 GetMesonFees ¶
func GetMesonFees(transfer worker.EthereumApplicationTransfer, inputData misc.Blob) (applications.ApplicationFeeData, error)
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.
Click to show internal directories.
Click to hide internal directories.