modules

package
v0.13.8 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: GPL-3.0, LGPL-3.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterModule

func RegisterModule(stm Module) error

RegisterModule registers a stateful precompile module

func ReservedAddress

func ReservedAddress(addr common.Address) bool

ReservedAddress returns true if [addr] is in a reserved range for custom precompiles

Types

type Module

type Module struct {
	// ConfigKey is the key used in json config files to specify this precompile config.
	ConfigKey string
	// Address returns the address where the stateful precompile is accessible.
	Address common.Address
	// Contract returns a thread-safe singleton that can be used as the StatefulPrecompiledContract when
	// this config is enabled.
	Contract contract.StatefulPrecompiledContract
	// Configurator is used to configure the stateful precompile when the config is enabled.
	contract.Configurator
}

func GetPrecompileModule

func GetPrecompileModule(key string) (Module, bool)

func GetPrecompileModuleByAddress

func GetPrecompileModuleByAddress(address common.Address) (Module, bool)

func RegisteredModules

func RegisteredModules() []Module

Jump to

Keyboard shortcuts

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