Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func PrepareOpenAckCallbackMessage(details types.OpenAckDetails) ([]byte, error)
- func PrepareSudoCallbackMessage(request channeltypes.Packet, ack *channeltypes.Acknowledgement) ([]byte, error)
- func RedactError(err error) error
- type Keeper
- func (k Keeper) AddContractFailure(ctx context.Context, address string, sudoPayload []byte, errMsg string) types.Failure
- func (k Keeper) AddressFailure(c context.Context, req *types.QueryFailureRequest) (*types.QueryAddressFailureResponse, error)
- func (k Keeper) AddressFailures(c context.Context, req *types.QueryFailuresByAddressRequest) (*types.QueryAddressFailuresResponse, error)
- func (k Keeper) Failures(c context.Context, req *types.QueryFailuresRequest) (*types.QueryFailuresResponse, error)
- func (k Keeper) GetAllFailures(ctx context.Context) (list []types.Failure)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetFailure(ctx sdk.Context, contractAddr sdk.AccAddress, id uint64) (*types.Failure, error)
- func (k Keeper) GetNextFailureIDKey(ctx context.Context, address string) uint64
- func (k Keeper) GetParams(ctx context.Context) (params types.Params, err error)
- func (k Keeper) HasContractInfo(ctx context.Context, contractAddress sdk.AccAddress) bool
- func (k Keeper) Logger(ctx context.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) ResubmitFailure(ctx sdk.Context, contractAddr sdk.AccAddress, failure *types.Failure) error
- func (k Keeper) SetParams(ctx context.Context, params types.Params) error
- func (k Keeper) SudoKVQueryResult(ctx context.Context, contractAddress sdk.AccAddress, queryID uint64) ([]byte, error)
- func (k Keeper) SudoTxQueryResult(ctx context.Context, contractAddress sdk.AccAddress, queryID uint64, ...) ([]byte, error)
- func (k Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
- type Migrator
Constants ¶
const FailuresQueryMaxLimit uint64 = query.DefaultLimit
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func PrepareOpenAckCallbackMessage ¶
func PrepareOpenAckCallbackMessage(details types.OpenAckDetails) ([]byte, error)
func PrepareSudoCallbackMessage ¶
func PrepareSudoCallbackMessage(request channeltypes.Packet, ack *channeltypes.Acknowledgement) ([]byte, error)
func RedactError ¶
RedactError removes non-determenistic details from the error returning just codespace and core of the error. Returns full error for system errors.
Copy+paste from https://github.com/neutron-org/wasmd/blob/5b59886e41ed55a7a4a9ae196e34b0852285503d/x/wasm/keeper/msg_dispatcher.go#L175-L190
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, wasmKeeper types.WasmKeeper, authority string, ) *Keeper
func (Keeper) AddContractFailure ¶
func (k Keeper) AddContractFailure(ctx context.Context, address string, sudoPayload []byte, errMsg string) types.Failure
AddContractFailure adds a specific failure to the store. The provided address is used to determine the failure ID and they both are used to create a storage key for the failure.
WARNING: The errMsg string parameter is expected to be deterministic. It means that the errMsg must be OS/library version agnostic and carry a concrete defined error message. One of the good ways to do so is to redact error using the RedactError func as it is done in SudoLimitWrapper Sudo method: https://github.com/neutron-org/neutron/blob/eb8b5ae50907439ff9af0527a42ef0cb448a78b5/x/contractmanager/ibc_middleware.go#L42. Another good way could be passing here some constant value.
func (Keeper) AddressFailure ¶
func (k Keeper) AddressFailure(c context.Context, req *types.QueryFailureRequest) (*types.QueryAddressFailureResponse, error)
func (Keeper) AddressFailures ¶
func (k Keeper) AddressFailures(c context.Context, req *types.QueryFailuresByAddressRequest) (*types.QueryAddressFailuresResponse, error)
func (Keeper) Failures ¶
func (k Keeper) Failures(c context.Context, req *types.QueryFailuresRequest) (*types.QueryFailuresResponse, error)
func (Keeper) GetAllFailures ¶
GetAllFailures returns all failures.
func (Keeper) GetAuthority ¶
func (Keeper) GetFailure ¶
func (Keeper) GetNextFailureIDKey ¶
func (Keeper) HasContractInfo ¶
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) ResubmitFailure ¶
func (k Keeper) ResubmitFailure(ctx sdk.Context, contractAddr sdk.AccAddress, failure *types.Failure) error
ResubmitFailure tries to call sudo handler for contract with same parameters as initially.
func (Keeper) SudoKVQueryResult ¶
func (k Keeper) SudoKVQueryResult( ctx context.Context, contractAddress sdk.AccAddress, queryID uint64, ) ([]byte, error)
SudoKVQueryResult is used to pass a kv query id to the contract that registered the query when a query result is provided by the relayer.
func (Keeper) SudoTxQueryResult ¶
func (k Keeper) SudoTxQueryResult( ctx context.Context, contractAddress sdk.AccAddress, queryID uint64, height ibcclienttypes.Height, data []byte, ) ([]byte, error)
SudoTxQueryResult is used to pass a tx query result to the contract that registered the query to:
- check whether the transaction actually satisfies the initial query arguments;
- execute business logic related to the tx query result / save the result to state.
func (Keeper) UpdateParams ¶
func (k Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
UpdateParams updates the module parameters.