Documentation ¶
Index ¶
- func NoopAnteHandler(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error)
- type MockContractViewer
- func (v *MockContractViewer) AddContractAdmin(contractAddr, adminAddr string)
- func (v MockContractViewer) GetContractInfo(ctx sdk.Context, contractAddress sdk.AccAddress) *wasmdTypes.ContractInfo
- func (v MockContractViewer) HasContractInfo(ctx sdk.Context, contractAddress sdk.AccAddress) bool
- func (v *MockContractViewer) SetReturnSudoError(returnSudoError error)
- func (v MockContractViewer) Sudo(ctx sdk.Context, contractAddress sdk.AccAddress, msg []byte) ([]byte, error)
- type MockFeeTx
- type MockFeeTxOption
- type MockMessenger
- type MockMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockContractViewer ¶
type MockContractViewer struct {
// contains filtered or unexported fields
}
MockContractViewer mocks x/wasmd module dependency. Mock returns a contract info if admin is set.
func NewMockContractViewer ¶
func NewMockContractViewer() *MockContractViewer
NewMockContractViewer creates a new MockContractViewer instance.
func (*MockContractViewer) AddContractAdmin ¶
func (v *MockContractViewer) AddContractAdmin(contractAddr, adminAddr string)
AddContractAdmin adds a contract admin link.
func (MockContractViewer) GetContractInfo ¶
func (v MockContractViewer) GetContractInfo(ctx sdk.Context, contractAddress sdk.AccAddress) *wasmdTypes.ContractInfo
GetContractInfo returns a contract info if admin is set.
func (MockContractViewer) HasContractInfo ¶
func (v MockContractViewer) HasContractInfo(ctx sdk.Context, contractAddress sdk.AccAddress) bool
HasContractInfo returns true if admin is set.
func (*MockContractViewer) SetReturnSudoError ¶
func (v *MockContractViewer) SetReturnSudoError(returnSudoError error)
func (MockContractViewer) Sudo ¶
func (v MockContractViewer) Sudo(ctx sdk.Context, contractAddress sdk.AccAddress, msg []byte) ([]byte, error)
Sudo implements the wasmKeeper.ContractInfoViewer interface.
type MockFeeTx ¶
type MockFeeTx struct {
// contains filtered or unexported fields
}
MockFeeTx is a mock implementation of sdk.FeeTx.
func NewMockFeeTx ¶
func NewMockFeeTx(opts ...MockFeeTxOption) MockFeeTx
NewMockFeeTx creates a new MockFeeTx instance. CONTRACT: tx has no defaults, so it is up to a developer to set options right.
func (MockFeeTx) FeeGranter ¶
func (tx MockFeeTx) FeeGranter() sdk.AccAddress
FeeGranter implements the sdk.FeeTx interface.
func (MockFeeTx) FeePayer ¶
func (tx MockFeeTx) FeePayer() sdk.AccAddress
FeePayer implements the sdk.FeeTx interface.
func (MockFeeTx) ValidateBasic ¶
ValidateBasic implemets the sdk.Tx interface.
type MockFeeTxOption ¶
type MockFeeTxOption func(tx *MockFeeTx)
func WithMockFeeTxFees ¶
func WithMockFeeTxFees(fees sdk.Coins) MockFeeTxOption
WithMockFeeTxFees option sets the fees of the MockFeeTx.
func WithMockFeeTxGas ¶
func WithMockFeeTxGas(gas uint64) MockFeeTxOption
WithMockFeeTxGas option sets the gas limit of the MockFeeTx.
func WithMockFeeTxMsgs ¶
func WithMockFeeTxMsgs(msgs ...sdk.Msg) MockFeeTxOption
WithMockFeeTxMsgs option sets the msgs of the MockFeeTx.
func WithMockFeeTxPayer ¶
func WithMockFeeTxPayer(payer sdk.AccAddress) MockFeeTxOption
WithMockFeeTxPayer option sets the feePayer of the MockFeeTx.
type MockMessenger ¶
type MockMessenger struct{}
MockMessenger mocks x/wasmd module dependency.
func NewMockMessenger ¶
func NewMockMessenger() *MockMessenger
NewMockMessenger creates a new MockMessenger instance.
func (MockMessenger) DispatchMsg ¶
func (m MockMessenger) DispatchMsg(ctx sdk.Context, contractAddr sdk.AccAddress, contractIBCPortID string, msg wasmVmTypes.CosmosMsg) ([]sdk.Event, [][]byte, error)
DispatchMsg implements the wasmKeeper.Messenger interface.
type MockMsg ¶
type MockMsg struct{}
MockMsg is a dummy sdk.Msg.
func (MockMsg) GetSigners ¶
func (msg MockMsg) GetSigners() []sdk.AccAddress
GetSigners implements the sdk.Msg interface.
func (MockMsg) ProtoMessage ¶
func (msg MockMsg) ProtoMessage()
ProtoMessage implements the proto.Message interface.
func (MockMsg) ValidateBasic ¶
ValidateBasic implements the sdk.Msg interface.