trufflesuite / ganache

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_
MIT License
2.61k stars 675 forks source link

Ganache Integration Testing When Adding Support for EVM Compatible Chains #4237

Open soloseng opened 1 year ago

soloseng commented 1 year ago

Hi, I am working on adding support for CELO, an EVM compatible blockchain, to Ganache. We previously had a working fork before ganache was a monorepo, but now I'm encountering difficulties when trying to test my changes with other projects.

I have forked this repo and made the necessary changes that would enable CELO support, but I'm running into issues testing that the changes actually work as intended.

What would be useful, would be the ability to use my fork in a project to ensure that things work properly. I tried deploying my fork to github or NPM, under a different namespace, but due to the fact that lerna created symlink between subpackages, none of my builds work.

Do you have any way of performing integration tests with other projects?

I have tried using verdaccio, similarly to how its done for ethereumjs-monorepo, but I encounter an error when deploying ganache due to the size of the package.

I see a comment to add verdaccio support, which I think solve my issues, is there any work currently being done on this?

CC: @MicaiahReid @davidmurdoch for visibility.

davidmurdoch commented 1 year ago

Hey! We should talk about adding CELO as a "flavor", like our internal filecoin implementation, but maintained outside of Ganache. I have a draft PR to make this possible.

In your case, since CELO is like 98% Ethereum, and the flavor system was built to support chains that aren't like Ethereum at all (like filecoin, tezos, corda, starknet, etc) we may want to explore ways of providing an internal "core-utils" helper that the flavor system can pass to a flavor so you don't have to bring everything yourself.

This would enable you to make use of a feature we are planning that would allow users to start up an devnet "ecosystem" in one command. For example, you would get Ethereum, CELO, IPFS, Optimism, StarktNet, ZkEVM all at once, with all the interchain dependencies, bridges, etc configured in one ganache command.

Anyway, we should figure out how to work more closely on this.


As far as your current problem, were you able to get the GitHub Actions CI tests passing?

soloseng commented 1 year ago

Our goal is to add a flavor, to provide better support to developers working on CELO, so this is really great!

Anyway, we should figure out how to work more closely on this.

I agree. I'll send an email with my availability to your git user.email, we can setup a time to discuss and see how to proceed from there. If you have a preferred contact method, let me know.

As far as your current problem, were you able to get the GitHub Actions CI tests passing?

I was able to build and ran the tests locally after making my changes. All but 1 test is passing. I run into issues only when changing the namespace to publish my fork.