Quick Start
This guide will help you set up your development environment and create your first Dolphin program.
Prerequisites
Before you begin, make sure you have the following installed:
# Install Rust and Cargo
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install Solana CLI tools
sh -c "$(curl -sSfL https://release.solana.com/v1.17.0/install)"
# Install Anchor Framework
cargo install --git https://github.com/coral-xyz/anchor avm --locked
avm install latest
avm use latest
# Install Python 3.8 or higher
# macOS
brew install python@3.8
# Ubuntu
sudo apt-get install python3.8 python3.8-dev
Installation
Install Dolphin using pip:
pip install dolphin-framework
For game development, also install:
pip install casino-of-life
Create Your First Program
Initialize a new project:
dolphin init hello_world HeLLo777777777777777777777777777777777777777
Navigate to your new project and open
program/lib.py
:
from dolphin.prelude import *
@program("HeLLo777777777777777777777777777777777777777")
class HelloWorldProgram:
@account
class Counter:
authority: Pubkey
count: u64
@instruction
def initialize(
self,
counter: Counter,
authority: Signer,
system_program: Program = SYSTEM_PROGRAM_ID
):
counter.authority = authority.key()
counter.count = 0
@instruction
def increment(
self,
counter: Counter,
authority: Signer
):
assert counter.authority == authority.key(), "Invalid authority"
counter.count += 1
Build your program:
dolphin build
Run tests:
dolphin test
Deploy to Solana devnet:
dolphin deploy --network devnet
What's Next
Read the Architecture Overview to understand how Dolphin works
Explore the Developer Guides for detailed documentation
Check out Example Programs for inspiration
Join our Discord Community for support
Ready to dive deeper? Continue to Creating Your First Program for a more detailed walkthrough.
Last updated