types

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 7 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HTTPProtocols = regexp.MustCompile("https?://")
)

Functions

func CreateGrpcConnection

func CreateGrpcConnection(address string) (*grpc.ClientConn, error)

CreateGrpcConnection creates a new gRPC client connection from the given configuration

Types

type AccountConfig

type AccountConfig struct {
	Mnemonic string `toml:"mnemonic" yaml:"mnemonic"`
	HDPath   string `toml:"hd_path" yaml:"hd_path"`
}

type ChainConfig

type ChainConfig struct {
	Bech32Prefix  string  `toml:"bech32_prefix" yaml:"bech32_prefix"`
	RPCAddr       string  `toml:"rpc_addr" yaml:"rpc_addr"`
	GRPCAddr      string  `toml:"grpc_addr" yaml:"grpc_addr"`
	GasPrice      string  `toml:"gas_price" yaml:"gas_price"`
	GasAdjustment float64 `toml:"gas_adjustment" yaml:"gas_adjustment"`
}

type TransactionData

type TransactionData struct {
	Messages   []sdk.Msg
	Memo       string
	GasLimit   uint64
	GasAuto    bool
	FeeAmount  sdk.Coins
	FeeAuto    bool
	FeeGranter sdk.AccAddress
	Sequence   *uint64
}

TransactionData contains all the data about a transaction

func NewTransactionData

func NewTransactionData(msgs ...sdk.Msg) *TransactionData

NewTransactionData builds a new TransactionData instance

func (*TransactionData) WithFeeAmount

func (t *TransactionData) WithFeeAmount(amount sdk.Coins) *TransactionData

WithFeeAmount allows to set the given fee amount

func (*TransactionData) WithFeeAuto

func (t *TransactionData) WithFeeAuto() *TransactionData

WithFeeAuto allows to automatically compute the fee amount to be used when broadcasting the transaction

func (*TransactionData) WithFeeGranter

func (t *TransactionData) WithFeeGranter(granter sdk.AccAddress) *TransactionData

WithFeeGranter allows to set the given fee granter that will pay for fees. To work properly, a fee grant must exist from the granter towards the transaction signer.

func (*TransactionData) WithGasAuto

func (t *TransactionData) WithGasAuto() *TransactionData

WithGasAuto allows to automatically compute the amount of gas to be used when broadcasting the transaction

func (*TransactionData) WithGasLimit

func (t *TransactionData) WithGasLimit(limit uint64) *TransactionData

WithGasLimit allows to set the given gas limit

func (*TransactionData) WithMemo

func (t *TransactionData) WithMemo(memo string) *TransactionData

WithMemo allows to set the given memo

func (*TransactionData) WithSequence added in v0.7.0

func (t *TransactionData) WithSequence(sequence uint64) *TransactionData

WithSequence allows to set the given sequence

Jump to

Keyboard shortcuts

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