Skip to content

websitekit 0.2.0 — live on mainnet

Latest

Choose a tag to compare

@vibecodermaxi vibecodermaxi released this 02 Oct 20:13

websitekit is live on Robinhood Chain mainnet (4663), and boards settle in USDG.

npm create websitekit my-site
cd my-site && pnpm install && pnpm dev

The first run needs no credentials. It reads a live, already-traded demo board on mainnet. Set NEXT_PUBLIC_WEBSITEKIT_CHAIN_ID=46630 to use the free testnet instead.

Unaudited, and no audit is planned. The contracts are not upgradeable, and on mainnet the money is real.

Packages

  • @websitekit/sdk 0.2.0
  • @websitekit/react 0.2.0
  • create-websitekit 0.2.0

Contracts

  • Render escrow: EscrowFactory, EscrowVault and Attestor, outside the frozen core. A board's publisher revenue is held for a window and paid to slot holders if the page goes dark. These have an owner; see SECURITY.md.
  • SlotSite gains SiteConfig.pinTreasury, the only bytecode escrow needs.
  • All seven mainnet contracts are verified on Sourcify as exact matches. Addresses are in addresses.ts.

SDK

  • chainFor names a chain; deploymentFor still throws for one with nothing deployed.
  • ROBINHOOD_MAINNET and ROBINHOOD_MAINNET_ESCROW.
  • settlementTokenFor(chainId): USDG on mainnet, a mintable tUSD stand-in on testnet. readSettlementCurrency reads a board's decimals instead of assuming 18.
  • approvalFor(buyRequest, token): the ERC-20 approval a purchase needs, sized to the maxPrice it authorises.
  • demoSiteFor(chainId) and the escrow reads and builders.

React

  • <BuyDialog> shows amounts in the board's own currency. It printed "ETH" on every board.
  • On a token board it says the wallet will ask twice, and passes the approval to onConfirm as a third argument. useBuy gains buildApproval.

Scaffold

  • Defaults to mainnet and USDG. The chain, addresses, settlement token and demo board all come from the SDK, so the template holds no chain literal.
  • Floors are in dollars. The deploy script settles in the chain's dollar and refuses a decimals mismatch.

Upgrading from 0.1.x

  • <BuyDialog onConfirm> gets a third argument, approval. On a USDG board, send it and wait for its receipt before sending the purchase; it is null on a native board.
  • BuyQuote gains currency. Format amounts with it, not with formatEther.
  • @websitekit/react 0.2.0 needs @websitekit/sdk ^0.2.0.