Files
evm/precompile/modules/module.go
T
zeekay 4b6bbca432 Fix CI: Go version and script permissions
- Change Go version from 1.24.6 to 1.22.8 (stable version)
- Ensure all build scripts have executable permissions
- Fix covdata issue by using stable Go version
- CI should now pass all checks
2025-09-19 05:56:47 +00:00

38 lines
1009 B
Go

// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package modules
import (
"bytes"
"github.com/luxfi/evm/precompile/contract"
"github.com/luxfi/geth/common"
)
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
}
type moduleArray []Module
func (u moduleArray) Len() int {
return len(u)
}
func (u moduleArray) Swap(i, j int) {
u[i], u[j] = u[j], u[i]
}
func (m moduleArray) Less(i, j int) bool {
return bytes.Compare(m[i].Address.Bytes(), m[j].Address.Bytes()) < 0
}