Create CLI Foundry template
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
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.