common

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SenderKeyFlag          = "sender-key"
	ReceiversFlag          = "receivers"
	AmountsFlag            = "amounts"
	TokenIDsFlag           = "token-ids"
	RootTokenFlag          = "root-token"
	RootPredicateFlag      = "root-predicate"
	ChildPredicateFlag     = "child-predicate"
	ChildTokenFlag         = "child-token"
	JSONRPCFlag            = "json-rpc"
	ChildChainMintableFlag = "child-chain-mintable"

	MinterKeyFlag     = "minter-key"
	MinterKeyFlagDesc = "minter key is the account which is able to mint tokens to sender account " +
		"(if provided tokens are minted prior to depositing)"
)

Variables

This section is empty.

Functions

func ExtractChildTokenAddr

func ExtractChildTokenAddr(receipt *ethgo.Receipt, childChainMintable bool) (*types.Address, error)

ExtractChildTokenAddr extracts predicted deterministic child token address

func ExtractExitEventIDs

func ExtractExitEventIDs(receipt *ethgo.Receipt) ([]*big.Int, error)

ExtractExitEventIDs tries to extract all exit event ids from provided receipt

Types

type BridgeParams

type BridgeParams struct {
	SenderKey          string
	Receivers          []string
	TokenAddr          string
	PredicateAddr      string
	JSONRPCAddr        string
	ChildChainMintable bool
}

func (*BridgeParams) RegisterCommonFlags

func (p *BridgeParams) RegisterCommonFlags(cmd *cobra.Command)

RegisterCommonFlags registers common bridge flags to a given command

func (*BridgeParams) Validate

func (p *BridgeParams) Validate() error

type BridgeTxResult

type BridgeTxResult struct {
	Sender         string         `json:"sender"`
	Receivers      []string       `json:"receivers"`
	ExitEventIDs   []*big.Int     `json:"exitEventIDs"`
	Amounts        []string       `json:"amounts"`
	TokenIDs       []string       `json:"tokenIds"`
	BlockNumbers   []uint64       `json:"blockNumbers"`
	ChildTokenAddr *types.Address `json:"childTokenAddr"`

	Title string `json:"title"`
}

func (*BridgeTxResult) GetOutput

func (r *BridgeTxResult) GetOutput() string

type ERC20BridgeParams

type ERC20BridgeParams struct {
	*BridgeParams
	Amounts []string
}

func NewERC20BridgeParams

func NewERC20BridgeParams() *ERC20BridgeParams

func (*ERC20BridgeParams) Validate

func (bp *ERC20BridgeParams) Validate() error

type ERC721BridgeParams

type ERC721BridgeParams struct {
	*BridgeParams
	TokenIDs []string
}

func NewERC721BridgeParams

func NewERC721BridgeParams() *ERC721BridgeParams

func (*ERC721BridgeParams) Validate

func (bp *ERC721BridgeParams) Validate() error

type ERC1155BridgeParams

type ERC1155BridgeParams struct {
	*BridgeParams
	Amounts  []string
	TokenIDs []string
}

func NewERC1155BridgeParams

func NewERC1155BridgeParams() *ERC1155BridgeParams

func (*ERC1155BridgeParams) Validate

func (bp *ERC1155BridgeParams) Validate() error

type TokenType

type TokenType int
const (
	ERC20 TokenType = iota
	ERC721
	ERC1155
)

Jump to

Keyboard shortcuts

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