Open cedoor opened 1 year ago
The challenge here is to deploy the Semaphore contract properly using Foundry in the test environment. The equivalent in Hardhat is: https://github.com/semaphore-protocol/semaphore/blob/main/packages/hardhat/src/tasks/deploy-semaphore.ts
More context: Getting the poseidon code and linking libraries:
The poseidon function in the PoseidonT3 library is empty by default, to get its code the circomlibjs
javascript library is used. Then, it is necessary to link the PoseidonT3 library with the new code, to the IncrementalBinaryTree library.
We didn't change the implementation of the poseidon function because that code is already audited.
Re-opening this issue as Semaphore V4 will use an actual contract for Poseidon and there shouldn't be any problems with Foundry.
Hi @cedoor, @vplasencia! I'm interested in this issue. Please assign it to me. Thank you!
Hey @csiejimmyliu, assigned :)
Hey @cedoor ! I'm in PSE Core Taiwan, my group mate @timou0911 works with me on this issue. Can you assign him too?
Hey @csiejimmyliu, sure! They need to comment here tho.
Hi @cedoor ! Just created a PR of this issue!
Description
There is a CLI Hardhat template called
cli-template-contracts-hardhat
with a sample contract and tests for that contract.The idea is to recreate that same template using Foundry instead of Hardhat. The template will be called
cli-template-contracts-foundry
.Previous work
https://github.com/vplasencia/semaphore-foundry
https://github.com/vplasencia/semaphore-foundry-hardhat
https://github.com/vplasencia/semaphore-hardhat-foundry