diff --git a/cosmos/x/evm/plugins/precompile/plugin.go b/cosmos/x/evm/plugins/precompile/plugin.go index d976d5851..de506e76e 100644 --- a/cosmos/x/evm/plugins/precompile/plugin.go +++ b/cosmos/x/evm/plugins/precompile/plugin.go @@ -42,12 +42,6 @@ import ( // Plugin is the interface that must be implemented by the plugin. type Plugin interface { core.PrecompilePlugin - - // KVGasConfig returns the gas config for - KVGasConfig() storetypes.GasConfig - SetKVGasConfig(storetypes.GasConfig) - TransientKVGasConfig() storetypes.GasConfig - SetTransientKVGasConfig(storetypes.GasConfig) } // polarisStateDB is the interface that must be implemented by the state DB. @@ -71,8 +65,10 @@ type plugin struct { // NewPlugin creates and returns a plugin with the default KV store gas configs. func NewPlugin(precompiles []ethprecompile.Registrable) Plugin { return &plugin{ - Registry: registry.NewMap[common.Address, vm.PrecompileContainer](), - precompiles: precompiles, + Registry: registry.NewMap[common.Address, vm.PrecompileContainer](), + precompiles: precompiles, + // NOTE: these are hardcoded as they are also hardcoded in the sdk. + // This should be updated if it ever changes. kvGasConfig: storetypes.KVGasConfig(), transientKVGasConfig: storetypes.TransientGasConfig(), } @@ -96,26 +92,6 @@ func (p *plugin) GetActive(rules *params.Rules) []common.Address { return active } -// KVGasConfig implements Plugin. -func (p *plugin) KVGasConfig() storetypes.GasConfig { - return p.kvGasConfig -} - -// SetKVGasConfig implements Plugin. -func (p *plugin) SetKVGasConfig(kvGasConfig storetypes.GasConfig) { - p.kvGasConfig = kvGasConfig -} - -// TransientKVGasConfig implements Plugin. -func (p *plugin) TransientKVGasConfig() storetypes.GasConfig { - return p.transientKVGasConfig -} - -// SetTransientKVGasConfig implements Plugin. -func (p *plugin) SetTransientKVGasConfig(transientKVGasConfig storetypes.GasConfig) { - p.transientKVGasConfig = transientKVGasConfig -} - // Run runs the a precompile container and returns the remaining gas after execution by injecting // a Cosmos SDK `GasMeter`. This function returns an error if the precompile execution returns an // error or insufficient gas is provided. diff --git a/cosmos/x/evm/plugins/precompile/plugin_test.go b/cosmos/x/evm/plugins/precompile/plugin_test.go index 81da2a1d7..cf453e226 100644 --- a/cosmos/x/evm/plugins/precompile/plugin_test.go +++ b/cosmos/x/evm/plugins/precompile/plugin_test.go @@ -69,20 +69,6 @@ var _ = Describe("plugin", func() { Expect(err).To(MatchError("out of gas")) }) - It("should plug in custom gas configs", func() { - Expect(p.KVGasConfig().DeleteCost).To(Equal(uint64(1000))) - Expect(p.TransientKVGasConfig().DeleteCost).To(Equal(uint64(100))) - - p.SetKVGasConfig(storetypes.GasConfig{ - DeleteCost: 2, - }) - Expect(p.KVGasConfig().DeleteCost).To(Equal(uint64(2))) - p.SetTransientKVGasConfig(storetypes.GasConfig{ - DeleteCost: 3, - }) - Expect(p.TransientKVGasConfig().DeleteCost).To(Equal(uint64(3))) - }) - It("should handle read-only static calls", func() { ms := utils.MustGetAs[tmock.MultiStore](ctx.MultiStore()) cem := utils.MustGetAs[state.ControllableEventManager](ctx.EventManager())