Deploy a digital asset

A digital asset takes one of three shapes: a single piece, a collection, or a generative program. The deploy flow is the same for each; they differ in the command and its options. For each, you choose how much of the asset is stored on-chain.

Before a real launch, decide two things (an agent will ask you these): how much of the asset is stored on-chain (see the on-chain spectrum), and where the source bytes are stored (see Storage).

Single asset

npx abx deploy --image ./art.png --name "..." --symbol ABX --sign

Deploys one 1/1 token and indexes it. No server is required. Notable options:

  • --onchain-image: store the image bytes on-chain through the chunk store. This implies --onchain-uri. Add --compress fastlz or --compress gzip to compress them.
  • --onchain-uri: resolve tokenURI and contractURI fully on-chain.
  • --description, --external-url, --traits "k=v; k2=v2", and --royalty-bps <0-10000> (default 500).
  • --no-mint to deploy without minting, and --salt 0x... to deploy to a predicted address.

A 1/1 has no built-in primary sale. To sell a single piece through the fixed-price minter, deploy a one-token collection instead: npx abx deploy-series --count 1.

Collection

npx abx deploy-series --dir ./art --name "..." --symbol ABX --sign

Deploys one contract and mints many tokens from a folder of media. Files sort into token ids 0, 1, 2, .... Notable options:

  • Mint timing: --mint-all, --mint-count N, or --no-mint.
  • Image custody: --onchain-image [--compress fastlz]; or --onchain-uri --backend arweave|ipfs|cloud, which puts the image off-chain and the JSON on-chain with no server; or --public-base-url <url> for a hosted resolver.
  • --minter 0x..., --primary-payee 0x..., and --unpaused (the default is paused).

Generative or code

npx abx inspect ./sketch.js
npx abx deploy-code --script ./sketch.js --public-base-url <url> --sign

Run inspect first: it analyzes a script for traits, on-chain reproducibility, and dependencies, and recommends a lane. deploy-code then deploys the project. It needs a resolver you run (--public-base-url) or the fully on-chain lane (--onchain-uri). Notable options:

  • Source: --script <file> (the program on-chain in chunks), --code-dir <dir> (an off-chain build with an index.html), or --image-renderer 0x... (a Solidity SVG renderer).
  • --dep <ref> (repeatable and ordered; index 0 is the runtime; name@version or an address), and --dep-registry 0x....
  • --schema key:Type:Auth,... for governed parameters, for example palette:HexColor:TokenOwner.
  • --image-base <url> for off-chain thumbnails, or --attributes-renderer 0x... for on-chain traits.

After deploying

  1. Attach data (optional). abx attach <address> <key> <uri> adds a named, typed file to the token's data plane, such as stems, a 3D model, or a dataset. Use --file <path> to store small bytes on-chain instead of a URI.
  2. Serve. abx serve runs the resolver, which re-indexes from the chain and serves metadata and images.
  3. Verify. abx verify <address> re-hashes the served bytes against the on-chain commitment.