Documentation ¶
Index ¶
- Constants
- func OnDispatch(index int32) *wasmlib.ScExportMap
- type Funcs
- type GetErrorMessageFormatCall
- type ImmutableGetErrorMessageFormatParams
- type ImmutableGetErrorMessageFormatResults
- type ImmutableRegisterErrorParams
- type ImmutableRegisterErrorResults
- type MutableGetErrorMessageFormatParams
- type MutableGetErrorMessageFormatResults
- type MutableRegisterErrorParams
- type MutableRegisterErrorResults
- type RegisterErrorCall
Constants ¶
View Source
const ( ScName = "errors" ScDescription = "Errors Contract" HScName = wasmtypes.ScHname(0x8f3a8bb3) )
View Source
const ( ParamErrorCode = "c" ParamTemplate = "m" )
View Source
const ( ResultErrorCode = "c" ResultTemplate = "m" )
View Source
const ( FuncRegisterError = "registerError" ViewGetErrorMessageFormat = "getErrorMessageFormat" )
View Source
const ( HFuncRegisterError = wasmtypes.ScHname(0x9be65f8e) HViewGetErrorMessageFormat = wasmtypes.ScHname(0x63fe7d56) )
Variables ¶
This section is empty.
Functions ¶
func OnDispatch ¶
func OnDispatch(index int32) *wasmlib.ScExportMap
Types ¶
type Funcs ¶
type Funcs struct{}
var ScFuncs Funcs
func (Funcs) GetErrorMessageFormat ¶
func (sc Funcs) GetErrorMessageFormat(ctx wasmlib.ScViewClientContext) *GetErrorMessageFormatCall
Returns the message template stored for a given error code.
func (Funcs) RegisterError ¶
func (sc Funcs) RegisterError(ctx wasmlib.ScFuncClientContext) *RegisterErrorCall
Registers an error message template. note that this function must be call()ed
type GetErrorMessageFormatCall ¶
type GetErrorMessageFormatCall struct { Func *wasmlib.ScView Params MutableGetErrorMessageFormatParams Results ImmutableGetErrorMessageFormatResults }
type ImmutableGetErrorMessageFormatParams ¶
func NewImmutableGetErrorMessageFormatParams ¶
func NewImmutableGetErrorMessageFormatParams() ImmutableGetErrorMessageFormatParams
func (ImmutableGetErrorMessageFormatParams) ErrorCode ¶
func (s ImmutableGetErrorMessageFormatParams) ErrorCode() wasmtypes.ScImmutableBytes
serialized error code
type ImmutableGetErrorMessageFormatResults ¶
func (ImmutableGetErrorMessageFormatResults) Template ¶
func (s ImmutableGetErrorMessageFormatResults) Template() wasmtypes.ScImmutableString
error message template string
type ImmutableRegisterErrorParams ¶
func NewImmutableRegisterErrorParams ¶
func NewImmutableRegisterErrorParams() ImmutableRegisterErrorParams
func (ImmutableRegisterErrorParams) Template ¶
func (s ImmutableRegisterErrorParams) Template() wasmtypes.ScImmutableString
error message template string
type ImmutableRegisterErrorResults ¶
func (ImmutableRegisterErrorResults) ErrorCode ¶
func (s ImmutableRegisterErrorResults) ErrorCode() wasmtypes.ScImmutableBytes
serialized error code
type MutableGetErrorMessageFormatParams ¶
func (MutableGetErrorMessageFormatParams) ErrorCode ¶
func (s MutableGetErrorMessageFormatParams) ErrorCode() wasmtypes.ScMutableBytes
serialized error code
type MutableGetErrorMessageFormatResults ¶
func NewMutableGetErrorMessageFormatResults ¶
func NewMutableGetErrorMessageFormatResults() MutableGetErrorMessageFormatResults
func (MutableGetErrorMessageFormatResults) Template ¶
func (s MutableGetErrorMessageFormatResults) Template() wasmtypes.ScMutableString
error message template string
type MutableRegisterErrorParams ¶
func (MutableRegisterErrorParams) Template ¶
func (s MutableRegisterErrorParams) Template() wasmtypes.ScMutableString
error message template string
type MutableRegisterErrorResults ¶
func NewMutableRegisterErrorResults ¶
func NewMutableRegisterErrorResults() MutableRegisterErrorResults
func (MutableRegisterErrorResults) ErrorCode ¶
func (s MutableRegisterErrorResults) ErrorCode() wasmtypes.ScMutableBytes
serialized error code
type RegisterErrorCall ¶
type RegisterErrorCall struct { Func *wasmlib.ScFunc Params MutableRegisterErrorParams Results ImmutableRegisterErrorResults }
Click to show internal directories.
Click to hide internal directories.