Documentation ¶
Index ¶
- Constants
- func DecodeEvent(moduleIndex sc.U8, buffer *bytes.Buffer) (primitives.Event, error)
- func NewDispatchErrorRequireSudo(moduleId sc.U8) primitives.DispatchError
- type Config
- type GenesisConfig
- type Module
- func (m Module) BuildConfig(config []byte) error
- func (m Module) CreateDefaultConfig() ([]byte, error)
- func (m Module) Functions() map[sc.U8]primitives.Call
- func (m Module) GetIndex() sc.U8
- func (m Module) Metadata() primitives.MetadataModule
- func (m Module) PreDispatch(call primitives.Call) (sc.Empty, error)
- func (m Module) ValidateUnsigned(_ primitives.TransactionSource, _ primitives.Call) (primitives.ValidTransaction, error)
Constants ¶
View Source
const ( EventSudid sc.U8 = iota EventKeyChanged EventKeyRemoved EventSudoAsDone )
Sudo module events.
View Source
const (
ErrorRequireSudo sc.U8 = iota
)
Sudo module errors.
Variables ¶
This section is empty.
Functions ¶
func DecodeEvent ¶
func NewDispatchErrorRequireSudo ¶
func NewDispatchErrorRequireSudo(moduleId sc.U8) primitives.DispatchError
Types ¶
type Config ¶
type Config struct { Storage io.Storage DbWeight primitives.RuntimeDbWeight EventDepositor primitives.EventDepositor }
func NewConfig ¶
func NewConfig(storage io.Storage, dbWeight primitives.RuntimeDbWeight, eventDepositor primitives.EventDepositor) Config
type GenesisConfig ¶
func (*GenesisConfig) UnmarshalJSON ¶
func (gc *GenesisConfig) UnmarshalJSON(data []byte) error
type Module ¶
type Module struct { primitives.DefaultInherentProvider hooks.DefaultDispatchModule // contains filtered or unexported fields }
func New ¶
func New(index sc.U8, config Config, mdGenerator *primitives.MetadataTypeGenerator, logger log.RuntimeLogger) Module
func (Module) BuildConfig ¶
func (Module) CreateDefaultConfig ¶
func (Module) Metadata ¶
func (m Module) Metadata() primitives.MetadataModule
func (Module) PreDispatch ¶
func (Module) ValidateUnsigned ¶
func (m Module) ValidateUnsigned(_ primitives.TransactionSource, _ primitives.Call) (primitives.ValidTransaction, error)
Click to show internal directories.
Click to hide internal directories.