Getting Started

Quick start guide for Doxa development

Getting Started with Doxa

This guide will help you set up your development environment and create your first Doxa application.

Prerequisites

  • Node.js 16 or higher
  • Git
  • Basic understanding of blockchain concepts

Installation

  1. Install the Internet Computer SDK:
sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
  1. Clone the Doxa repository:
git clone https://github.com/DoxaFoundation/doxa-v3
cd doxa-v3
  1. Install dependencies:
npm install

Local Development

  1. Start the local network:
dfx start --background
  1. Deploy the canisters:
dfx deploy
  1. Start the development server:
npm run dev

Your First Transaction

Here’s a simple example of creating a new USDC swap pool:

public shared(msg) func create_pool(
  token0 : Principal, 
  token1 : Principal
) : async Result.Result<Text, Text> {
  let pool = await SwapCanister.create({
    token0 = token0;
    token1 = token1;
    fee = Constants.CYCLE_FEE;
  });
  Debug.print("Pool created: " # debug_show(pool));
};

Additional Learning Resources

Internet Computer Development

Motoko Programming

Canister Development

Next Steps