noble

package
v0.1.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainConfig

type ChainConfig struct {
	RPC     string `yaml:"rpc"`
	ChainID string `yaml:"chain-id"`

	StartBlock     uint64 `yaml:"start-block"`
	LookbackPeriod uint64 `yaml:"lookback-period"`
	Workers        uint32 `yaml:"workers"`

	TxMemo                 string `yaml:"tx-memo"`
	GasLimit               uint64 `yaml:"gas-limit"`
	BroadcastRetries       int    `yaml:"broadcast-retries"`
	BroadcastRetryInterval int    `yaml:"broadcast-retry-interval"`

	BlockQueueChannelSize uint64 `yaml:"block-queue-channel-size"`

	MinMintAmount uint64 `yaml:"min-mint-amount"`

	MinterPrivateKey string `yaml:"minter-private-key"`
}

func (*ChainConfig) Chain

func (c *ChainConfig) Chain(name string) (types.Chain, error)

type Noble

type Noble struct {
	// contains filtered or unexported fields
}

func NewChain

func NewChain(
	rpcURL string,
	chainID string,
	privateKey string,
	startBlock uint64,
	lookbackPeriod uint64,
	workers uint32,
	gasLimit uint64,
	txMemo string,
	maxRetries int,
	retryIntervalSeconds int,
	blockQueueChannelSize uint64,
	minAmount uint64,
) (*Noble, error)

func (*Noble) AccountInfo

func (n *Noble) AccountInfo(ctx context.Context) (uint64, uint64, error)

func (*Noble) Broadcast

func (n *Noble) Broadcast(
	ctx context.Context,
	logger log.Logger,
	msgs []*types.MessageState,
	sequenceMap *types.SequenceMap,
	m *relayer.PromMetrics,
) error

func (*Noble) CloseClients added in v0.1.2

func (n *Noble) CloseClients() error

func (*Noble) Domain

func (n *Noble) Domain() types.Domain

func (*Noble) InitializeBroadcaster

func (n *Noble) InitializeBroadcaster(
	ctx context.Context,
	logger log.Logger,
	sequenceMap *types.SequenceMap,
) error

func (*Noble) InitializeClients added in v0.1.2

func (n *Noble) InitializeClients(ctx context.Context, logger log.Logger) error

func (*Noble) IsDestinationCaller

func (n *Noble) IsDestinationCaller(destinationCaller []byte) (isCaller bool, readableAddress string)

func (*Noble) LastFlushedBlock added in v0.1.2

func (n *Noble) LastFlushedBlock() uint64

func (*Noble) LatestBlock added in v0.1.2

func (n *Noble) LatestBlock() uint64

func (*Noble) Name

func (n *Noble) Name() string

func (*Noble) SetLatestBlock added in v0.1.2

func (n *Noble) SetLatestBlock(block uint64)

func (*Noble) StartListener

func (n *Noble) StartListener(
	ctx context.Context,
	logger log.Logger,
	processingQueue chan *types.TxState,
	flushInterval_ time.Duration,
)

func (*Noble) TrackLatestBlockHeight added in v0.1.2

func (n *Noble) TrackLatestBlockHeight(ctx context.Context, logger log.Logger, m *relayer.PromMetrics)

func (*Noble) WalletBalanceMetric added in v0.1.2

func (n *Noble) WalletBalanceMetric(ctx context.Context, logger log.Logger, m *relayer.PromMetrics)

Jump to

Keyboard shortcuts

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