Welcome to the world of FableSee! If you’re looking to install and run this project, you’ve come to the right place. This guide will walk you through the installation process, configuration, and execution commands with helpful troubleshooting tips along the way.
Prerequisites: What’s Needed Before You Start?
Before diving into the installation, ensure you have the following tools ready:
- Make: A build automation tool.
- Foundry: Install via GitHub here. Ensure your last foundryup was on 16 May 2023.
- Node.js & PNPM: Install PNPM with
npm install -g pnpm
. Make sure you have Node v20.1.0. Check thepackageManager
key inpackage.json
for the appropriate PNPM version. - Circom: Required to build the circuits package. Installation guide available here. Use version 2.1.4.
Step-by-Step Installation
Now that you have everything set up, follow these steps to get your project running:
- Run
make setup
to initialize the project. - Perform basic sanity tests for the contracts with
(cd packages/contracts && make test)
. - Install Circom again via the guide linked above.
Configuration in IDEs
If you’re using Visual Studio Code, ensure the root of the project is set to the contracts package. This is crucial because the contract remappings will only be picked up this way. Otherwise, you would need to manually add the remappings from remappings.txt
to the Solidity plugin configuration.
Running Your Application
To deploy and try out the app, execute the following commands in separate terminal windows:
make anvil
– Runs Anvil (local EVM node) at localhost:8545 with chain ID 1337.make webdev
– Starts the NextJS development server and enables live reload.make deploy
– Deploys the contracts to the local node.make circuits
– Builds the zk circuits (requires a 300MB trusted setup file).
Once the above commands are executed, visit your app at http://localhost:3000. If that port isn’t available, NextJS will select another one.
Testing the Game
Access your application via http://localhost:3000. For gameplay, you’ll need to claim an airdrop to gain a deck. Test typically uses Anvil accounts which are preloaded with ETH.
To quickly test with various accounts, instead of importing accounts, you can visit:
- http://localhost:3000?index=0 – Loads the first test account.
- http://localhost:3000?index=1 – Loads the second test account.
Note: You will need to use two distinct browsers or profiles to test with different accounts, as reloading in the same window will reset the address.
Skipping Proof Generation and Using Deterministic Randomness
If you want to skip proof generation and verification, modify your commands as follows:
cd packages/contracts
make deploy-noproofs
cd packages/webapp
make dev-noproofs
For deterministic randomness, replace make deploy
with:
cd packages/contracts
make deploy-norandom
Combine both options with:
cd packages/contracts
make deploy-noproofs
cd packages/webapp
make dev-noproofs-norandom
Troubleshooting Common Issues
While setup should generally go smoothly, here are a few troubleshooting tips if you run into issues:
- If you’re having trouble with
pnpm
installations, usecorepack
by running:
corepack enable
then
corepack pnpm install
. - Every time you restart Anvil, you might need to reset your wallet in MetaMask. Go to Settings > Advanced > Clear activity and nonce data.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.