Smart contracts in plain JavaScript.
No Solidity. No Rust. No new language to learn. Write contracts in JavaScript, test them in your browser, deploy to a chain with 2-second target blocks, fast finality and post-quantum signatures.
It looks like the code you already write.
// A weekly subscription that charges itself.
// Customers approve the token once. The cron registry calls chargeAll.
const WEEK = 7n * 24n * 60n * 60n * 1000n; // chain.blockTimestamp is in ms
({
// token, merchant and the cron registry come in as ase1 addresses;
// the SDK passes them to the contract as lowercase hex.
init(token, merchant, cron) {
assert(!storage.get('token'), 'already initialised');
storage.set('token', token);
storage.set('merchant', merchant);
storage.set('cron', cron);
},
subscribe(amountPerWeek) {
const sub = {
amount: BigInt(amountPerWeek).toString(),
nextCharge: (chain.blockTimestamp + WEEK).toString(),
};
storage.set('sub:' + msg.sender, JSON.stringify(sub));
emit('Subscribed', { user: msg.sender, amount: sub.amount });
},
// Fired by the cron registry every day.
chargeAll() {
assert(msg.sender === storage.get('cron'), 'only the cron registry');
for (const key of storage.keys('sub:')) {
const sub = JSON.parse(storage.get(key));
if (chain.blockTimestamp < BigInt(sub.nextCharge)) continue;
const user = key.slice(4);
try {
E(storage.get('token')).transferFrom(user, storage.get('merchant'), sub.amount);
} catch (err) {
emit('ChargeFailed', { user });
continue;
}
sub.nextCharge = (BigInt(sub.nextCharge) + WEEK).toString();
storage.set(key, JSON.stringify(sub));
emit('Charged', { user, amount: sub.amount });
}
},
});A contract is one script that ends in an object literal. Its methods are the contract. Storage holds strings, so structured values go through JSON.stringify and JSON.parse, and amounts are stored as decimal strings.
Then one transaction to the cron registry, and the chain calls chargeAll every day:
// wallet: an AsentumWallet. subs: the deployed contract's ase1 address.
const CRON = 'ase1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqxgkr943'; // cron registry
const DAY_MS = 86_400_000;
await wallet.sendCall({
to: CRON,
method: 'schedule',
args: [
subs, 'chargeAll', [], // target, method, args
Date.now() + DAY_MS, // first run, in ms
DAY_MS, 0, 2_000_000, // every day, no run limit, gas per run
],
valueWei: 2_000_000n * 365n, // gas escrow, refunded when the job ends
});Deployed as plain source. Readable on-chain. Verifiable in a single hash compare. A contract already on the call stack cannot be called again, so reentrancy is blocked.
Write your contract in JavaScript.
Use storage, emit, msg, chain and assert, globals injected by the VM. A contract is one script that ends in an object literal of methods. No compiler, no ABI generation, no build step.
Test it live in your browser.
The Asentum IDE at ide.asentum.com lets you write, deploy, and interact with contracts without installing anything.
Deploy to testnet in seconds.
One click from the IDE, or use the SDK and CLI. Your contract is live within seconds, on 2-second target blocks. Post-quantum signed from the first block.
The same contract. In both languages.
A weekly subscription that charges itself. The Solidity version needs Chainlink Keepers (external service, LINK funding, registered upkeep) and a manual subscribers array because mappings can't be iterated. The Asentum version lists its subscribers with storage.keys and is fired by the chain's own cron registry.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/AutomationCompatible.sol";
contract Subscriptions is AutomationCompatibleInterface {
IERC20 public immutable token;
address public immutable merchant;
struct Sub { uint256 amount; uint256 nextCharge; }
mapping(address => Sub) public subs;
address[] public subscribers;
mapping(address => bool) private known;
event Subscribed(address indexed user, uint256 amount);
event Charged(address indexed user, uint256 amount);
constructor(IERC20 _token, address _merchant) {
token = _token; merchant = _merchant;
}
function subscribe(uint256 amountPerWeek) external {
subs[msg.sender] = Sub(amountPerWeek, block.timestamp + 7 days);
if (!known[msg.sender]) {
known[msg.sender] = true;
subscribers.push(msg.sender);
}
emit Subscribed(msg.sender, amountPerWeek);
}
function checkUpkeep(bytes calldata) external view
returns (bool upkeepNeeded, bytes memory)
{
for (uint i = 0; i < subscribers.length; i++) {
if (block.timestamp >= subs[subscribers[i]].nextCharge)
return (true, "");
}
return (false, "");
}
function performUpkeep(bytes calldata) external {
for (uint i = 0; i < subscribers.length; i++) {
address u = subscribers[i];
Sub storage s = subs[u];
if (block.timestamp >= s.nextCharge) {
token.transferFrom(u, merchant, s.amount);
s.nextCharge += 7 days;
emit Charged(u, s.amount);
}
}
}
}
// + register with Chainlink Automation (fund LINK)// A weekly subscription that charges itself.
// Customers approve the token once. The cron registry calls chargeAll.
const WEEK = 7n * 24n * 60n * 60n * 1000n; // chain.blockTimestamp is in ms
({
// token, merchant and the cron registry come in as ase1 addresses;
// the SDK passes them to the contract as lowercase hex.
init(token, merchant, cron) {
assert(!storage.get('token'), 'already initialised');
storage.set('token', token);
storage.set('merchant', merchant);
storage.set('cron', cron);
},
subscribe(amountPerWeek) {
const sub = {
amount: BigInt(amountPerWeek).toString(),
nextCharge: (chain.blockTimestamp + WEEK).toString(),
};
storage.set('sub:' + msg.sender, JSON.stringify(sub));
emit('Subscribed', { user: msg.sender, amount: sub.amount });
},
// Fired by the cron registry every day.
chargeAll() {
assert(msg.sender === storage.get('cron'), 'only the cron registry');
for (const key of storage.keys('sub:')) {
const sub = JSON.parse(storage.get(key));
if (chain.blockTimestamp < BigInt(sub.nextCharge)) continue;
const user = key.slice(4);
try {
E(storage.get('token')).transferFrom(user, storage.get('merchant'), sub.amount);
} catch (err) {
emit('ChargeFailed', { user });
continue;
}
sub.nextCharge = (BigInt(sub.nextCharge) + WEEK).toString();
storage.set(key, JSON.stringify(sub));
emit('Charged', { user, amount: sub.amount });
}
},
});Native cron
One schedule transaction to the cron registry system contract, paid from an escrow, vs registering with Chainlink Automation, funding LINK, and waiting for off-chain triggers.
Iterable storage
storage.keys(prefix) lists every key under a prefix, sorted. Solidity mappings can't be iterated, so you maintain a parallel array by hand.
No constructor, no ABI, no compile
Deploy source directly, then call init like any other method. The VM is the runtime. Inspect any contract on-chain in plain JavaScript.
Everything you need. Nothing you don't.
In-browser IDE with templates, deploy, and interact, no install.
@asentum/sdkAsentumClient, AsentumWallet, AsentumContract. ~14 KB. Node + browser. On npm.
@asentum/payStripe-shaped payments SDK. Charges, customers, checkout sessions, webhooks.
ARC-20 + ARC-21 + ARC-721Fungible token, scheduled-execution and NFT standards. The vocab the ecosystem speaks.
JSON-RPC APIEthereum-compatible. Works with ethers.js, viem, and existing Web3 tools.
Block ExplorerBrowse blocks, transactions, contract source, validator activity, faucet.
Native @usernames.
Resolve @names with one call: GET /name/:name, GET /name-of/:address, ase_resolveName and ase_lookupAddress on every node, plus resolveName and lookupAddress in the SDK, and a wallet method for every write (register, transfer, primary, records) in @asentum/sdk 0.3.1. The address stays the account; the name is a pointer.
Wallets resolve a name to its address when you sign, and the confirm screen shows both.
Apps show your primary @name next to your address: the explorer, the airdrop leaderboard, Social and Communities.
A system contract every node can read. No third-party resolver: any app gets names on day one.
Fees: 3 characters 500 ASE, 4 characters 100 ASE, 5 characters 50 ASE, 6 or more 10 ASE. Half burned, half to the treasury. Testnet names do not carry over to mainnet.
What your contract has access to.
Contracts run inside SES (Secure ECMAScript), a hardened JavaScript sandbox. No filesystem, no network, no eval. These seven globals are everything the VM injects:
storageKey-value store: get, set, delete, has, keys(prefix). Values are stored as strings.
emitEmit named events with data. Indexed and queryable.
msgCall context: sender, value (BigInt), contractAddress.
chainBlock context: blockNumber, blockTimestamp (ms), chainId. All BigInt.
E(addr)Cross-contract calls, synchronous. A contract on the call stack cannot be re-entered.
transferSend ASE from the contract to another address.
assertassert(condition, message) throws and reverts when the condition is falsy.
SchedulingNot a global. Call schedule on the cron registry system contract (ARC-21).
Build a token in 10 minutes.
Step-by-step guide: write a token contract, deploy it, transfer tokens, query balances.
Hardened JavaScript explained.
How SES protects contracts from prototype pollution, eval injection, and supply chain attacks.
Network parameters.
Chain ID, block time, gas limits, contract size limits, and every protocol constant.
Six categories of dapp you couldn't cleanly build elsewhere.
Each one has a working demo + a use-case page with the architecture, the code shape, and the primitives. Pick the one that matches what you're building and start from there.
Revenue splits that auto-distribute.
Read use case →AI agentsAgents that schedule themselves on-chain.
Read use case →SubscriptionsStripe Recurring, settled in seconds.
Read use case →PayrollMonthly payday, fired by the protocol.
Read use case →TreasuryDCA, rebalance, sweep, all on autopilot.
Read use case →SocialOn-chain profiles, posts, comments, likes.
Read use case →