Start developping an onchain application, with
- a frontend making ZK proofs requests via Sismo Connect (Next.js)
- a smart contract that verifies ZK Proofs received via Sismo Connect (Foundry)
git clone https://github.com/sismo-core/sismo-connect-boilerplate-onchain
cd sismo-connect-boilerplate-onchain
# updates foundry
foundryup
# install smart contract dependencies
forge install
# in another terminal
# starts a local fork of Mumbai
yarn chain
You can now launch your local dapp with the commands:
# in another terminal
# install frontend dependencies
cd front
yarn
# launch local application
yarn dev
The frontend is now available on http://localhost:3000/ and the contracts have been deployed on your local blockchain. You can now experiment the user flow by going to your local frontend http://localhost:3000/.
With a private key, a RPC url and an etherscan api key:
forge script DeployAirdrop \
--rpc-url $RPC_URL \
--private-key "$PRIVATE_KEY" \
--broadcast \
--slow \
--etherscan-api-key "$ETHERSCAN_API_KEY" \
--verify \
--watch
With a mnemonic and a sender:
forge script DeployAirdrop \
--rpc-url $RPC_URL \
--mnemonics "$MNEMONIC" \
--sender $SENDER \
--broadcast \
--slow \
--etherscan-api-key "$ETHERSCAN_API_KEY" \
--verify \
--watch
Sismo Connect contracts are currently deployed on several chains. You can find the deployed addresses here. You can then run tests on a local fork network to test your contracts.
## Run fork tests with goerli
forge test --fork-url https://rpc.ankr.com/eth_goerli
## Run fork tests with mumbai
forge test --fork-url https://gateway.tenderly.co/public/polygon-mumbai
# you can aslo use the rpc url you want by passing an environment variable
forge test --fork-url $RPC_URL