Full lesson
solana-go
Go SDK library and RPC client for the Solana Blockchain
What it does
From the project README:
[](https://pkg.go.dev/github.com/gagliardetto/solana-go?tab=doc) [](https://github.com/gagliardetto/solana-go/releases) [](https://github.com/gagliardetto/solana-go/actions?query=branch%3Amain) [](https://github.com/gagliardetto/solana-go/actions?query=branch%3Amain+workflow%3Alint) [](https://www.tickgit.com/browse?repo=github.com/gagliardetto/solana-go&branch=main) [](https://goreportcard.com/report/github.com/gagliardetto/solana-go)
- Original
- solana-foundation/solana-go
- SuperStack fork
- Blockchains/solana-go @
5cf5b46 - Stars
- 1,589
- Last push (original)
- 2026-11-02
- Languages
- Go, Rust, Assembly, Shell
- Detected stack
- solana-go
- Categories
- Infrastructure & Tooling
- Licence
- Apache-2.0
Architecture
662 source files. By extension: .go ×650, .rs ×12.
| Top-level directory | Source files |
|---|---|
programs | 355 |
rpc | 166 |
(root) | 43 |
cmd | 33 |
sysvar | 15 |
base58 | 13 |
text | 11 |
bip39 | 11 |
On-chain programs: programs/zk-elgamal-proof/rust
Dapp: deploying
This fork is queued for its own live dapp on Sol.College, with a Devnet/Mainnet switch. It appears here, at /dapps/solana-go/, once it is deployed and checked on devnet. Until then, run it locally with the commands below.
Key code, explained
Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.
programs/token-2022/extension_test.go L697–720 @ 5cf5b46 · Apache-2.0 · original ag_require.Equal(t, meta.Symbol, got.Symbol) ag_require.Equal(t, meta.Uri, got.Uri) ag_require.Equal(t, meta.AdditionalMetadata, got.AdditionalMetadata)} // ===================================================================// Instruction ID constants verification// Ensure our iota-based constants match the official program values.// =================================================================== func TestInstructionIDValues(t *testing.T) { ag_require.Equal(t, uint8(0), Instruction_InitializeMint) ag_require.Equal(t, uint8(1), Instruction_InitializeAccount) ag_require.Equal(t, uint8(2), Instruction_InitializeMultisig) ag_require.Equal(t, uint8(3), Instruction_Transfer) ag_require.Equal(t, uint8(4), Instruction_Approve) ag_require.Equal(t, uint8(5), Instruction_Revoke) ag_require.Equal(t, uint8(6), Instruction_SetAuthority) ag_require.Equal(t, uint8(7), Instruction_MintTo) ag_require.Equal(t, uint8(8), Instruction_Burn) ag_require.Equal(t, uint8(9), Instruction_CloseAccount) ag_require.Equal(t, uint8(10), Instruction_FreezeAccount) ag_require.Equal(t, uint8(11), Instruction_ThawAccount) ag_require.Equal(t, uint8(12), Instruction_TransferChecked)- Line 715
ag_require.Equal(t, uint8(7), Instruction_MintTo): Mints new tokens. The mint authority must sign. - Line 720
ag_require.Equal(t, uint8(12), Instruction_TransferChecked): A checked token transfer, which also verifies the mint and decimals.
programs/token-2022/impl_pointer_consistency_test.go L85–108 @ 5cf5b46 · Apache-2.0 · original {"FreezeAccount", (*FreezeAccount)(nil), NewFreezeAccountInstructionBuilder().Build()}, {"GetAccountDataSize", (*GetAccountDataSize)(nil), NewGetAccountDataSizeInstructionBuilder().Build()}, {"InitializeAccount", (*InitializeAccount)(nil), NewInitializeAccountInstructionBuilder().Build()}, {"InitializeImmutableOwner", (*InitializeImmutableOwner)(nil), NewInitializeImmutableOwnerInstructionBuilder().Build()}, {"InitializeMint", (*InitializeMint)(nil), NewInitializeMintInstructionBuilder().Build()}, {"InitializeMintCloseAuthority", (*InitializeMintCloseAuthority)(nil), NewInitializeMintCloseAuthorityInstructionBuilder().Build()}, {"InitializeMultisig", (*InitializeMultisig)(nil), NewInitializeMultisigInstructionBuilder().Build()}, {"InitializeNonTransferableMint", (*InitializeNonTransferableMint)(nil), NewInitializeNonTransferableMintInstructionBuilder().Build()}, {"InitializePermanentDelegate", (*InitializePermanentDelegate)(nil), NewInitializePermanentDelegateInstructionBuilder().Build()}, {"MintTo", (*MintTo)(nil), NewMintToInstructionBuilder().Build()}, {"MintToChecked", (*MintToChecked)(nil), NewMintToCheckedInstructionBuilder().Build()}, {"PermissionedBurnExtension", (*PermissionedBurnExtension)(nil), NewPermissionedBurnExtensionInstructionBuilder().Build()}, {"Reallocate", (*Reallocate)(nil), NewReallocateInstructionBuilder().Build()}, {"Revoke", (*Revoke)(nil), NewRevokeInstructionBuilder().Build()}, {"SetAuthority", (*SetAuthority)(nil), NewSetAuthorityInstructionBuilder().Build()}, {"SyncNative", (*SyncNative)(nil), NewSyncNativeInstructionBuilder().Build()}, {"ThawAccount", (*ThawAccount)(nil), NewThawAccountInstructionBuilder().Build()}, {"Transfer", (*Transfer)(nil), NewTransferInstructionBuilder().Build()}, {"TransferChecked", (*TransferChecked)(nil), NewTransferCheckedInstructionBuilder().Build()}, {"UiAmountToAmount", (*UiAmountToAmount)(nil), NewUiAmountToAmountInstructionBuilder().Build()}, {"UnwrapLamports", (*UnwrapLamports)(nil), NewUnwrapLamportsInstructionBuilder().Build()}, {"WithdrawExcessLamports", (*WithdrawExcessLamports)(nil), NewWithdrawExcessLamportsInstructionBuilder().Build()}, } for _, tc := range cases {- Line 94
{"MintTo", (*MintTo)(nil), NewMintToInstructionBuilder().Build()},: Mints new tokens. The mint authority must sign. - Line 103
{"TransferChecked", (*TransferChecked)(nil), NewTransferCheckedInstructionBuilder().Build(: A checked token transfer, which also verifies the mint and decimals.
programs/token-2022/instructions.go L73–95 @ 5cf5b46 · Apache-2.0 · original // Mints new tokens to an account. Instruction_MintTo // Burns tokens by removing them from an account. Instruction_Burn // Close an account by transferring all its SOL to the destination account. Instruction_CloseAccount // Freeze an Initialized account using the Mint's freeze_authority (if set). Instruction_FreezeAccount // Thaw a Frozen account using the Mint's freeze_authority (if set). Instruction_ThawAccount // Transfers tokens from one account to another either directly or via a // delegate. This instruction differs from Transfer in that the token mint // and decimals value is checked by the caller. Instruction_TransferChecked // Approves a delegate. This instruction differs from Approve in that the // token mint and decimals value is checked by the caller. Instruction_ApproveChecked- Line 74
Instruction_MintTo: Mints new tokens. The mint authority must sign. - Line 91
Instruction_TransferChecked: A checked token transfer, which also verifies the mint and decimals.
programs/token/impl_pointer_consistency_test.go L73–96 @ 5cf5b46 · Apache-2.0 · originalfunc TestAllBuildersSetPointerImpl(t *testing.T) { cases := []struct { name string want any inst *Instruction }{ {"Approve", (*Approve)(nil), NewApproveInstructionBuilder().Build()}, {"ApproveChecked", (*ApproveChecked)(nil), NewApproveCheckedInstructionBuilder().Build()}, {"Burn", (*Burn)(nil), NewBurnInstructionBuilder().Build()}, {"BurnChecked", (*BurnChecked)(nil), NewBurnCheckedInstructionBuilder().Build()}, {"CloseAccount", (*CloseAccount)(nil), NewCloseAccountInstructionBuilder().Build()}, {"FreezeAccount", (*FreezeAccount)(nil), NewFreezeAccountInstructionBuilder().Build()}, {"InitializeAccount", (*InitializeAccount)(nil), NewInitializeAccountInstructionBuilder().Build()}, {"InitializeMint", (*InitializeMint)(nil), NewInitializeMintInstructionBuilder().Build()}, {"InitializeMultisig", (*InitializeMultisig)(nil), NewInitializeMultisigInstructionBuilder().Build()}, {"MintTo", (*MintTo)(nil), NewMintToInstructionBuilder().Build()}, {"MintToChecked", (*MintToChecked)(nil), NewMintToCheckedInstructionBuilder().Build()}, {"Revoke", (*Revoke)(nil), NewRevokeInstructionBuilder().Build()}, {"SetAuthority", (*SetAuthority)(nil), NewSetAuthorityInstructionBuilder().Build()}, {"SyncNative", (*SyncNative)(nil), NewSyncNativeInstructionBuilder().Build()}, {"ThawAccount", (*ThawAccount)(nil), NewThawAccountInstructionBuilder().Build()}, {"Transfer", (*Transfer)(nil), NewTransferInstructionBuilder().Build()}, {"TransferChecked", (*TransferChecked)(nil), NewTransferCheckedInstructionBuilder().Build()}, }- Line 88
{"MintTo", (*MintTo)(nil), NewMintToInstructionBuilder().Build()},: Mints new tokens. The mint authority must sign. - Line 95
{"TransferChecked", (*TransferChecked)(nil), NewTransferCheckedInstructionBuilder().Build(: A checked token transfer, which also verifies the mint and decimals.
How to run, build and test
These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.
| Directory | Command | Runs |
|---|---|---|
. | go build ./... | |
. | go test ./... |
What you could build from it
- Fork the SuperStack copy and extend it within the Infrastructure & Tooling gaps listed on the idea page.
- Learn the pattern first: Building and sending transactions from a client
- Learn the pattern first: Anchor account constraints