tx

package
v0.0.0-...-539a74e Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MsgCreatePool

func MsgCreatePool(poolCreator string, poolTypeId uint32, depositCoins sdktypes.Coins) (sdktypes.Msg, error)

MsgCreatePool creates create pool message and returns MsgCreatePool transaction message.

func MsgDeposit

func MsgDeposit(poolCreator string, poolId uint64, depositCoins sdktypes.Coins) (sdktypes.Msg, error)

MsgDeposit creates deposit message and returns MsgDeposit transaction message.

func MsgSwap

func MsgSwap(poolCreator string, poolId uint64, swapTypeId uint32, offerCoin sdktypes.Coin,
	demandCoinDenom string, orderPrice sdktypes.Dec, swapFeeRate sdktypes.Dec) (sdktypes.Msg, error)

MsgSwap creates swap message and returns MsgWithdraw MsgSwap message.

func MsgTransfer

func MsgTransfer(cmd *cobra.Command, ctx sdkclient.Context, srcPort string, srcChannel string, coin sdktypes.Coin, sender string, receiver string) (sdktypes.Msg, error)

MsgCreatePool creates create pool message and returns MsgCreatePool transaction message.

func MsgWithdraw

func MsgWithdraw(poolCreator string, poolId uint64, poolCoin sdktypes.Coin) (sdktypes.Msg, error)

MsgWithdraw creates withdraw message and returns MsgWithdraw transaction message.

Types

type IBCtransaction

type IBCtransaction struct {
	Client   *client.Client `json:"client"`
	ChainID  string         `json:"chain_id"`
	GasLimit uint64         `json:"gas_limit"`
	Fees     sdktypes.Coins `json:"fees"`
	Memo     string         `json:"memo"`
}

Transaction is an object that has common fields when signing transaction.

type Transaction

type Transaction struct {
	Client   *client.Client `json:"client"`
	ChainID  string         `json:"chain_id"`
	GasLimit uint64         `json:"gas_limit"`
	Fees     sdktypes.Coins `json:"fees"`
	Memo     string         `json:"memo"`
}

Transaction is an object that has common fields when signing transaction.

func IbcNewtransaction

func IbcNewtransaction(client *client.Client, chainID string, gasLimit uint64, fees sdktypes.Coins, memo string) *Transaction

NewTransaction returns new Transaction object.

func NewTransaction

func NewTransaction(client *client.Client, chainID string, gasLimit uint64, fees sdktypes.Coins, memo string) *Transaction

NewTransaction returns new Transaction object.

func (*Transaction) CreateSwapBot

func (t *Transaction) CreateSwapBot(ctx context.Context, poolCreator string,
	poolId uint64, offerCoin sdktypes.Coin, demandCoinDenom string, msgNum int) ([]sdktypes.Msg, error)

CreateSwapBot creates a bot that makes multiple swaps which increases and decreases

func (*Transaction) CreateTransferBot

func (t *Transaction) CreateTransferBot(cmd *cobra.Command, ctx sdkclient.Context, srcPort string, srcChannel string, coin sdktypes.Coin, sender string, receiver string, msgNum int) ([]sdktypes.Msg, error)

func (*Transaction) IbcSign

func (t *Transaction) IbcSign(ctx context.Context, accSeq uint64, accNum uint64, privKey *secp256k1.PrivKey, msgs ...sdktypes.Msg) ([]byte, error)

Sign signs message(s) with the account's private key and braodacasts the message(s).

func (*Transaction) Sign

func (t *Transaction) Sign(ctx context.Context, accSeq uint64, accNum uint64, privKey *secp256k1.PrivKey, msgs ...sdktypes.Msg) ([]byte, error)

Sign signs message(s) with the account's private key and braodacasts the message(s).

Jump to

Keyboard shortcuts

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