common

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 10 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 ExtractExitEventID added in v1.0.0

func ExtractExitEventID(receipt *ethgo.Receipt) (*big.Int, error)

ExtractExitEventID tries to extract exit event id 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

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"`

	Title string `json:"title"`
}

func (*BridgeTxResult) GetOutput added in v1.0.0

func (r *BridgeTxResult) GetOutput() string

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 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 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