On-Chain Reference
Sandbox GHI runs on a single Anchor program on Solana. This section documents the program's accounts, instructions, and error codes for developers and power users who want to verify or interact with the protocol directly.
⚠️
Contracts are under active development. Program IDs below are devnet placeholders — mainnet addresses will be published after the security audit completes before Phase 1 mint.
Program IDs
| Program | Network | Address |
|---|---|---|
sandbox_ghi | Devnet | GHi1TBD... (published post-audit) |
sandbox_ghi | Mainnet | Published at audit completion |
Framework
The program is written in Rust using the Anchor framework (opens in a new tab) (v0.29+). Anchor generates a typed IDL that can be consumed by any client using @coral-xyz/anchor.
# Install Anchor client
npm install @coral-xyz/anchor @solana/web3.jsProgram Structure
sandbox_ghi/
├── state/
│ ├── MiningPool ← Global protocol state
│ ├── StakeAccount ← Per-NFT staking record
│ └── AgentAccount ← Agent Forge agent record
├── instructions/
│ ├── stake_nft
│ ├── unstake_nft
│ ├── claim_rewards
│ ├── deploy_agent
│ ├── submit_task_result
│ └── close_agent
└── errors/
└── SandboxErrorPDA Summary
All program-owned accounts use deterministic seeds:
| Account | Seeds |
|---|---|
MiningPool | ["mining_pool"] |
StakeAccount | ["stake", nft_mint, owner] |
AgentAccount | ["agent", nft_mint, owner] |
| GHI Vault | ["ghi_vault"] |
Quick Links
- Account Structures — full field-level layout of each account
- Instructions — every instruction with required accounts and args
- Error Codes — error list with causes and resolution