Documentation
¶
Index ¶
- Constants
- func Assert(conidtion bool, msg ...any)
- func CheckNonce(ctx context.Context, client *ethclient.Client, addr ethcommon.Address, ...) error
- func GenKeypair() (string, ethcommon.Address, sdk.AccAddress)
- func IsEthAddress(address string) bool
- func IsTerminalStatus(status xmsgtypes.XmsgStatus) bool
- func MustWaitForTxReceipt(ctx context.Context, client *ethclient.Client, tx *ethtypes.Transaction, ...) *ethtypes.Receipt
- func ScriptPKToAddress(scriptPKHex string, params *chaincfg.Params) string
- func TraceTx(ctx context.Context, tx *ethtypes.Transaction, rpcURL string) (string, error)
- func WaitForBlockHeight(ctx context.Context, height int64, rpcURL string, logger infoLogger)
- func WaitXmsgMinedByInTxHash(ctx context.Context, inTxHash string, xmsgClient xmsgtypes.QueryClient, ...) *xmsgtypes.Xmsg
- func WaitXmsgMinedByIndex(ctx context.Context, xmsgIndex string, xmsgClient xmsgtypes.QueryClient, ...) *xmsgtypes.Xmsg
- func WaitXmsgsMinedByInTxHash(ctx context.Context, inTxHash string, xmsgClient xmsgtypes.QueryClient, ...) []*xmsgtypes.Xmsg
- type NoopLogger
Constants ¶
View Source
const ( FungibleAdminName = "fungibleadmin" Pellcore0Name = "pellcore0" Pellcore0Mnemonic = "" /* 146-byte string literal not displayed */ DefaultXmsgTimeout = 4 * time.Minute )
View Source
const (
DefaultReceiptTimeout = 30 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func CheckNonce ¶
func GenKeypair ¶
func GenKeypair() (string, ethcommon.Address, sdk.AccAddress)
gen new account. private_key, eth_address, pell_address
func IsEthAddress ¶
IsEthAddress checks if a string is a valid Ethereum address, with or without the '0x' prefix.
func IsTerminalStatus ¶
func IsTerminalStatus(status xmsgtypes.XmsgStatus) bool
func MustWaitForTxReceipt ¶
func MustWaitForTxReceipt( ctx context.Context, client *ethclient.Client, tx *ethtypes.Transaction, logger infoLogger, receiptTimeout time.Duration, ) *ethtypes.Receipt
MustWaitForTxReceipt waits until a broadcasted tx to be mined and return its receipt timeout and panic after 30s.
func ScriptPKToAddress ¶
ScriptPKToAddress is a hex string for P2WPKH script
func WaitForBlockHeight ¶
WaitForBlockHeight waits until the block height reaches the given height
func WaitXmsgMinedByInTxHash ¶
func WaitXmsgMinedByInTxHash( ctx context.Context, inTxHash string, xmsgClient xmsgtypes.QueryClient, logger infoLogger, xmsgTimeout time.Duration, ) *xmsgtypes.Xmsg
WaitXmsgMinedByInTxHash waits until xmsg is mined; returns the xmsgIndex (the last one)
func WaitXmsgMinedByIndex ¶
func WaitXmsgMinedByIndex( ctx context.Context, xmsgIndex string, xmsgClient xmsgtypes.QueryClient, logger infoLogger, xmsgTimeout time.Duration, ) *xmsgtypes.Xmsg
WaitXmsgMinedByIndex waits until xmsg is mined; returns the xmsgIndex
func WaitXmsgsMinedByInTxHash ¶
func WaitXmsgsMinedByInTxHash( ctx context.Context, inTxHash string, xmsgClient xmsgtypes.QueryClient, xmsgsCount int, logger infoLogger, xmsgTimeout time.Duration, ) []*xmsgtypes.Xmsg
WaitXmsgsMinedByInTxHash waits until xmsg is mined; returns the xmsgIndex (the last one)
Types ¶
type NoopLogger ¶
type NoopLogger struct{}
func (NoopLogger) Info ¶
func (nl NoopLogger) Info(_ string, _ ...interface{})
Click to show internal directories.
Click to hide internal directories.