Build on Asentum
The IDE
Full-page contract editor at ide.asentum.com. Estimated read time: 5 minutes
TL;DR
ide.asentum.com is a full-page IDE for writing, deploying, and testing Asentum smart contracts straight from the browser. Multi-file projects, syntax highlighting, live testnet wallet connection, deploy-from-editor, call-method-from-editor. No install, no toolchain setup, no Hardhat, no Foundry.
Think VS Code in a tab, except it understands Asentum's contract format natively and can push your contract to testnet in one click.
Open the IDE
Go to ide.asentum.com. First visit loads a starter workspace with three example contracts in it. Your workspace is stored in browser localStorage by default, so you can come back to it later from the same browser. Export anytime to a .zip if you want to back it up or share.
The IDE talks to the public testnet by default. Switch RPC in settings if you're running a local node or pointing at a different network.
Your workspace
Three panes. File tree on the left, editor in the middle, side panel on the right for deploy state, call results, and event logs.
- File tree: create, rename, delete .js contract files and any helpers. Folder structure is up to you.
- Editor: Monaco-backed (the same engine VS Code uses), so keyboard shortcuts and selection behavior are familiar. Asentum-aware autocomplete for the injected globals (
storage,emit,msg,E) plus inline lint warnings for common contract footguns. - Side panel: shows deploy status, contract address, view/call buttons for each method, live event log when you interact with a deployed contract.
Everything you do persists locally. Refresh the tab and your workspace is still there.
Write a contract
Same rules as documented in Writing Contracts. Top-level named functions become callable methods. A handful of injected globals give you state, events, sender info, and cross-contract calls.
function init() {
storage.set('count', 0n);
}
function increment() {
const next = storage.get('count') + 1n;
storage.set('count', next);
emit('Incremented', { newCount: next, by: msg.sender });
}
function getCount() {
return storage.get('count');
}The IDE will type-check this with our Asentum-flavored TS server. If you call storage.get with a non-string key, or you forget the n on a BigInt literal, you'll see the warning before you deploy.
Deploy from the editor
Top-right of the editor has a Deploy button. Click it, the IDE asks your wallet (extension or Telegram) to sign the deploy tx, polls for the receipt, and shows you the contract address. Total time on testnet is usually under 10 seconds.
The deployed contract appears in the side panel with a clickable list of every callable method. Each method gets a row with input fields for any args, a Call button, and live output of the return value, gas used, and emitted events.
Test and call methods
The side panel distinguishes between two kinds of methods. View calls are free, no signature needed, just hit the /view endpoint. State-changing calls require a signed tx and cost gas. The IDE shows you which is which and runs the right path automatically.
For testing complex contracts, the IDE can simulate a sequence of calls before you deploy. The simulator runs against an in-memory copy of the VM with seeded state, so you can iterate quickly without paying gas.
Wallet integration
Three ways to sign from the IDE:
- Chrome extension wallet: click Connect, approve in the popup, every subsequent tx is signed by the extension. Recommended for everyday dev work. Extension setup guide.
- Telegram wallet bot: scan a QR or paste a session token, and txs are signed via the bot at wallet.asentum.com. Useful if you don't want to install a browser extension or you're on a Chromebook.
- In-IDE ephemeral keypair: the IDE can generate a throwaway keypair in localStorage and auto-fund it from the faucet. Best for trying things out, not for anything that owns real ASE. The IDE warns you before you fund.
The signer is shown in the top-right at all times. Switching wallets mid-session is fine.
Examples
The starter workspace includes:
- Counter: simplest possible state-changing contract.
- Token (ARC-20): ERC-20 equivalent, mint/transfer/balanceOf. Good template for any fungible asset.
- Tip jar: receives native ASE, lets the owner withdraw, emits events. Good template for anything that handles value.
The Examples menu has more, including a profile contract, a scheduled-call cron example, and a Vault-aware contract that triggers an outbound API call (see Secrets and Workers).
IDE vs Playground
Two tools, different audiences.
The Playground at testnet.asentum.com/playground is a single-file scratch space. One contract, one editor, one wallet. Best for trying out a snippet from documentation, demoing in a tweet, or running a quick test.
The IDE at ide.asentum.com is a multi-file project workspace. Multiple contracts, shared helpers, persistent state, examples library. Best for building something real that you want to come back to.
Troubleshooting
Deploy fails with "rate limit": the faucet limits how often a single IP can fund a fresh keypair. Wait a minute or fund manually from an existing wallet.
View call returns null: the method exists on chain but returned no value. Often this is because storage hasn't been initialized. Make sure init() ran during deploy.
Workspace lost after browser update: localStorage can get evicted by aggressive privacy settings. Export your workspace to .zip periodically if you're working on something you care about.
Anything else, holler in Telegram or open an issue on the chain repo.