mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
36 lines
571 B
Go
36 lines
571 B
Go
|
package decorators
|
||
|
|
||
|
import (
|
||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||
|
protov2 "google.golang.org/protobuf/proto"
|
||
|
)
|
||
|
|
||
|
// Define an empty ante handle
|
||
|
var (
|
||
|
EmptyAnte = func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) {
|
||
|
return ctx, nil
|
||
|
}
|
||
|
)
|
||
|
|
||
|
type MockTx struct {
|
||
|
msgs []sdk.Msg
|
||
|
}
|
||
|
|
||
|
func NewMockTx(msgs ...sdk.Msg) MockTx {
|
||
|
return MockTx{
|
||
|
msgs: msgs,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (tx MockTx) GetMsgs() []sdk.Msg {
|
||
|
return tx.msgs
|
||
|
}
|
||
|
|
||
|
func (tx MockTx) GetMsgsV2() ([]protov2.Message, error) {
|
||
|
return nil, nil
|
||
|
}
|
||
|
|
||
|
func (tx MockTx) ValidateBasic() error {
|
||
|
return nil
|
||
|
}
|