Developers
Local network
The whole stack on one machine: validator, funding source, service and app.
The local network runs the real Tack program, the real service and the app on one machine, with a funding source that moves like the live one. It is how Tack is developed and how you can try every flow without real funds.
What is real and what is local
| Part | On the local network |
|---|---|
| Tack program | The compiled program, unchanged. |
| Service | The same indexer, PostgreSQL store, API and crank. |
| Funding source | Phoenix's PerpAssetMap at its real address, built from a finalized mainnet capture of its SOL slot. A local keeper moves its price, oracle times and open interest every 60 seconds from Hyperliquid's live SOL market, and closes a funding interval every 10 minutes instead of every hour. |
| Phoenix program | A small stand-in at Phoenix's address that only lets the keeper write that account. Tack never calls Phoenix; it only reads the account. |
| USDC | A mint at the canonical USDC address with a local mint authority. Test USDC only. |
| Quotes | A local maker quotes three lots per side around the live rate, labelled Local maker in the app. |
| SPL Governance | The mainnet program, its exact binary at its mainnet address, checked against a pinned SHA-256. |
| TACK | A local mint with the full 1,000,000,000 supply in one local wallet and no mint or freeze authority. |
Run it
You need WSL Ubuntu or Linux with the Solana CLI 2.x, Node 22, and the two programs built once:
./scripts/build-program.ps1
./localnet/build-mock.ps1Then four processes, from tack/:
./localnet/up.ps1
npm --prefix backend run localnet:api
npm --prefix backend run localnet:keeper
npm --prefix web run dev| Process | Address |
|---|---|
| Validator RPC | http://127.0.0.1:28899 |
| PostgreSQL | 127.0.0.1:28432 |
| API | http://127.0.0.1:3176 |
| Keeper, faucet | http://127.0.0.1:3177 |
| App | http://localhost:3175/app |
In the app, connect the Local test wallet, a keypair kept in the browser and offered only on the local network, or any Wallet Standard extension, and press Get test funds for 5 SOL and 50,000 test USDC.
TACK and governance
After the validator is up, issue TACK and hand Tack's listing to its governance, once per reset:
npm --prefix backend run localnet:mint
npm --prefix backend run localnet:governanceThe first creates the mint, mints the whole supply to a local launch wallet and removes the mint authority. The second creates the TACK realm, its governance account and Tack's listing with that governance as its authority, then hands the realm to the governance. Restart localnet:api afterwards so the service reads the listing. Local votes run for 60 seconds with a 30-second hold-up instead of five days and two days; the deposit to propose and the 4% threshold are the documented ones.
npm --prefix backend run localnet:e2eruns a whole vote through the API: holders deposit, propose four maturities at 30% initial margin, vote, finalize, execute after the hold-up, see the next maturity open on the new terms, and withdraw every TACK.
A whole lifecycle in an hour
The program's shortest tenor is one hour. List a maturity 65 minutes out to watch a position open, settle hourly, mature and withdraw:
npm --prefix backend run localnet:short -- 65