diff --git a/accounts/abi/bind/precompilebind/precompile_module_template.go b/accounts/abi/bind/precompilebind/precompile_module_template.go index 93531b82c8..8ee9cceba5 100644 --- a/accounts/abi/bind/precompilebind/precompile_module_template.go +++ b/accounts/abi/bind/precompilebind/precompile_module_template.go @@ -59,7 +59,7 @@ func (*configurator) MakeConfig() precompileconfig.Config { // This function is called by the EVM once per precompile contract activation. // You can use this function to set up your precompile contract's initial state, // by using the [cfg] config and [state] stateDB. -func (*configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int, blockTime uint64) error { +func (*configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int) error { // CUSTOM CODE STARTS HERE {{- if .Contract.AllowList}} config, ok := cfg.(*Config) diff --git a/core/state_processor.go b/core/state_processor.go index 9c154bd806..666f6d9378 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -241,7 +241,7 @@ func ApplyPrecompileActivations(c *params.ChainConfig, parentTimestamp *uint64, // can be called from within Solidity contracts. Solidity adds a check before invoking a contract to ensure // that it does not attempt to invoke a non-existent contract. statedb.SetCode(module.Address, []byte{0x1}) - if err := module.Configure(c, activatingConfig, statedb, blockNumber, blockTime); err != nil { + if err := module.Configure(c, activatingConfig, statedb, blockNumber); err != nil { return fmt.Errorf("could not configure precompile, name: %s, reason: %w", module.ConfigKey, err) } } diff --git a/precompile/allowlist/allowlist_test.go b/precompile/allowlist/allowlist_test.go index 78d6696e35..74ad3cd8be 100644 --- a/precompile/allowlist/allowlist_test.go +++ b/precompile/allowlist/allowlist_test.go @@ -51,7 +51,6 @@ func (d *dummyConfigurator) Configure( precompileConfig precompileconfig.Config, state contract.StateDB, blockNumber *big.Int, - blockTime uint64, ) error { cfg := precompileConfig.(*dummyConfig) return cfg.AllowListConfig.Configure(chainConfig, dummyAddr, state) diff --git a/precompile/contract/interfaces.go b/precompile/contract/interfaces.go index c542ad0c74..975b54a1b3 100644 --- a/precompile/contract/interfaces.go +++ b/precompile/contract/interfaces.go @@ -67,6 +67,5 @@ type Configurator interface { precompileconfig precompileconfig.Config, state StateDB, blockNumber *big.Int, - blockTime uint64, ) error } diff --git a/precompile/contracts/deployerallowlist/module.go b/precompile/contracts/deployerallowlist/module.go index 14bdff22d3..064ef3d290 100644 --- a/precompile/contracts/deployerallowlist/module.go +++ b/precompile/contracts/deployerallowlist/module.go @@ -44,7 +44,7 @@ func (*configurator) MakeConfig() precompileconfig.Config { // Configure configures [state] with the given [cfg] precompileconfig. // This function is called by the EVM once per precompile contract activation. -func (c *configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int, blockTime uint64) error { +func (c *configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int) error { config, ok := cfg.(*Config) if !ok { return fmt.Errorf("expected config type %T, got %T: %v", &Config{}, cfg, cfg) diff --git a/precompile/contracts/feemanager/module.go b/precompile/contracts/feemanager/module.go index 0198329aba..aefdd23d61 100644 --- a/precompile/contracts/feemanager/module.go +++ b/precompile/contracts/feemanager/module.go @@ -47,7 +47,7 @@ func (*configurator) MakeConfig() precompileconfig.Config { // Configure configures [state] with the given [cfg] precompileconfig. // This function is called by the EVM once per precompile contract activation. -func (*configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int, blockTime uint64) error { +func (*configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int) error { config, ok := cfg.(*Config) if !ok { return fmt.Errorf("expected config type %T, got %T: %v", &Config{}, cfg, cfg) diff --git a/precompile/contracts/nativeminter/module.go b/precompile/contracts/nativeminter/module.go index 590dd8413d..af048ca6f5 100644 --- a/precompile/contracts/nativeminter/module.go +++ b/precompile/contracts/nativeminter/module.go @@ -46,7 +46,7 @@ func (*configurator) MakeConfig() precompileconfig.Config { // Configure configures [state] with the given [cfg] precompileconfig. // This function is called by the EVM once per precompile contract activation. -func (*configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int, blockTime uint64) error { +func (*configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int) error { config, ok := cfg.(*Config) if !ok { return fmt.Errorf("expected config type %T, got %T: %v", &Config{}, cfg, cfg) diff --git a/precompile/contracts/rewardmanager/module.go b/precompile/contracts/rewardmanager/module.go index 5086b310a5..c0df5e1dbe 100644 --- a/precompile/contracts/rewardmanager/module.go +++ b/precompile/contracts/rewardmanager/module.go @@ -50,7 +50,7 @@ func (*configurator) MakeConfig() precompileconfig.Config { // This function is called by the EVM once per precompile contract activation. // You can use this function to set up your precompile contract's initial state, // by using the [cfg] config and [state] stateDB. -func (*configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int, blockTime uint64) error { +func (*configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int) error { config, ok := cfg.(*Config) if !ok { return fmt.Errorf("expected config type %T, got %T: %v", &Config{}, cfg, cfg) diff --git a/precompile/contracts/txallowlist/module.go b/precompile/contracts/txallowlist/module.go index 18f879b612..b84ecb0f7d 100644 --- a/precompile/contracts/txallowlist/module.go +++ b/precompile/contracts/txallowlist/module.go @@ -44,7 +44,7 @@ func (*configurator) MakeConfig() precompileconfig.Config { // Configure configures [state] with the given [cfg] precompileconfig. // This function is called by the EVM once per precompile contract activation. -func (*configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int, blockTime uint64) error { +func (*configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int) error { config, ok := cfg.(*Config) if !ok { return fmt.Errorf("expected config type %T, got %T: %v", &Config{}, cfg, cfg) diff --git a/precompile/contracts/warp/module.go b/precompile/contracts/warp/module.go index c5cd8e2630..9068df9bf6 100644 --- a/precompile/contracts/warp/module.go +++ b/precompile/contracts/warp/module.go @@ -48,7 +48,7 @@ func (*configurator) MakeConfig() precompileconfig.Config { } // Configure is a no-op for warp since it does not need to store any information in the state -func (*configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int, blockTime uint64) error { +func (*configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg precompileconfig.Config, state contract.StateDB, blockNumber *big.Int) error { if _, ok := cfg.(*Config); !ok { return fmt.Errorf("expected config type %T, got %T: %v", &Config{}, cfg, cfg) } diff --git a/precompile/testutils/test_precompile.go b/precompile/testutils/test_precompile.go index cb2739c978..12dd447847 100644 --- a/precompile/testutils/test_precompile.go +++ b/precompile/testutils/test_precompile.go @@ -117,7 +117,7 @@ func (test PrecompileTest) setup(t testing.TB, module modules.Module, state cont accessibleState.EXPECT().GetChainConfig().Return(chainConfig).AnyTimes() if test.Config != nil { - err := module.Configure(chainConfig, test.Config, state, blockContext.Number(), blockContext.Time()) + err := module.Configure(chainConfig, test.Config, state, blockContext.Number()) require.NoError(t, err) }