Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Foundry instead of Truffle #10

Merged
merged 2 commits into from
Oct 19, 2024
Merged

Use Foundry instead of Truffle #10

merged 2 commits into from
Oct 19, 2024

Conversation

domob1812
Copy link
Collaborator

This updates the build system and other places in the code to use Foundry's forge instead of truffle to build and test the included smart contracts (used as part of the EVM chain integration with Xaya X). The unit tests have been recoded in Solidity. Truffle has been sunset, so this ensures that the code is future proofed.

The Docker file is updated to be based on Ubuntu now instead of Alpine, since it seems very hard to get the prebuilt Foundry binaries, which depend on glibc, to run on there.

The integration testing framework (which is then also used by any game integration tests running on EVM chains such as Soccerverse) is updated to use Foundry's anvil instead of ganache, too.

This replaces Truffle to build the integrated smart contracts to
Foundry.  We use forge to build all the Solidity code, run the
unit tests (recoded in Solidity), and update various places that
access the build artefacts to the new path structure from Foundry.

Dependencies (in particular, the XayaAccounts contract) are included
now as git submodules, rather than via npm.

The Docker build is updated, too.  Since it seems very hard to install
Foundry in Alpine (using prebuilt binaries that depend on glibc), we
switch the Docker build to be based on Ubuntu.
For integration testing on EVM chains (also the environment that will be
used from libxayagame), use Foundry's anvil instead of ganache.
@domob1812 domob1812 merged commit c26d5c0 into master Oct 19, 2024
domob1812 added a commit that referenced this pull request Oct 19, 2024
Use Foundry instead of Truffle
@domob1812 domob1812 deleted the use-foundry branch October 19, 2024 17:41
domob1812 added a commit to xaya/libxayagame that referenced this pull request Oct 19, 2024
With xaya/xayax#10, the Xaya X integration testing
framework for EVM chains has been changed to use Foundry's anvil instead
of ganache.  This updates the xayagametest code (which uses the base
logic from Xaya X' module) slightly as needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant