Getting Started

Hello Solana

Get a hands-on example: scaffold, deploy, and verify a basic “Hello World” Anchor program to Devnet using CODI’s demo terminal or web UI.

Get a hands-on example: scaffold, deploy, and verify a basic “Hello World” Anchor program to Devnet using CODI’s demo terminal or web UI.

Written By: Mark Brown

Last Updated on June 5, 2025

Introduction

This page guides you through creating, deploying, and verifying a simple Hello World Anchor program in Solana—all using CODI’s web-native interface. You’ll see how scaffold-agent generates boilerplate, deploy-agent publishes your contract, and the UI helps you inspect transactions on Devnet.


1. Scaffold Hello World


  • scaffold-agent creates programs/hello-world with lib.rs, Anchor.toml, and TypeScript test boilerplate.


2. Inspect Generated Code

  • lib.rs: Contains hello() instruction emitting a log via msg! macro.

  • Anchor.toml: Configured for hello-world id and local cluster settings.

  • tests/hello-world.ts: Stub test file expecting to import and call hello().


3. Build & Deploy


  • deploy-agent compiles Rust code, generates IDL, and publishes the program to Devnet.

  • On success, it prints the program ID and transaction signature.


4. Verify on Devnet

  • Open the UI’s Explorer panel.

  • Paste the transaction signature or program ID to view logs and account details.

  • Confirm hello() executed by checking for Program log: Hello, Solana! entry.


5. Run Automated Test

  • test-agent executes the generated TypeScript test suite, asserting that hello() emits the correct log.

  • Review pass/fail output in the Tests pane.


6. Next Steps

  • Customize Logic: Modify hello() in lib.rs to accept parameters.

  • Advanced Tests: Add edge-case tests for input validation.

  • Audit: Run audit to check for best practices even in simple programs.


Conclusion

The Hello Solana example demonstrates CODI’s seamless end-to-end flow: scaffolding, deploying, verifying, and testing—all without leaving your browser. You’ve verified a live Anchor program on Devnet in minutes. Ready to build more complex contracts? Check out the Core Concepts and Built-In Agents sections next.


© 2025 CODI all rights reserved | Created with ♥️

© 2025 CODI all rights reserved | Created with ♥️

© 2025 CODI all rights reserved | Created with ♥️