Requirements
- Node.js 20+
- foundry-zksync
- A Solidity project where you want to integrate roll.codes
Install foundry-zksync
Abstract uses the zkSync VM, so use thefoundry-zksync fork instead of standard Foundry.
Install Solidity dependencies
Add remappings
Your project should include these remappings:Set the minimum deploy environment
- Abstract testnet
- Abstract mainnet
ROLL_COORDINATOR should be the roll.codes coordinator address for the same network as ABSTRACT_RPC_URL.
See Deployed addresses for the current network-specific values.
Verify the setup
Run a compile before you move on:Common setup mistakes
- using the wrong repo ref in
forge install - missing the
@rollcodesremapping - pointing
ROLL_COORDINATORat a different network thanABSTRACT_RPC_URL - forgetting that
requestRandomNumberWithTraceIdis payable on roll.codes and must sendrequestFee() - using plaintext private keys instead of a Foundry keystore account
Related pages
Quickstart
Continue to the minimal hosted-coordinator integration flow once local setup is ready.
CLI reference
Use the scaffold command and flags to start from a generated project.
Troubleshooting
Fix import, fee, and callback issues if the setup does not compile cleanly.