cosmostxm

package
v2.4.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 26 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 cosmos transmitter key for use in the cosmos txbuilder and client, see chainlink-cosmos.

func NewKeyWrapper

func NewKeyWrapper(key cosmoskey.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 cosmos tx management.

func NewORM

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

NewORM creates an ORM scoped to chainID.

func (*ORM) GetMsgs

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

GetMsgs returns any messages matching ids.

func (*ORM) GetMsgsState

func (o *ORM) GetMsgsState(state db.State, limit int64, qopts ...pg.QOpt) (adapters.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, qopts ...pg.QOpt) (int64, error)

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

func (*ORM) UpdateMsgs

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.

func (*ORM) UpdateMsgsContract

func (o *ORM) UpdateMsgsContract(contractID string, from, to db.State, qopts ...pg.QOpt) error

UpdateMsgsContract updates messages for the given contract.

type Txm

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

Txm manages transactions for the cosmos 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 cosmos chain.

func (*Txm) GasPrice

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

GasPrice returns the gas price from the estimator in uatom.

func (*Txm) GetMsgs

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

GetMsgs returns any messages matching ids.

func (*Txm) HealthReport

func (txm *Txm) HealthReport() map[string]error

func (*Txm) Healthy

func (txm *Txm) Healthy() error

Healthy service is healthy

func (*Txm) Name

func (txm *Txm) Name() string

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 cosmos msg inserts and processes them.

Jump to

Keyboard shortcuts

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