Build dApps on Asentum
Last updated March 20, 2026 · Estimated read time: 15 minutes
1.1 Building dApps on Asentum
Building a decentralized application on Asentum follows the same workflow you'd use for any JavaScript project: initialize, write code, test, deploy. The difference is your backend logic runs on-chain as a smart contract instead of on a server.
1.2 Project Setup
Start with npx @asentum/cli init my-dapp. This scaffolds a project with a contract directory, test files, deployment scripts, and a Next.js frontend pre-configured with @asentum/sdk.
1.3 Writing Your Contract
Contracts live in the contracts/ directory. Each is an ES module that exports a default class. Use the standard library — @asentum/token for fungible tokens, @asentum/nft for NFTs, @asentum/dao for governance — or write from scratch.
1.4 Testing Locally
Run npx @asentum/cli test to spin up a local chain and execute your test suite. Tests use Jest by default. The test harness provides snapshot/revert, time manipulation, and mock accounts.
1.5 Deploying to Testnet
npx @asentum/cli deploy --network testnet compiles and deploys your contract. The CLI handles gas estimation and nonce management automatically. You'll get a contract address back in ~3 seconds.
1.6 Connecting a Frontend
Use @asentum/sdk in your React/Next.js app to connect to the chain, read contract state, and send transactions. The SDK handles wallet connection, transaction signing, and event subscriptions. It works in browsers and Node.js.