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-devInstallation
Install Dolphin using pip:
pip install dolphin-frameworkFor game development, also install:
pip install casino-of-lifeCreate Your First Program
Initialize a new project:
dolphin init hello_world HeLLo777777777777777777777777777777777777777Navigate 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 += 1Build your program:
dolphin buildRun tests:
dolphin testDeploy to Solana devnet:
dolphin deploy --network devnetWhat'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