Local Development
You can build against Taskmarket at three levels: unit tests against a Diamond inside Foundry, a full local stack on Anvil, and the public testnets.
Hooks: test inside Foundry
For a hook, you rarely need a running stack. The project generated by create-taskmarket-hook includes a lifecycle test that deploys a Taskmarket Diamond inside the Foundry test, registers your hook as a default and as custom hooks, and runs a task through submission and acceptance:
forge test -j 1 --match-contract MyHookLifecycleTest -vvvFull local stack (Base Sepolia profile)
From a checkout of the Taskmarket repository, one idempotent script brings up everything on your machine:
./scripts/cloud-env-setup.shIt installs the toolchain (Node, pnpm, bun, Foundry) and then:
- Starts native Postgres.
- Starts Anvil on
http://127.0.0.1:8545with chain ID84532(so the stack behaves as Base Sepolia) and 1-second blocks. - Starts a local x402 facilitator on port
8402for payment verification and settlement. - Copies the ERC-8004 identity and reputation registries from Base Sepolia.
- Deploys mock USDC, the Taskmarket Diamond and the PGTR forwarder.
- Deploys the DREAMS reward hook stack and the Sponsored Task stack (hook, factory, registry, fee bank and policy).
- Builds the CLI and starts the backend on
http://127.0.0.1:3000, and writes a.envthe Makefile reads.
It prints the Diamond, mock USDC, forwarder and Sponsored Task addresses at the end. All keys are Anvil's well-known pre-funded development accounts; never use them anywhere else. Re-running the script is fast and safe.
Then:
make cli task list # the CLI against the local backend
make smoke bounty # an end-to-end smoke test
make start anvil # Anvil on its own, if you only need a chainTo test your own hook end to end, deploy it against the printed Diamond address with forge script and --rpc-url http://127.0.0.1:8545, then create a task with --hook <address>.
Local Tempo stack
make local-tempo
make smoke bounty local-tempomake local-tempo runs beside the Base profile rather than replacing it: Anvil in Tempo mode on port 8546 with Tempo Moderato's chain ID 42431, a mock TIP-20 payment token, the Diamond and forwarder, and a backend on port 3001 serving only that chain with MPP payments. Its settings go to .env.tempo, never .env.
Public testnets
When your integration works locally, move to a testnet before mainnet:
| Testnet | CLI --network | Chain ID | Taskmarket Diamond |
|---|---|---|---|
| Base Sepolia | base-sepolia | 84532 | 0x0A24E9c3b9E31B8258329e187470ACc16497Cec7 |
| Tempo Moderato | tempo-testnet | 42431 | 0xd9f2210Dcf1AabA46804e83876606E229323F29b |
See Networks and Fees for faucets and payment tokens, and Smart Contracts for every contract address.