Economics Basics
8 examples to get you started with Economics on Agave 4.1.1 - 5 basic and 3 intermediate.
Search across all documentation pages
8 examples to get you started with Economics on Agave 4.1.1 - 5 basic and 3 intermediate.
solana config set --url devnet
npm install @solana/kit@7.0.0import { createSolanaRpc } from "@solana/kit";
const rpc = createSolanaRpc("https://api.devnet.solana.com");
const slot = await rpc.getSlot().send();
console.log(slot);solana slot
solana balancesolana config get URL with client RPCsolana confirm -v <SIGNATURE>msg! output and CU consumedconst sim = await rpc.simulateTransaction(encodedTx, { sigVerify: false }).send();
console.log(sim.value.err, sim.value.logs);use anchor_lang::prelude::*;
#[program]
pub mod example {
use super::*;
pub fn touch(_ctx: Context<Touch>) -> Result<()> { Ok(()) }
}
#[derive(Accounts)]
pub struct Touch {}import { createTransactionMessage, pipe } from "@solana/kit";
const msg = pipe(createTransactionMessage({ version: 0 }), (m) => m);# Client adds ComputeBudgetProgram instructions for CU limit and pricenpx surfpool@0.12.0 run anchor testStack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.
Reviewed by Chris St. John·Last updated Jul 16, 2026