Quickstart

Get a Solidity smart contract running on Armchain in just a few minutes. This guide uses Remix IDE and the Armchain Ethers SDK, no complex local setup required.

Coming from Ethereum? The workflow is very similar. The main difference is that Armchain uses ML-DSA44 (post-quantum) signatures instead of ECDSA, so you'll use the Armchain Ethers SDK instead of standard ethers.js for any signing operations.

Tooling note: Hardhat and Foundry do not natively support ML-DSA44 signing. Use Remix IDE for contract development and the Armchain Ethers SDK for programmatic interaction.

Prerequisites

  • Armchain Wallet browser extension connected to devnet

  • Familiarity with Solidity and Ethereum development

Step 1: Write Your Contract in Remix

  1. Open Remix IDEarrow-up-right in your browser

  2. In the File Explorer, create a new file: HelloArmchain.sol

  3. Paste the following contract:

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

contract HelloArmchain {
    string public greeting;
    address public owner;

    event GreetingChanged(string oldGreeting, string newGreeting, address changedBy);

    constructor(string memory _greeting) {
        greeting = _greeting;
        owner = msg.sender;
    }

    function setGreeting(string memory _newGreeting) external {
        string memory oldGreeting = greeting;
        greeting = _newGreeting;
        emit GreetingChanged(oldGreeting, _newGreeting, msg.sender);
    }

    function getGreeting() external view returns (string memory) {
        return greeting;
    }
}

Step 2: Compile

  1. Open the Solidity Compiler tab in Remix (the <S> icon)

  2. Select compiler version 0.8.24

  3. Set the EVM version to london under Advanced Settings

  4. Click Compile HelloArmchain.sol

Step 3: Deploy to Armchain

  1. Open the Deploy & Run Transactions tab in Remix

  2. Under Environment, select Injected Provider. Remix will connect to your Armchain Wallet

  3. Make sure your wallet is connected to the Armchain Devnet (Chain ID: 55)

  4. In the constructor field, enter "Hello from Armchain!"

  5. Click Deploy and confirm the transaction in your wallet

Your contract address will appear in the Deployed Contracts panel.

For local development without a wallet, see Fakenet Setup to run a local Armchain network and use the SDK directly.

Step 4: Interact with Your Contract

Use the Armchain Ethers SDK to interact with your deployed contract from JavaScript or TypeScript.

Install the SDK:

Then interact with your contract:

Alternative: Hardhat + Armchain Ethers SDK

⚠ Partial Compatibility: Hardhat does not natively support ML-DSA44 signing. npx hardhat compile works, but Hardhat's built-in accounts and hre.ethers signers use ECDSA and cannot sign Armchain transactions. All signing must go through @armchain-ethersv6/ethers. Deployment scripts, fork testing, and self-funding are not supported via standard Hardhat workflows.

Hardhat can be used for compilation and project structure:

Configure hardhat.config.js for Armchain:

Compile your contracts:

For deployments, write scripts using @armchain-ethersv6/ethers directly instead of hre.ethers:

Note: Do not use hre.ethers.getSigners(), hre.ethers.getContractFactory(), or deployer.sendTransaction(). These all use ECDSA and will fail on Armchain.

Next Steps

Last updated