A tool that generates Blockscout explorer-ready JSON for precompile contracts deployed on Maroo Chain (EVM-compatible testnet).
pnpm installGenerate precompile definition JSON:
pnpm run generateOutput file: output/precompiles-maroo.json
Raw URL for use with Blockscout (after pushing to GitHub):
https://raw.githubusercontent.com/<owner>/<repo>/<branch>/output/precompiles-maroo.json
(Replace <owner>, <repo>, and <branch> with your GitHub user/org, repository, and branch.)
Use this URL as the precompiles asset path in Blockscout settings so the explorer can read and decode each precompile’s ABI and source.
| Name | Address | ABI/source |
|---|---|---|
| P256 | 0x0000000000000000000000000000000000000100 |
Defined in this repo (EIP-7212 / Cosmos EVM) |
| Bech32 | 0x0000000000000000000000000000000000000400 |
cosmos-evm-contracts |
| Staking | 0x0000000000000000000000000000000000000800 |
cosmos-evm-contracts |
| Distribution | 0x0000000000000000000000000000000000000801 |
cosmos-evm-contracts |
| Bank | 0x0000000000000000000000000000000000000804 |
cosmos-evm-contracts |
| Gov | 0x0000000000000000000000000000000000000805 |
cosmos-evm-contracts |
| Slashing | 0x0000000000000000000000000000000000000806 |
cosmos-evm-contracts |
| OKRW | 0x1000000000000000000000000000000000000001 |
maroo-contracts |
| PCL | 0x1000000000000000000000000000000000000005 |
maroo-contracts |
When new precompiles are added to the chain, follow these steps.
- Add the address to
PRECOMPILE_ADDRESSESasName: "0x...". - If the precompile comes from cosmos-evm-contracts → add the name to the
COSMOS_EVM_NAMESarray. - If it comes from maroo-contracts → add the name to the
MAROO_NAMESarray. - If it’s custom (not from either package) → add the name to
COSMOS_EVM_NAMESand define ABI/source in a separate module (see step 2).
-
From cosmos-evm-contracts
- In
src/cosmos-evm.ts, import the module (e.g.abi/precompiles/<module>/<Interface>). - Add the name and paths to
COSMOS_ABI_MAPandCOSMOS_SOL_PATHS. - If the name is already in
COSMOS_EVM_NAMES, it will be picked up automatically bycollectCosmosEvmPrecompiles().
- In
-
From maroo-contracts
- In
src/maroo.ts, import the module (e.g.abi/precompiles/<module>/<Interface>). - Add the name and paths to
MAROO_ABI_MAPandMAROO_SOL_PATHS. collectMarooPrecompiles()iterates overMAROO_NAMES, so adding the name in step 1 is enough for it to be collected.
- In
-
Custom (precompile not in any package)
- Create a new file under
src/(e.g.src/NewPrecompile.ts) and export the ABI array and Solidity source string. - In
src/cosmos-evm.ts(or a dedicated collector), import that export and push an entry manually (similar to the P256 handling at the start ofcollectCosmosEvmPrecompiles()).
- Create a new file under
pnpm run generateConfirm the new precompile appears in output/precompiles-maroo.json, then add a row to the Precompile list table in this README (name, address, source).
- cosmos-evm-contracts — P256 (manual), Bech32, Staking, Distribution, Bank, Gov, Slashing interfaces/ABI
- maroo-contracts — OKRW, PCL interfaces/ABI