Showcase · Live on testnet

Pay once, settled by a contract you can read.

Premium, the blue check on social.asentum.com, is sold by a JavaScript contract on AsentumChain. Since 25 September 2026 there is one plan: Premium Lifetime, 1,000 ASE once. The fee goes straight to the merchant in the same transaction. No payment provider, no card on file, nothing charged later.

The original weekly (3 ASE) and monthly (10 ASE) subscription is closed to new sign-ups. Existing subscribers keep the check while their deposit covers a period, and can cancel on social.asentum.com/premium for a refund of what is left.

Contract Source

72 lines of deployed JavaScript.

AsentumPremiumLifetime at ase1nnljsc…wcfv, the contract that sells Premium today.

// AsentumPremiumLifetime: one-time purchase that powers the blue check on
// social.asentum.com from 2026-09-25. Replaces the weekly/monthly
// subscription (premium.js) with a flat fee: pay PRICE once, premium for
// good. The fee goes straight to the merchant; nothing is held in the
// contract and nothing is charged later, so there is no cron and no lapse.
//
// Storage layout:
//   merchant        address that receives the fee
//   members         JSON array of premium addresses (lowercase), purchase order
//   m:<addr>        JSON { paidAt, amount }

const ONE_ASE = 1000000000000000000n;
const PRICE = 1000n * ONE_ASE; // 1000 ASE, once
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';

({
  // One-shot at deploy time. Sets the merchant address that receives fees.
  init(args) {
    assert(!storage.get('merchant'), 'already initialised');
    const merchant = (args && args.merchant) ? String(args.merchant).toLowerCase() : ZERO_ADDRESS;
    assert(merchant !== ZERO_ADDRESS, 'merchant required');
    storage.set('merchant', merchant);
    storage.set('members', '[]');
    emit('Initialised', { merchant });
  },

  // Buy premium for the sender. msg.value must be at least PRICE; anything
  // above it is sent back, so a wallet that rounds up never overpays.
  buy() {
    const sender = String(msg.sender).toLowerCase();
    assert(!storage.get('m:' + sender), 'already premium');
    const value = BigInt(msg.value);
    assert(value >= PRICE, 'send 1000 ASE to buy premium');
    const merchant = storage.get('merchant');
    assert(merchant, 'not initialised');

    transfer(merchant, PRICE);
    if (value > PRICE) transfer(sender, value - PRICE);

    const now = BigInt(chain.blockTimestamp) / 1000n; // ms -> s
    storage.set('m:' + sender, JSON.stringify({ paidAt: now.toString(), amount: PRICE.toString() }));
    const members = JSON.parse(storage.get('members') || '[]');
    members.push(sender);
    storage.set('members', JSON.stringify(members));

    emit('Purchased', { user: sender, amount: PRICE.toString() });
    return true;
  },

  // ─── views ────────────────────────────────────────────────────────

  isPremium(addr) {
    return Boolean(storage.get('m:' + String(addr).toLowerCase()));
  },

  membershipOf(addr) {
    const raw = storage.get('m:' + String(addr).toLowerCase());
    return raw ? JSON.parse(raw) : null;
  },

  members() {
    return JSON.parse(storage.get('members') || '[]');
  },

  price() {
    return { amount: PRICE.toString(), label: '1000 ASE, one time' };
  },

  merchant() {
    return storage.get('merchant');
  },
});

This is the exact source on chain, read back with eth_getCode (Asentum stores a contract's JavaScript as its code). buy() checks for at least 1,000 ASE, transfers the fee to the merchant, refunds anything above it and records the member. isPremium() is a free view that social.asentum.com calls to draw the blue check.

Legacy: AsentumPremium weekly and monthly subscription (207 lines, closed to new sign-ups)

Deployed at ase1stuchx…mmck. A deposit and debit design: subscribe() holds the deposit, chargeAll() charges every subscriber that is due and drops the ones whose deposit has run out, cancel() refunds the rest. chargeAll() is written to be run by the ARC-21 cron registry rather than a keeper bot.

// AsentumPremium — recurring subscription contract that powers the
// blue check on social.asentum.com.
//
// Pattern: deposit-based recurring billing.
//   - The user subscribes with msg.value ≥ one period's worth.
//   - The contract holds the deposit.
//   - chargeAll() (cron-fired daily) debits each due subscriber and
//     transfers to the merchant address. Lapsed users (balance <
//     period amount) are dropped and refunded.
//   - The user can topUp() any time, cancel() any time (gets the
//     remaining balance back).
//
// Why deposit-and-debit instead of ARC-20 transferFrom: keeps the
// UX to a single signing step. The user signs subscribe(), the chain
// holds the funds, cron does the rest. No separate ERC-20-style
// approve transaction.
//
// Two tiers:
//   - 'w'  — 3 ASE / week
//   - 'm'  — 10 ASE / month
//
// Storage layout:
//   merchant            address that receives the charges
//   index               JSON array of subscriber addresses (lowercase)
//   sub:<addr>          JSON { tier, amount, period, balance, nextCharge, startedAt }

const ONE_ASE = 1000000000000000000n;
const WEEK_SEC = 604800n;
const MONTH_SEC = 2592000n;
const WEEKLY_AMOUNT = 3n * ONE_ASE;   // 3 ASE / week
const MONTHLY_AMOUNT = 10n * ONE_ASE; // 10 ASE / month
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';

({

  // One-shot at deploy time. Sets the merchant address that receives
  // recurring charges. Subsequent calls revert.
  init(args) {
    assert(!storage.get('merchant'), 'already initialised');
    const merchant = (args && args.merchant) ? String(args.merchant).toLowerCase() : ZERO_ADDRESS;
    storage.set('merchant', merchant);
    storage.set('index', '[]');
    emit('Initialised', { merchant });
  },

  // Subscribe to a tier. msg.value must be at least one period's worth.
  // The excess sits as deposit balance and is consumed on each charge.
  subscribe(tier) {
    const sender = String(msg.sender).toLowerCase();
    const t = String(tier);
    let amount;
    let period;
    if (t === 'w') { amount = WEEKLY_AMOUNT; period = WEEK_SEC; }
    else if (t === 'm') { amount = MONTHLY_AMOUNT; period = MONTH_SEC; }
    else { assert(false, 'unknown tier (use "w" or "m")'); }
    const value = BigInt(msg.value);
    assert(value >= amount, 'deposit too small: must cover at least one period');
    assert(!storage.get('sub:' + sender), 'already subscribed; cancel first');

    // chain.blockTimestamp is in MILLISECONDS on AsentumChain; normalise to
    // seconds so the WEEK_SEC / MONTH_SEC period math is correct (otherwise a
    // "weekly" sub would become chargeable ~10 minutes after subscribing).
    const now = BigInt(chain.blockTimestamp) / 1000n;
    const sub = {
      tier: t,
      amount: amount.toString(),
      period: period.toString(),
      balance: value.toString(),
      nextCharge: (now + period).toString(),
      startedAt: now.toString(),
    };
    storage.set('sub:' + sender, JSON.stringify(sub));

    const idx = JSON.parse(storage.get('index') || '[]');
    if (!idx.includes(sender)) {
      idx.push(sender);
      storage.set('index', JSON.stringify(idx));
    }

    emit('Subscribed', { user: sender, tier: t, deposit: value.toString() });
    return true;
  },

  // Add more ASE to your subscription balance. Extends how long you
  // stay premium before lapsing.
  topUp() {
    const sender = String(msg.sender).toLowerCase();
    const raw = storage.get('sub:' + sender);
    assert(raw, 'not subscribed');
    const sub = JSON.parse(raw);
    sub.balance = (BigInt(sub.balance) + BigInt(msg.value)).toString();
    storage.set('sub:' + sender, JSON.stringify(sub));
    emit('ToppedUp', { user: sender, amount: String(msg.value) });
    return true;
  },

  // Cancel your subscription. Remaining deposit balance is refunded.
  // Premium status drops immediately.
  cancel() {
    const sender = String(msg.sender).toLowerCase();
    const raw = storage.get('sub:' + sender);
    assert(raw, 'not subscribed');
    const sub = JSON.parse(raw);
    const refund = BigInt(sub.balance);
    if (refund > 0n) transfer(sender, refund);
    storage.delete('sub:' + sender);
    const idx = JSON.parse(storage.get('index') || '[]').filter(function (a) { return a !== sender; });
    storage.set('index', JSON.stringify(idx));
    emit('Cancelled', { user: sender, refunded: refund.toString() });
    return true;
  },

  // Walks every subscriber and charges those whose nextCharge is due.
  // Called by the chain's cron registry every day (we register it
  // with cron.schedule after deploy). Open to public callers as a
  // testnet convenience — for mainnet we'd restrict to the chain
  // caller (msg.sender == zero address).
  chargeAll() {
    const merchant = storage.get('merchant');
    const now = BigInt(chain.blockTimestamp) / 1000n; // ms -> s (see subscribe)
    const idx = JSON.parse(storage.get('index') || '[]');
    const stillIn = [];
    let totalCharged = 0n;
    let lapsedCount = 0;

    for (let i = 0; i < idx.length; i++) {
      const addr = idx[i];
      const raw = storage.get('sub:' + addr);
      if (!raw) continue;
      const sub = JSON.parse(raw);
      const nextCharge = BigInt(sub.nextCharge);
      if (now < nextCharge) {
        stillIn.push(addr);
        continue;
      }

      const amount = BigInt(sub.amount);
      const balance = BigInt(sub.balance);

      if (balance >= amount) {
        transfer(merchant, amount);
        sub.balance = (balance - amount).toString();
        sub.nextCharge = (nextCharge + BigInt(sub.period)).toString();
        storage.set('sub:' + addr, JSON.stringify(sub));
        totalCharged = totalCharged + amount;
        emit('Charged', { user: addr, amount: amount.toString(), tier: sub.tier });
        stillIn.push(addr);
      } else {
        if (balance > 0n) transfer(addr, balance);
        storage.delete('sub:' + addr);
        lapsedCount = lapsedCount + 1;
        emit('Lapsed', { user: addr });
      }
    }

    storage.set('index', JSON.stringify(stillIn));
    return { charged: totalCharged.toString(), lapsed: String(lapsedCount), active: String(stillIn.length) };
  },

  // ─── views ────────────────────────────────────────────────────────

  // Is this address currently premium?
  // True iff they have a subscription AND enough balance to cover the
  // next charge (otherwise they'd lapse on next chargeAll).
  isPremium(addr) {
    const target = String(addr).toLowerCase();
    const raw = storage.get('sub:' + target);
    if (!raw) return false;
    const sub = JSON.parse(raw);
    return BigInt(sub.balance) >= BigInt(sub.amount);
  },

  // Full subscription record for one address, or null.
  subscriptionOf(addr) {
    const target = String(addr).toLowerCase();
    const raw = storage.get('sub:' + target);
    return raw ? JSON.parse(raw) : null;
  },

  // The list of all currently-indexed subscribers.
  subscribers() {
    return JSON.parse(storage.get('index') || '[]');
  },

  // Tier pricing (for the front-end to display).
  tiers() {
    return {
      weekly: {
        id: 'w',
        amount: WEEKLY_AMOUNT.toString(),
        periodSec: Number(WEEK_SEC),
        label: '3 ASE / week',
      },
      monthly: {
        id: 'm',
        amount: MONTHLY_AMOUNT.toString(),
        periodSec: Number(MONTH_SEC),
        label: '10 ASE / month',
      },
    };
  },

  // Address that receives the charges.
  merchant() {
    return storage.get('merchant');
  },
});
Live on chain
Reading contract state…
Weekly and monthly subscription: closed to new sign-ups.ase1stuchx…mmck
01Deploy

Merchant deploys the contract.

The contract goes on chain once and init() sets the merchant address that receives every fee. The price is a constant in the source, so anyone can check it.

02Buy

Customer pays in one signed tx.

One call to buy() with 1,000 ASE attached. The contract forwards the fee to the merchant and sends back anything extra in the same transaction. No card on file, no payment provider account.

03Verify

Any app checks for free.

isPremium(address) is a read, so it costs no gas and needs no wallet. social.asentum.com uses it to show the blue check on posts, comments and profiles.

Why this matters

No payment provider. The contract is the checkout.

No payment provider

The fee moves from the buyer to the merchant inside one transaction. No processor in the middle, no account to get frozen, no payout delay.

No card on file

One signed payment and you are done. No saved payment method, no recurring authorisation, no chargebacks.

Nothing held

The lifetime contract keeps no balance: the fee is forwarded straight away and any overpayment is refunded in the same call.

Free to check

isPremium() and membershipOf() are reads. Any app can gate a feature on Premium without a backend or an API key.

Source on chain

The deployed JavaScript is the code itself. Read it in the explorer or with eth_getCode: what you read is what runs.

Auditable forever

Every purchase is a signed transaction with a Purchased event. No SaaS dashboard between you and your revenue history.

Chain Primitives

What the contracts actually use.

A handful of VM globals do all the work. Amounts are BigInt in wei (1 ASE = 10^18), so there is no rounding anywhere in the payment path.

msg.value

The ASE attached to the call. buy() requires at least 1,000 ASE.

msg.sender

The buyer. Used as the storage key for the membership record.

transfer

Sends ASE from the contract: the fee to the merchant, any excess back to the buyer.

storage.get / set

Persistent key and value store: the merchant, the member list and each record.

chain.blockTimestamp

Block time in milliseconds. Stored as paidAt (in seconds) on each purchase.

emit

Writes an event (Purchased) that explorers and indexers pick up.

assert

Reverts the whole call with a message, e.g. "already premium".

storage.delete

Used by the legacy subscription to remove a record on cancel or lapse.

Source

Read the contract on the explorer.

The explorer shows the deployed JavaScript of Premium Lifetime under Source Code. Fork it, change the price, deploy your own.

Legacy

Inspect the old subscription.

The weekly and monthly contract is still on chain for existing subscribers. Closed to new sign-ups.

Reference

ARC-21 cron specification.

The standard that lets contracts schedule their own calls, the building block for recurring billing like the legacy chargeAll().

Testnet Live

1,000 ASE once. Premium for good.