First Deploy
Prerequisites
- Node.js โฅ 18
- Rust installed (
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh) - Solana CLI installed (
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)") - Anchor CLI installed (
cargo install --git https://github.com/coral-xyz/anchor avm --locked --forcethenavm install 1.2.0)
Step 1: Install bake
bash
npm install -g bakeacookie
Step 2: Login
bash
bake login
This creates a local keypair at ~/.config/solana/id.json (or links an existing one). Zero ceremony โ no browser, no email, no wallet popup.
Step 3: Set cluster
bash
bake use cookie
This points bake at Cookie Chain's RPC endpoint (https://rpc.cookiescan.io). You can also use bake use mainnet, bake use devnet, or bake use http://localhost:8899 for local development.
Step 4: Scaffold project
bash
bake init my-program cd my-program
This creates a new Anchor project with:
- Pre-configured
Anchor.tomlfor Cookie Chain - A sample program
- Recipe Book integration ready
Step 5: Deploy
bash
bake deploy
This runs the full pipeline:
- Build โ
anchor build --arch v0 --tools-version v1.57 - Deploy โ uploads the binary to Cookie Chain
- Hash โ computes SHA-256 of the compiled
.so - Register โ writes a permanent entry to the Recipe Book
You'll see output like:
Building recipe_book (anchor build) Deploying recipe_book to cookie Registered deploy in Recipe Book (entry #0) โ Deployed to cookie (entry #0) Program ID: 56Vj61zFW4hHV6wdjnisrHtVwWDqyjixjpBgnoRJvzxL Entry index: 0
Step 6: Verify
bash
bake prove
This verifies that what's running on-chain matches what the Recipe Book says was deployed, using real ELF-binary hash comparison.
Step 7: View logs
bash
bake logs -f
Live-stream your program's logs with Anchor event decoding.
You're done!
Your program is now:
- โ Deployed on Cookie Chain
- โ Registered in the Recipe Book (permanent on-chain history)
- โ
Verifiable with
bake prove - โ
Observable with
bake logs