mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
41 lines
1.2 KiB
Go
41 lines
1.2 KiB
Go
// (c) 2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package precompile
|
|
|
|
import (
|
|
"github.com/luxfi/geth/common"
|
|
)
|
|
|
|
// PrecompileRegistry manages precompile modules
|
|
type PrecompileRegistry interface {
|
|
// GetPrecompileModule returns a precompile module by key
|
|
GetPrecompileModule(key string) (PrecompileModule, bool)
|
|
|
|
// GetPrecompileModuleByAddress returns a precompile module by address
|
|
GetPrecompileModuleByAddress(address common.Address) (PrecompileModule, bool)
|
|
|
|
// RegisteredModules returns all registered modules
|
|
RegisteredModules() []PrecompileModule
|
|
}
|
|
|
|
// PrecompileModule represents a precompile module
|
|
type PrecompileModule interface {
|
|
// Address returns the address of the precompile
|
|
Address() common.Address
|
|
|
|
// Contract returns the precompile contract
|
|
Contract() interface{}
|
|
|
|
// Configurator returns the configurator for this precompile
|
|
Configurator() interface{}
|
|
|
|
// DefaultConfig returns the default config for this precompile
|
|
DefaultConfig() interface{}
|
|
|
|
// MakeConfig creates a new config instance
|
|
MakeConfig() interface{}
|
|
|
|
// ConfigKey returns the configuration key for this module
|
|
ConfigKey() string
|
|
} |