cosmwasm

package
v0.0.0-...-43fc98a Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const ReadLimitSize = 524288

ReadLimitSize can be used to increase the read limit size on the listening connection. The default read limit size is not large enough, causing "failed to read: read limited at 32769 bytes" errors during testing. Increasing this limit effects an internal buffer that is used to as part of the zero alloc/copy design.

Variables

This section is empty.

Functions

func EventsToMessagePublications

func EventsToMessagePublications(contract string, txHash string, events []gjson.Result, logger *zap.Logger, chainID vaa.ChainID, contractAddressKey string, b64Encoded bool) []*common.MessagePublication

func StringToAddress

func StringToAddress(value string) (vaa.Address, error)

StringToAddress convert string into address

func StringToHash

func StringToHash(value string) (eth_common.Hash, error)

StringToHash convert string into transaction hash

Types

type Watcher

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

Watcher is responsible for looking over a cosmwasm blockchain and reporting new transactions to the contract

func NewWatcher

func NewWatcher(
	urlWS string,
	urlLCD string,
	contract string,
	msgC chan<- *common.MessagePublication,
	obsvReqC <-chan *gossipv1.ObservationRequest,
	chainID vaa.ChainID,
	env common.Environment,
) *Watcher

NewWatcher creates a new cosmwasm contract watcher

func (*Watcher) Run

func (e *Watcher) Run(ctx context.Context) error

type WatcherConfig

type WatcherConfig struct {
	NetworkID watchers.NetworkID // human readable name
	ChainID   vaa.ChainID        // ChainID
	Websocket string             // Websocket URL
	Lcd       string             // LCD
	Contract  string             // hex representation of the contract address
}

func (*WatcherConfig) GetChainID

func (wc *WatcherConfig) GetChainID() vaa.ChainID

func (*WatcherConfig) GetNetworkID

func (wc *WatcherConfig) GetNetworkID() watchers.NetworkID

func (*WatcherConfig) RequiredL1Finalizer

func (wc *WatcherConfig) RequiredL1Finalizer() watchers.NetworkID

func (*WatcherConfig) SetL1Finalizer

func (wc *WatcherConfig) SetL1Finalizer(l1finalizer interfaces.L1Finalizer)

Jump to

Keyboard shortcuts

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