terra

package
v0.0.0-...-989067b Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventsToMessagePublications

func EventsToMessagePublications(contract string, txHash string, events []gjson.Result, logger *zap.Logger) []*common.MessagePublication

func ReadKey

func ReadKey(path string) (string, error)

ReadKey reads file and returns its content as a string

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

func SubmitVAA

func SubmitVAA(ctx context.Context, urlLCD string, chainID string, contractAddress string, feePayer string, signed *vaa.VAA) (*sdk.TxResponse, error)

SubmitVAA prepares transaction with signed VAA and sends it to the Terra blockchain

Types

type Watcher

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

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

func NewWatcher

func NewWatcher(
	urlWS string,
	urlLCD string,
	contract string,
	lockEvents chan *common.MessagePublication,
	setEvents chan *common.GuardianSet,
	obsvReqC chan *gossipv1.ObservationRequest) *Watcher

NewWatcher creates a new Terra contract watcher

func (*Watcher) Run

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

Jump to

Keyboard shortcuts

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