On this page
Run
Secrets and variables
Every secret and variable the template reads, whether it is required, and what happens without it.
Secrets#
Secrets are set in the Worker's Settings, Variables and Secrets with type Secret, or from your copy of the template with npx wrangler secret put followed by the secret's name. None goes in a settings code, a link or a file in your repository.
| Secret | Required | What it is for | Without it |
|---|---|---|---|
MARKET_ADMIN_TOKEN |
To store or replace settings at /setup, and to use the operator data console. Optional for a storefront set up entirely by variables |
At least 32 random characters | /setup cannot store settings: "Set MARKET_ADMIN_TOKEN to at least 32 random characters in your hosting dashboard." |
OPENSEA_API_KEY |
When OpenSea is on | Your own OpenSea key, for OpenSea listings, offers and purchase details | With OpenSea on, the OpenSea check says "Set OPENSEA_API_KEY in your hosting dashboard.", and on Ethereum the home page sends visitors to /setup and the API answers 503. With OpenSea off: "OpenSea is switched off. No API key is needed." |
RPC_URL |
No | Your own HTTPS Ethereum mainnet RPC, for reads, gas estimates and simulations | The site uses a shared public Ethereum RPC, and the RPC check says "The shared public RPC answers and can simulate a sale." |
READ_RPC_URL |
No | A separate Ethereum endpoint for plain chain reads | Reads use RPC_URL, or the shared public RPC |
INK_RPC_URL |
On Ink, for listings on your site and the RPC check | Your HTTPS Ink mainnet RPC | The RPC check says "Set INK_RPC_URL in your hosting dashboard." and listings on your site are not available. The venue feeds can still appear |
INK_PURCHASE_RPC_URL |
On Ink, for OpenSea checkout | An Ink node with historical reads and eth_simulateV1, for checking OpenSea purchases and their receipts |
OpenSea purchases inside the site and their receipt checks are not available on Ink |
MARKET_SETUP_UNLOCK |
No, and normally unset | The unlock code from /setup, set only while you replace stored settings |
Stored settings cannot be replaced. Delete it again once the new settings are stored |
The Ethereum RPC should support ordinary reads, gas estimates and eth_simulateV1 with transfer tracing and state overrides. On a limited RPC, quotes and order checks can fail.
Variables#
These are plain-text variables, for a site set up by hand. A site set up through the builder leaves them unset. Settings gives each one's allowed values and default.
| Variable | Setting |
|---|---|
MARKET_CHAIN_ID |
chainId |
MARKET_COLLECTIONS |
collections |
MARKET_REVIEWED_COLLECTIONS |
reviews |
MARKET_VENUES |
venues |
FEE_BPS |
feeBps |
FEE_RECIPIENT |
feeRecipient |
MARKET_SITE_NAME |
siteName |
MARKET_THEME |
theme |
MARKET_DESIGN |
design |
PANDO_DATA_ORIGIN |
dataOrigin |
With no stored record, a value in any of MARKET_CHAIN_ID, MARKET_COLLECTIONS, MARKET_REVIEWED_COLLECTIONS, FEE_RECIPIENT or FEE_BPS makes the site one set up by hand, which cannot be claimed at /setup until they are removed. Stored settings take precedence over variables.
Bindings#
The template's wrangler.jsonc declares these. You do not set them; Cloudflare makes them when it deploys.
| Binding | What it is |
|---|---|
BOOK |
One SQLite Durable Object for each collection's order book |
REGISTRY |
The SQLite Durable Object that lists the collections |
SETTINGS |
SQLite Durable Objects: the chosen settings object, which holds the stored settings, and separately named objects that count each visitor's admin token tries |
MEDIA |
The R2 bucket for pictures. Wrangler makes it on the first deploy |
IMAGES |
Cloudflare Images, to resize pictures |
CHAIN_READS |
A rate limit: 60 chain reads a minute for each visitor |
WALLET_READS |
A rate limit: 30 wallet reads a minute for each visitor |
ASSETS |
The static files |
CF_VERSION |
The deployed Worker version, which the site uses to tell deployments apart. The Version line on /setup shows the marketplace software's release instead |
A local .dev.vars#
For npm run dev, copy operator-settings.example to .dev.vars, which Git ignores, and fill in what you need:
OPENSEA_API_KEY=
MARKET_ADMIN_TOKEN=
RPC_URL=
READ_RPC_URL=
INK_RPC_URL=
INK_PURCHASE_RPC_URL=