common

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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 added in v1.0.0

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

ExtractChildTokenAddr extracts predicted deterministic child token address

func ExtractExitEventIDs added in v1.1.1

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

ExtractExitEventIDs tries to extract all exit event ids from provided receipt

Types

type BridgeParams added in v0.9.0

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

func (*BridgeParams) RegisterCommonFlags added in v1.0.0

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

RegisterCommonFlags registers common bridge flags to a given command

func (*BridgeParams) Validate added in v1.3.0

func (p *BridgeParams) Validate() error

type BridgeTxResult added in v1.0.0

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 added in v1.0.0

func (r *BridgeTxResult) GetOutput() string

type ERC1155BridgeParams added in v0.9.0

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

func NewERC1155BridgeParams added in v0.9.0

func NewERC1155BridgeParams() *ERC1155BridgeParams

func (*ERC1155BridgeParams) Validate added in v0.9.0

func (bp *ERC1155BridgeParams) Validate() error

type ERC20BridgeParams

type ERC20BridgeParams struct {
	*BridgeParams
	Amounts []string
}

func NewERC20BridgeParams added in v0.9.0

func NewERC20BridgeParams() *ERC20BridgeParams

func (*ERC20BridgeParams) Validate added in v0.9.0

func (bp *ERC20BridgeParams) Validate() error

type ERC721BridgeParams added in v0.9.0

type ERC721BridgeParams struct {
	*BridgeParams
	TokenIDs []string
}

func NewERC721BridgeParams added in v0.9.0

func NewERC721BridgeParams() *ERC721BridgeParams

func (*ERC721BridgeParams) Validate added in v0.9.0

func (bp *ERC721BridgeParams) Validate() error

type TokenType added in v0.9.0

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