Update context
This commit is contained in:
+13
-3
@@ -1,17 +1,27 @@
|
||||
package std
|
||||
|
||||
import (
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
clientx "github.com/cosmos/cosmos-sdk/client/tx"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||
)
|
||||
|
||||
var (
|
||||
_ sdk.Tx = (*Transaction)(nil)
|
||||
_ client.ClientTx = (*Transaction)(nil)
|
||||
_ sdk.Tx = (*Transaction)(nil)
|
||||
_ clientx.ClientTx = (*Transaction)(nil)
|
||||
_ clientx.TxGenerator = TxGenerator{}
|
||||
)
|
||||
|
||||
// TxGenerator defines a transaction generator that allows clients to construct
|
||||
// transactions.
|
||||
type TxGenerator struct{}
|
||||
|
||||
// NewTx returns a reference to an empty Transaction type.
|
||||
func (TxGenerator) NewTx() clientx.ClientTx {
|
||||
return &Transaction{}
|
||||
}
|
||||
|
||||
func NewTransaction(fee auth.StdFee, memo string, sdkMsgs []sdk.Msg) (*Transaction, error) {
|
||||
tx := &Transaction{
|
||||
StdTxBase: auth.NewStdTxBase(fee, nil, memo),
|
||||
|
||||
Reference in New Issue
Block a user