sudo

package
v0.0.3-rc-1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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 DecodeEvent(moduleIndex sc.U8, buffer *bytes.Buffer) (primitives.Event, error)

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

type GenesisConfig struct {
	Key types.AccountId
}

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 (m Module) BuildConfig(config []byte) error

func (Module) CreateDefaultConfig

func (m Module) CreateDefaultConfig() ([]byte, error)

func (Module) Functions

func (m Module) Functions() map[sc.U8]primitives.Call

func (Module) GetIndex

func (m Module) GetIndex() sc.U8

func (Module) Metadata

func (m Module) Metadata() primitives.MetadataModule

func (Module) PreDispatch

func (m Module) PreDispatch(call primitives.Call) (sc.Empty, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL