terratxm

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyWrapper

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

KeyWrapper wrapper around a terra transmitter key for use in the terra txbuilder and client.

func NewKeyWrapper

func NewKeyWrapper(key terrakey.Key) KeyWrapper

NewKeyWrapper create a key wrapper

func (KeyWrapper) Bytes

func (k KeyWrapper) Bytes() []byte

Bytes does not expose private key

func (KeyWrapper) Equals

Equals compare against another key

func (KeyWrapper) ProtoMessage

func (k KeyWrapper) ProtoMessage()

ProtoMessage nop

func (KeyWrapper) PubKey

func (k KeyWrapper) PubKey() cryptotypes.PubKey

PubKey get the pubkey

func (KeyWrapper) Reset

func (k KeyWrapper) Reset()

Reset nop

func (KeyWrapper) Sign

func (k KeyWrapper) Sign(msg []byte) ([]byte, error)

Sign sign a message with key

func (KeyWrapper) String

func (k KeyWrapper) String() string

String nop

func (KeyWrapper) Type

func (k KeyWrapper) Type() string

Type nop

type ORM

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

ORM manages the data model for terra tx management.

func NewORM

func NewORM(chainID string, db *sqlx.DB, lggr logger.Logger, cfg pg.LogConfig) *ORM

NewORM creates an ORM scoped to chainID.

func (*ORM) GetMsgs added in v1.3.0

func (o *ORM) GetMsgs(ids ...int64) (terra.Msgs, error)

GetMsgs returns any messages matching ids.

func (*ORM) GetMsgsState added in v1.3.0

func (o *ORM) GetMsgsState(state db.State, limit int64, qopts ...pg.QOpt) (terra.Msgs, error)

GetMsgsState returns the oldest messages with a given state up to limit.

func (*ORM) InsertMsg

func (o *ORM) InsertMsg(contractID, typeURL string, msg []byte) (int64, error)

InsertMsg inserts a terra msg, assumed to be a serialized terra ExecuteContractMsg.

func (*ORM) UpdateMsgs added in v1.3.0

func (o *ORM) UpdateMsgs(ids []int64, state db.State, txHash *string, qopts ...pg.QOpt) error

UpdateMsgs updates msgs with the given ids. Note state transitions are validated at the db level.

type Txm

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

Txm manages transactions for the terra blockchain.

func NewTxm

NewTxm creates a txm. Uses simulation so should only be used to send txes to trusted contracts i.e. OCR.

func (*Txm) Close

func (txm *Txm) Close() error

Close close service

func (*Txm) Enqueue

func (txm *Txm) Enqueue(contractID string, msg sdk.Msg) (int64, error)

Enqueue enqueue a msg destined for the terra chain.

func (*Txm) GasPrice added in v1.3.0

func (txm *Txm) GasPrice() (sdk.DecCoin, error)

GasPrice returns the gas price from the estimator in uluna.

func (*Txm) GetMsgs added in v1.3.0

func (txm *Txm) GetMsgs(ids ...int64) (terra.Msgs, error)

GetMsgs returns any messages matching ids.

func (*Txm) Healthy

func (txm *Txm) Healthy() error

Healthy service is healthy

func (*Txm) Ready

func (txm *Txm) Ready() error

Ready service is ready

func (*Txm) Start

func (txm *Txm) Start(context.Context) error

Start subscribes to pg notifications about terra msg inserts and processes them.

Jump to

Keyboard shortcuts

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