ibc

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: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Chains defines the list of chains to be monitored by IBC. Add new chains here as necessary.
	Chains = []vaa.ChainID{
		vaa.ChainIDOsmosis,
		vaa.ChainIDSei,
		vaa.ChainIDCosmoshub,
		vaa.ChainIDEvmos,
		vaa.ChainIDKujira,
		vaa.ChainIDNeutron,
		vaa.ChainIDCelestia,
		vaa.ChainIDStargaze,
		vaa.ChainIDSeda,
		vaa.ChainIDDymension,
	}
)

Functions

func GetFeatures

func GetFeatures() string

GetFeatures returns the IBC feature string that can be published in heartbeat messages.

Types

type ChainConfig

type ChainConfig []ChainConfigEntry

ChainConfig is the list of chains to be monitored over IBC, along with their channel data.

type ChainConfigEntry

type ChainConfigEntry struct {
	ChainID  vaa.ChainID
	MsgC     chan<- *common.MessagePublication
	ObsvReqC <-chan *gossipv1.ObservationRequest
}

ChainConfigEntry defines the entry for a chain being monitored by IBC.

type WasmAttributes

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

WasmAttributes is an object to facilitate parsing of wasm event attributes. It provides a method to parse the attribute array in a wasm event, plus methods to return attributes as the appropriate type, including doing range checking.

func (*WasmAttributes) GetAsInt

func (wa *WasmAttributes) GetAsInt(key string, bitSize int) (int64, error)

GetAsInt returns the attribute value as a signed int. It also performs range checking.

func (*WasmAttributes) GetAsString

func (wa *WasmAttributes) GetAsString(key string) (string, error)

GetAsString returns the attribute value as a string.

func (*WasmAttributes) GetAsUint

func (wa *WasmAttributes) GetAsUint(key string, bitSize int) (uint64, error)

GetAsUint returns the attribute value as an unsigned int. It also performs range checking.

func (*WasmAttributes) Parse

func (wa *WasmAttributes) Parse(logger *zap.Logger, event gjson.Result) error

Parse parses the attributes in a wasm event.

type Watcher

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

Watcher is responsible for monitoring the IBC contract on wormchain and publishing wormhole messages for all chains connected via IBC.

func NewWatcher

func NewWatcher(
	wsUrl string,
	lcdUrl string,
	blockHeightUrl string,
	contractAddress string,
	chainConfig ChainConfig,
) *Watcher

NewWatcher creates a new IBC contract watcher

func (*Watcher) Run

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

Run is the runnable for monitoring the IBC contract on wormchain.

Jump to

Keyboard shortcuts

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