On-Chain Reference
Overview

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

ProgramNetworkAddress
sandbox_ghiDevnetGHi1TBD... (published post-audit)
sandbox_ghiMainnetPublished 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.js

Program 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/
    └── SandboxError

PDA Summary

All program-owned accounts use deterministic seeds:

AccountSeeds
MiningPool["mining_pool"]
StakeAccount["stake", nft_mint, owner]
AgentAccount["agent", nft_mint, owner]
GHI Vault["ghi_vault"]

Quick Links