token

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAirdropEligibility

func CheckAirdropEligibility(address common.Address, testDrop bool) (eligibleAmount *big.Float, claimer common.Address, err error)

func ComputePrice

func ComputePrice(price *big.Int) *big.Float

ComputePrice calculates a Q96.64 fixed-point price to a *big.Float denominated in base (not atto)

func CreateDelegateSig

func CreateDelegateSig(chainId *big.Int, verifyingContract common.Address, wallet accounts.Wallet, account accounts.Account, passphrase string, delegatee common.Address, nonce *big.Int, expiry *big.Int) (uint8, [32]byte, [32]byte, error)

CreateDelegateSig generates the signature parameters for delegateBySig domainSeparator should be obtained from the contract's EIP712 domain

func FILToGLF

func FILToGLF(sqrtPriceX96 *big.Int) *big.Float

func GLFToFIL

func GLFToFIL(sqrtPriceX96 *big.Int) *big.Float

func ParseUUIDToBytes

func ParseUUIDToBytes(uuidStr string) ([16]byte, error)

func ReadAgentOwnerMap

func ReadAgentOwnerMap(testDrop bool) (map[common.Address]common.Address, error)

Types

type MerkleTree

type MerkleTree struct {
	smt.StandardTree
	// contains filtered or unexported fields
}

func MerkleTreeFromJSON

func MerkleTreeFromJSON(jsonBytes []byte) (*MerkleTree, error)

func (*MerkleTree) GetIdxForAddr

func (mt *MerkleTree) GetIdxForAddr(address common.Address) (int, error)

func (*MerkleTree) GetIdxForAddrWithAgent added in v1.5.4

func (mt *MerkleTree) GetIdxForAddrWithAgent(ownerAddr common.Address, agentAddr *common.Address) (int, error)

func (*MerkleTree) GetLeafValueForAddr

func (mt *MerkleTree) GetLeafValueForAddr(address common.Address) (*big.Int, error)

func (*MerkleTree) GetLeafValueForAddrWithAgent added in v1.5.4

func (mt *MerkleTree) GetLeafValueForAddrWithAgent(ownerAddr common.Address, agentAddr *common.Address) (*big.Int, error)

func (*MerkleTree) GetProofForAddr

func (mt *MerkleTree) GetProofForAddr(address common.Address) ([][32]byte, error)

func (*MerkleTree) GetProofForAddrWithAgent added in v1.5.4

func (mt *MerkleTree) GetProofForAddrWithAgent(ownerAddr common.Address, agentAddr *common.Address) ([][32]byte, error)

func (*MerkleTree) ID

func (mt *MerkleTree) ID() [16]byte

func (*MerkleTree) ReadFromJSON

func (mt *MerkleTree) ReadFromJSON(testDrop bool) (*MerkleTree, error)

type MerkleTreeValue

type MerkleTreeValue struct {
	Value     []string `json:"value"`
	TreeIndex int      `json:"treeIndex"`
}

type OZMerkleJSON

type OZMerkleJSON struct {
	Format       string            `json:"format"`
	LeafEncoding []string          `json:"leafEncoding"`
	Tree         []string          `json:"tree"`
	Values       []MerkleTreeValue `json:"values"`
	Root         string            `json:"root"`
	Id           string            `json:"id"`
}

Jump to

Keyboard shortcuts

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