æternity Documentation Hub
AeternityGitHub
  • æternity Hub
  • Welcome to æternity documentation
  • Getting Started
    • What is æternity?
    • How to Use Aeternity
  • æternity core concepts
    • Introduction
    • æternity Protocol
      • æternity Coin
      • Fast Æternity Transaction Engine (FATE VM)
      • æternity Nodes
        • Node architecture
        • Node types
        • Node Roles
      • Transactions
        • Types of transactions
        • Transaction Lifecycle
        • Transaction Fees
        • Meta-transactions and Generalized Accounts
        • State Channel Transactions
      • Networks
      • Consensus Mechanisms
        • Next Generation Nakamoto Consensus (Bitcoin-NG)
        • Cuckoo Cycle Proof of Work
        • Hyperchains and Delegated Proof of Stake
        • Governance and Weighted Coin Voting
      • State Channels
      • Oracles
      • Aeternity Naming System (AENS)
    • Hyperchains
      • Hyperchains Whitepaper
    • Aeternity Governance
    • Aeternity Foundation
  • aeternity user tools and services
    • Introduction
    • Run an æternity node
    • Hyperchains web app
    • Hyperchains Bridge app
    • Mine aeternity coin
    • Superhero DEX
    • Superhero Wallet
    • ærc Bridge
    • Make an NFT
    • aepps: decentralized applications on æternity
    • æScan: æternity blockchain explorer
  • æternity Developer tools
    • Quick Start Guide
      • Development Environment Setup
      • Essential Tools Overview
      • Æternity Stack
      • First Steps in Development
    • Protocol
      • Core Protocol Components
        • æternity Consensus Protocol
        • Generalized Accounts
        • Smart Contracts
          • FATE VM
          • Smart contract languages
            • æternity Sophia Language
              • In-Depth Overview
              • Sophia Compiler
              • Sophia Visual Studio
              • Sophia http
              • æREPL
            • Solidity
          • Contract Transactions
        • State Channels
        • Oracles
      • Network Layer
        • Nodes
        • Sync
        • Gossip
        • Stratum
      • Utility Features
        • æternity Naming System (AENS)
        • Seralization Formats
    • æternity Sophia Language
      • In-Depth Overview
      • Sophia Compiler
      • Sophia Visual Studio
      • Sophia http
      • æREPL
    • Development Infrastructure
      • CLIs
      • SDKs and APIs
        • Javascript/Typescript SDK
        • Java SDK
        • Outdated SDKs
        • Node API reference
      • Middleware
      • Testing and Deployment
        • æproject
        • Testnets and Faucet
    • Token Standards
    • Aepps: Building apps on Aeternity
      • Boiler Plates
        • Angular Boiler Plate
        • React JS BoilerPlate
        • Vue BoilerPlate
    • Data and analytics
      • æScan
    • ÆRC Bridge
  • Hyperchains
    • Hyperchains Development Guide
    • Hyperchains Bridge
Powered by GitBook
On this page
  • First Steps with æternity Blockchain Development
  • Setting Up Your First Project
  • Wallet Setup and Acquiring Test Tokens
  • Environment Configuration
  • Next Steps

Was this helpful?

Export as PDF
  1. æternity Developer tools
  2. Quick Start Guide

First Steps in Development

First Steps with æternity Blockchain Development

Setting Up Your First Project

Getting started with æternity blockchain development is straightforward with the æternity project tool (aeproject). This command-line utility helps you initialize projects, compile smart contracts, run tests, and deploy to the blockchain.

To begin your journey, create a new project directory and initialize it with the aeproject tool:

mkdir my-aepp
cd my-aepp
aeproject init

The initialization process creates a well-organized project structure with dedicated directories for your smart contracts, deployment scripts, tests, and Docker configuration. The initialization process creates a well-organized project structure: my-aepp/

├── contracts/       # Sophia smart contracts
├── deployment/      # Deployment scripts
├── test/           # Test files
└── docker/         # Docker configuration

Now it's time to write your first smart contract in the Sophia language:

// contracts/HelloWorld.aes
contract HelloWorld =
  entrypoint sayHello(name : string) : string =
    String.concat("Hello, ", name)

To ensure your contract works as expected, write a test file:

// test/helloWorldTest.js
const { assert } = require('chai')
const { utils } = require('@aeternity/aeproject')

describe('HelloWorld', () => {
  let contract
  
  before(async () => {
    contract = await utils.deployContract('HelloWorld')
  })
  
  it('should say hello', async () => {
    const result = await contract.sayHello('æternity')
    assert.equal(result, 'Hello, æternity')
  })
})

Run your tests with aeproject test.

Wallet Setup and Acquiring Test Tokens

Before deploying to mainnet, develop on the testnet using free test tokens. Visit https://faucet.aeternity.io or use the command:

curl -X POST -H "Content-Type: application/json" \
  -d '{"address": "YOUR_PUBLIC_KEY"}' \
  https://faucet.aeternity.io/account/balance

Environment Configuration

Configure your environment to connect to the appropriate æternity network:

// config/network.js
module.exports = {
  networks: {
    testnet: {
      node: "https://testnet.aeternity.io",
      compilerUrl: "https://compiler.aeternity.io"
    },
    local: {
      node: "http://localhost:3001",
      compilerUrl: "http://localhost:3080"
    }
  }
}

During development, use a local node with aeproject node for faster testing.

Next Steps

Always develop on testnet before moving to mainnet, and carefully review your code for security vulnerabilities.

PreviousÆternity StackNextProtocol

Last updated 13 days ago

Was this helpful?

To interact with the æternity blockchain, you'll need a wallet. The is a comprehensive mobile wallet for iOS and Android. Create a new account and securely store your seed phrase.

For browser-based development, install the . It allows easy switching between mainnet and testnet environments.

Explore æternity's advanced features like for off-chain scaling, for accessing external data, and the for human-readable addresses.

Join the to connect with the community.

Base æpp (Mobile Wallet)
SuperHero Wallet (Browser Extension)
æternity Forum
state channels
oracles
AENS naming system