Scaffolding an `evm` ready chains with Polaris
Is your feature request related to a problem or issue you encountered? Please describe.
evm is the most popular VM for smart contracts. Many developers like DYDX may want to transition to a self-sovereign blockchain but without giving up their Solidity smart contract architecture. Others may prefer to develop Solidity smart contracts rather than SDK modules.
The evm module allows deploying Solidity smart contracts on a Cosmos blockchain. Hosted under https://github.com/berachain/polaris.
We should, with the CLI, allow developers to easily scaffold a blockchain that can use the evm module.
Describe the solution you'd like
My proposal would be to integrate this option as part of the scaffold chain command.
From my understanding from https://github.com/berachain/polaris, integrating evm is not only about importing the module but also integrating Ethereum RPC server, customization in app to comply with Ethereum standards, and potentially other modifications.
This would make a solution with cli scaffold import evm too complex, even if the SDK support better module wiring in the SDK. And developers may know if they consider developing an EVM blockchain before starting their project most of the time.
The solution would be to add a flag --evm to the chain command.
cli scaffold chain mars --evm
Bootstrap a chain ready to start a eth rpc server.
The scaffolded chain should support further scaffolding commands after being scaffolded:
- Creating a new module
- Creating types in this module
- ...
Bonus: scaffolding an Hardhat environment as well to make it ready developing Solidity smart contracts
I think testing is critical for this task, because the challenge is not to add support, but to maintain it. As soon as Ethermint changes something, we should be able to see it right away.
For example, right now Ethermin is broken with ignite chain serve, but it was working a month or so ago.
Given that Ethermint is not open source anymore, I think polaris is a good alternative. However, as mentioned above, the issue will be maintenance. Once the scaffolding refactor is done, this would great to have this as a third-party app.