Documentation
¶
Overview ¶
Module to facilitate the registration of precompiles and their configuration.
Index ¶
- func GetRegistry() precompile.PrecompileRegistry
- func RegisterModule(stm Module) error
- func ReservedAddress(addr common.Address) bool
- type Module
- func (m Module) Address() common.Address
- func (m Module) ConfigKey() string
- func (m Module) Configurator() interface{}
- func (m Module) Contract() interface{}
- func (m Module) DefaultConfig() interface{}
- func (m Module) GetAddress() common.Address
- func (m Module) GetConfigKey() string
- func (m Module) GetConfigurator() interface{}
- func (m Module) GetContract() interface{}
- func (m Module) MakeConfig() interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRegistry ¶
func GetRegistry() precompile.PrecompileRegistry
GetRegistry returns the global registry instance
func RegisterModule ¶
RegisterModule registers a stateful precompile module
func ReservedAddress ¶
ReservedAddress returns true if [addr] is in a reserved range for custom precompiles
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module wraps a precompile contract with metadata
func GetPrecompileModule ¶
func GetPrecompileModuleByAddress ¶
Legacy functions for compatibility
func NewModule ¶
func NewModule(configKey string, address common.Address, contract interface{}, configurator interface{}) Module
NewModule creates a new Module instance
func RegisteredModules ¶
func RegisteredModules() []Module
func (Module) Configurator ¶
func (m Module) Configurator() interface{}
func (Module) DefaultConfig ¶
func (m Module) DefaultConfig() interface{}
func (Module) GetAddress ¶
GetAddress returns the module's address (for backward compatibility)
func (Module) GetConfigKey ¶
GetConfigKey returns the module's config key (for backward compatibility)
func (Module) GetConfigurator ¶
func (m Module) GetConfigurator() interface{}
GetConfigurator returns the module's configurator (for backward compatibility)
func (Module) GetContract ¶
func (m Module) GetContract() interface{}
GetContract returns the module's contract (for backward compatibility)
func (Module) MakeConfig ¶
func (m Module) MakeConfig() interface{}