Skip to content

Commit 9d38717

Browse files
committed
Add gamm precompile registration: Introduce the gamm precompile to the EVM module by registering it alongside the existing tokenization precompile. This enhances the EVM's functionality and prepares for future integrations. Additionally, remove obsolete ERC3643Badges.sol contract and related documentation to streamline the codebase.
1 parent e58f47f commit 9d38717

51 files changed

Lines changed: 8892 additions & 4581 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎app/evm.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424

2525
appparams "github.com/bitbadges/bitbadgeschain/app/params"
2626
tokenizationprecompile "github.com/bitbadges/bitbadgeschain/x/tokenization/precompile"
27+
gammprecompile "github.com/bitbadges/bitbadgeschain/x/gamm/precompile"
2728
)
2829

2930
// registerEVMModules registers the FeeMarket, ERC20, and EVM modules with tokenization precompile
@@ -199,6 +200,11 @@ func (app *App) registerEVMModules(appOpts servertypes.AppOptions) error {
199200
tokenizationPrecompileAddr := common.HexToAddress(tokenizationprecompile.TokenizationPrecompileAddress)
200201
app.EVMKeeper.RegisterStaticPrecompile(tokenizationPrecompileAddr, tokenizationPrecompile)
201202

203+
// Register gamm precompile
204+
gammPrecompile := gammprecompile.NewPrecompile(app.GammKeeper)
205+
gammPrecompileAddr := common.HexToAddress(gammprecompile.GammPrecompileAddress)
206+
app.EVMKeeper.RegisterStaticPrecompile(gammPrecompileAddr, gammPrecompile)
207+
202208
// Note: Precompiles must be both registered (RegisterStaticPrecompile) and enabled (EnableStaticPrecompiles)
203209
// The precompile is registered above, but it will be enabled during InitGenesis when the EVM module initializes
204210
// For production, ensure the precompile address is in the genesis state's active_static_precompiles array

‎contracts/ERC3643Badges.sol‎

Lines changed: 0 additions & 149 deletions
This file was deleted.

0 commit comments

Comments
 (0)