Skip to content

Conversation

@mdtanrikulu
Copy link
Contributor

No description provided.

@adraffy
Copy link
Member

adraffy commented Jul 22, 2025

Crazy!

I do think we should use foundry when possible but complex tests should stay in TypeScript as the equivalent Solidity is unreadable. I think namechain/ is pretty good: basically anything that isn't CCIP-Read is a foundry test.

Also, I made an earlier attempt at this. Not sure if any of my utility tests are useful.

@mdtanrikulu
Copy link
Contributor Author

Crazy!

I do think we should use foundry when possible but complex tests should stay in TypeScript as the equivalent Solidity is unreadable. I think namechain/ is pretty good: basically anything that isn't CCIP-Read is a foundry test.

Also, I made an earlier attempt at this. Not sure if any of my utility tests are useful.

Sure, I think it will be better in the long run to keep both in the same structure. I believe it's still possible to achieve clear ccip-read foundry tests using ffi functionality but that's just preference. I am happy with both.

@TateB
Copy link
Member

TateB commented Jul 25, 2025

is it actually useful to have all the pre-existing tests in foundry?

@mdtanrikulu
Copy link
Contributor Author

is it actually useful to have all the pre-existing tests in foundry?

In my opinion, maintaining test dependencies with Hardhat and its plugins introduces additional complexity, especially when dealing with compatibility issues or required patches. Since many of these concerns are already handled well in Foundry, this could be a good opportunity to consider a gradual transition. We can retain the existing *.ts tests as legacyTests to avoid confusion from a sudden removal.

@talentlessguy
Copy link
Contributor

is it actually useful to have all the pre-existing tests in foundry?

yes it is, for test environment. it is planned for tenv to be able to deploy smart contracts without requiring a complex setup involving multiple hardhat versions and other crap

after ens-contracts get migrated to foundry, migrating deploy scripts from ensjs to tenv will be easier and require less setup

bun-version: 1.2.0

- run: bun install --frozen-lockfile
- run: bun install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

frozen lockfiles ensure no random transititves get pulled and that the build is reproducible. I suggest to put it back and regenerate the lockfile and commit it to ensure it matches the same one in CI

@TateB
Copy link
Member

TateB commented Aug 5, 2025

yes it is, for test environment. it is planned for tenv to be able to deploy smart contracts without requiring a complex setup involving multiple hardhat versions and other crap

after ens-contracts get migrated to foundry, migrating deploy scripts from ensjs to tenv will be easier and require less setup

new deploy scripts are utilising rocketh anyway, how are foundry tests related?

@talentlessguy
Copy link
Contributor

yes it is, for test environment. it is planned for tenv to be able to deploy smart contracts without requiring a complex setup involving multiple hardhat versions and other crap
after ens-contracts get migrated to foundry, migrating deploy scripts from ensjs to tenv will be easier and require less setup

new deploy scripts are utilising rocketh anyway, how are foundry tests related?

ah right yeah tests are not very related, but deploy scripts are

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.

5 participants