Launch App
Developer Guide

Build on ANDE

Deploy smart contracts, integrate Token Duality, and build the next generation of decentralized applications on ANDE Network.

6174

Chain ID

^0.8.20

Solidity Version

36M

Block Gas Limit

~5s

Block Time

Development Tools

Foundry
Recommended toolkit for smart contract development
curl -L https://foundry.paradigm.xyz | bash && foundryupDocumentation
Hardhat
Popular JavaScript-based development environment
npm install --save-dev hardhatDocumentation
Remix IDE
Browser-based Solidity IDE for quick prototyping
No installation neededDocumentation
Token Duality Integration
Precompile address: 0x00000000000000000000000000000000000000FD

ANDE's unique Token Duality precompile allows the native gas token to function as an ERC-20 simultaneously. This enables seamless DeFi integration without wrapped tokens.

Using Token Duality in Your Contracts

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract MyDeFiProtocol {
    // Token Duality precompile address
    address constant ANDE_TOKEN = 0x00000000000000000000000000000000000000FD;

    // Use ANDE as ERC-20 in your protocol
    function depositANDE(uint256 amount) external {
        // Transfer ANDE as ERC-20
        IERC20(ANDE_TOKEN).transferFrom(msg.sender, address(this), amount);

        // Your deposit logic here
    }

    function withdrawANDE(uint256 amount) external {
        // Transfer ANDE back to user
        IERC20(ANDE_TOKEN).transfer(msg.sender, amount);
    }

    // Check ANDE balance (same as native balance)
    function checkBalance(address user) external view returns (uint256) {
        return IERC20(ANDE_TOKEN).balanceOf(user);
    }
}

Key Features

  • Full ERC-20 interface (transfer, approve, transferFrom)
  • Balance equals native ETH balance - no syncing needed
  • Works with existing DeFi protocols (Uniswap, Aave, etc.)
  • No wrapping/unwrapping overhead

Deploying Contracts

Using Foundry
# Create new project
forge init my-ande-project
cd my-ande-project

# Configure foundry.toml
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
solc = "0.8.20"

[rpc_endpoints]
ande = "https://rpc.ande.network"

# Write your contract in src/MyContract.sol

# Deploy to ANDE Network
forge create src/MyContract.sol:MyContract \
  --rpc-url https://rpc.ande.network \
  --private-key $PRIVATE_KEY \
  --verify \
  --verifier blockscout \
  --verifier-url https://api.ande.network/api

# Verify existing contract
forge verify-contract $CONTRACT_ADDRESS \
  src/MyContract.sol:MyContract \
  --chain-id 6174 \
  --verifier blockscout \
  --verifier-url https://api.ande.network/api
Testing Your Contracts
// test/MyContract.t.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "forge-std/Test.sol";
import "../src/MyContract.sol";

contract MyContractTest is Test {
    MyContract public myContract;

    function setUp() public {
        myContract = new MyContract();
    }

    function testExample() public {
        // Your test logic
        assertEq(myContract.value(), 0);
    }

    // Fork test against ANDE network
    function testFork() public {
        // Create fork of ANDE
        vm.createSelectFork("https://rpc.ande.network");

        // Test against live state
        // ...
    }
}

// Run tests
// forge test -vvv

Core Contract Addresses

ANDETokenDuality
0x5FC8d32690cc91D4c39d9d3abcBD16989F875707

ERC-20 interface for native ANDE token

NativeStaking
0xa513E6E4b8f2a923D98304ec87F64353C4D5C853

Multi-pool staking contract

SequencerRegistry
0x61010e4bDD5D7c0e3ea87C159b420E8fe1952788

Validator/sequencer management

TimelockController
0x0DCd1Bf9A1b36cE34237eEaFef220932846BF31F3

Governance timelock

Best Practices

Security
  • • Use checks-effects-interactions pattern
  • • Implement reentrancy guards for external calls
  • • Validate all inputs thoroughly
  • • Use OpenZeppelin's audited contracts
  • • Get audited before mainnet deployment
  • • Implement pausable functionality for emergencies
Gas Optimization
  • • Pack storage variables efficiently
  • • Use events instead of storage for history
  • • Prefer calldata over memory for read-only
  • • Cache array length in loops
  • • Use custom errors instead of require strings
  • • Batch operations when possible

Ready to Build?

Get started with these resources