tx

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

Factory implements a transaction context created in SDK modules.

func NewFactory

func NewFactory() *Factory

NewFactory return a point of the instance of Factory.

func (*Factory) AccountNumber

func (f *Factory) AccountNumber() uint64

AccountNumber returns accountNumber.

func (*Factory) Address

func (f *Factory) Address() string

Address returns the address.

func (*Factory) BuildAndSign

func (f *Factory) BuildAndSign(name string, msgs []sdk.Msg, json bool) ([]byte, error)

func (*Factory) BuildAndSigns added in v0.1.3

func (f *Factory) BuildAndSigns(msgs []sdk.Msg, json bool) ([]byte, error)

func (*Factory) BuildPvmAndSign added in v0.2.0

func (f *Factory) BuildPvmAndSign(name string, msgs sdk.Msg, json bool) ([]byte, error)

func (*Factory) BuildPvmUnsignedTx added in v0.2.0

func (f *Factory) BuildPvmUnsignedTx(msgs sdk.Msg) (sdk.TxBuilder, error)

func (*Factory) BuildUnsignedTx

func (f *Factory) BuildUnsignedTx(msgs []sdk.Msg) (sdk.TxBuilder, error)

func (*Factory) BuildUnsignedTxs added in v0.1.3

func (f *Factory) BuildUnsignedTxs(msgs []sdk.Msg) (sdk.TxBuilder, error)

func (*Factory) ChainID

func (f *Factory) ChainID() string

ChainID returns the chainID of the current chain.

func (*Factory) Fees

func (f *Factory) Fees() sdk.Coins

Fees returns the fee of the transaction.

func (*Factory) Gas

func (f *Factory) Gas() uint64

Gas returns the gas of the transaction.

func (Factory) GasAdjustment

func (f Factory) GasAdjustment() float64

GasAdjustment returns the gasAdjustment.

func (*Factory) KeyManager

func (f *Factory) KeyManager() sdk.KeyManager

KeyManager returns keyManager.

func (*Factory) Memo

func (f *Factory) Memo() string

Memo returns memo.

func (*Factory) Mode

func (f *Factory) Mode() sdk.BroadcastMode

Mode returns mode.

func (*Factory) Password

func (f *Factory) Password() string

Password returns password.

func (*Factory) Sequence

func (f *Factory) Sequence() uint64

Sequence returns the sequence of the account.

func (*Factory) Sign

func (f *Factory) Sign(name string, txBuilder sdk.TxBuilder) error

Sign signs a transaction given a name, passphrase, and a single message to signed. An error is returned if signing fails.

func (*Factory) Signs added in v0.1.3

func (f *Factory) Signs(txBuilder sdk.TxBuilder) error

func (*Factory) SimulateAndExecute

func (f *Factory) SimulateAndExecute() bool

SimulateAndExecute returns the option to simulateAndExecute and then execute the transaction using the gas from the simulation results

func (*Factory) WithAccountNumber

func (f *Factory) WithAccountNumber(accnum uint64) *Factory

WithAccountNumber returns a pointer of the context with an account number.

func (*Factory) WithAddress

func (f *Factory) WithAddress(address string) *Factory

WithAddress returns a pointer of the context with a password.

func (*Factory) WithChainID

func (f *Factory) WithChainID(chainID string) *Factory

WithChainID returns a pointer of the context with an updated ChainID.

func (*Factory) WithFee

func (f *Factory) WithFee(fee sdk.Coins) *Factory

WithFee returns a pointer of the context with an updated Fee.

func (*Factory) WithGas

func (f *Factory) WithGas(gas uint64) *Factory

WithGas returns a pointer of the context with an updated Gas.

func (*Factory) WithGasAdjustment

func (f *Factory) WithGasAdjustment(gasAdjustment float64) *Factory

WithGasAdjustment returns a pointer of the context with an updated gasAdjustment.

func (*Factory) WithKeyManager

func (f *Factory) WithKeyManager(keyManager sdk.KeyManager) *Factory

WithKeyManager returns a pointer of the context with a KeyManager.

func (*Factory) WithMemo

func (f *Factory) WithMemo(memo string) *Factory

WithMemo returns a pointer of the context with an updated memo.

func (*Factory) WithMode

func (f *Factory) WithMode(mode sdk.BroadcastMode) *Factory

WithMode returns a pointer of the context with a Mode.

func (*Factory) WithPassword

func (f *Factory) WithPassword(password string) *Factory

WithPassword returns a pointer of the context with a password.

func (*Factory) WithQueryFunc

func (f *Factory) WithQueryFunc(queryFunc QueryWithData) *Factory

WithQueryFunc returns a pointer of the context with an queryFunc.

func (*Factory) WithSequence

func (f *Factory) WithSequence(sequence uint64) *Factory

WithSequence returns a pointer of the context with an updated sequence number.

func (*Factory) WithSignModeHandler

func (f *Factory) WithSignModeHandler(signModeHandler sdk.SignModeHandler) *Factory

WithSignModeHandler returns a pointer of the context with an signModeHandler.

func (*Factory) WithSimulateAndExecute

func (f *Factory) WithSimulateAndExecute(simulate bool) *Factory

WithSimulateAndExecute returns a pointer of the context with a simulateAndExecute.

func (*Factory) WithTranAggrc added in v0.1.3

func (f *Factory) WithTranAggrc(name, address, pass string, accountNumber, sequence uint64) *Factory

func (*Factory) WithTxConfig

func (f *Factory) WithTxConfig(txConfig sdk.TxConfig) *Factory

WithTxConfig returns a pointer of the context with an TxConfig

type QueryWithData

type QueryWithData func(string, []byte) ([]byte, int64, error)

QueryWithData implements a query method from cschain.

Jump to

Keyboard shortcuts

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