MBA covenant artifacts

Cashscript artifact JSON for the four Mathematically Backed Asset covenants. Download the one that matches the MBA you're integrating, pass it to new Contract(artifact, [...args]), derive the token address locally, and verify it matches the on-chain reservoir before trusting any sidecar parameters.

Example — construct and verify

import { Contract, ElectrumNetworkProvider } from 'cashscript';
import artifact from './CoinMBA.json';

// Params read from the DVMB OP_RETURN of the asset's genesis (or Katalogos entry).
const categoryId  = '09af8a5b2fc2c9a2449045a8d5a6aa60db493989682eca257a57fa8d75d67231';
const rateSats    = 100n;
const feeBps      = 100n;
const founderLB   = Uint8Array.from(Buffer.from('76a9149aa6baabb2bbb1d1940e4ec82b9640a7ab62b8dc88ac', 'hex'));

// NOTE: cashscript expects tokenCategory in reversed byte order (VM byte order)
//       vs the display hex you'd paste into a block explorer.
const tokenCategory = Uint8Array.from(Buffer.from(categoryId, 'hex')).reverse();

const provider = new ElectrumNetworkProvider('chipnet');
const contract = new Contract(artifact, [tokenCategory, rateSats, feeBps, founderLB], { provider });

// Verify by matching against the on-chain reservoir address — fail loudly if drift.
const expectedTokenAddr = 'bchtest:rw8ypezzy6gv87tq96ey7p60vx9rgl4v5cq4lseg5luk9ktmn20ysl82y8uq0';
if (contract.tokenAddress !== expectedTokenAddr) {
  throw new Error('covenant drift — refusing to transact');
}

License and provenance

These artifacts are compiled from the cashscript source in the Deviant repo (currently private) and match the bytecode of the live chipnet deployments listed in the MBA page's live catalog. Verify by comparing the bytecode field of the JSON to the bytecode at any live MBA's reservoir address — they must be identical.