Hartii Gallery
Hartii Gallery is the production NFT marketplace/creator platform at hartiigallery.com — collection creation, five separate marketplace venues (fixed-price, bundles, auctions, gasless orders, ERC-1155), and a public read API backing the frontend.
Architecture
- Frontend: Vite + React, deployed as static assets to Cloudflare Pages.
- Chain library:
quais— this repo does not useethers. - Contracts: Hardhat project in
contracts/; deployed to Quai mainnet (Cyprus-1, chain 9). - Edge/API: Cloudflare Pages Functions under
functions/api/**— see api. - Data stores: Cloudflare KV (hot cache, floor prices, sales index) and D1 (durable collection index, sales history) behind the API — the browser never talks to KV/D1 directly.
There is also a testnet mirror, Orchard (hartiigallery.com/orchard, chain 15000), built
from the same app and used for rehearsal before mainnet contract changes. It shares the same
image/metadata proxy endpoints as production but has its own contract addresses and its own
KV/D1 — it is not documented further here since it carries no real value.
Live URLs
| App | hartiigallery.com |
| Public API base | https://hartiigallery.com/api/ |
| Orchard testnet mirror | https://hartiigallery.com/orchard (chain 15000 — rehearsal only) |
Data flow
- Collection creation. A creator calls
deployCollection(...)on the current factory (HartiiFactoryV7Clone), which deploys an EIP-1167 minimal-proxy clone ofHartiiCollectionV7Clone, initialized atomically in the same transaction. - Discovery. A scheduled worker scans the chain for
CollectionDeployedevents and known marketplace activity and writes a durable index into D1 (functions/api/collections.jsreads from that index, merging in live on-chain floor-price/listing reads rather than trusting a stale cache for money-relevant fields). - Browsing.
GET /api/collectionsreturns the whole catalogue in one response — factory collections plus externally-listed ones — for the Explore page.GET /api/floor-pricesrecomputes floors from live marketplace state. - Trading. The frontend calls the marketplace contracts directly from the connected wallet
(list, buy, offer, bundle, auction, gasless order fulfillment) — the API never custodies a
trade; it only indexes what already happened on-chain (
/api/sales) for fast history browsing. - Media. NFT images/metadata live on IPFS.
/api/imgand/api/metaare caching proxies that hedge across several public IPFS gateways and cache the result at Cloudflare's edge (content-addressed, so the cache is effectively permanent).
Live contracts (Quai mainnet, Cyprus-1)
All addresses below were read from src/utils/appConfig.js NETWORK_CONFIGS.mainnet and
independently confirmed live with quai_getCode against https://rpc.quai.network/cyprus1
(each returned non-empty deployed bytecode).
| Contract | Address | Role |
|---|---|---|
HartiiFactoryV7Clone (current factory) | 0x007d00B9752d852658A03167b825d62b68c375Fc | Deploys new collections as EIP-1167 clones |
HartiiFactory (legacy factory) | 0x00265a93d7Bf94147d88e27EA28A2AC9dAd9eF04 | Older full-bytecode factory; existing collections still resolve their provenance to it |
HartiiMarketplaceV8 (current marketplace) | 0x006792f8913d99e2D9E72087D4C3CBAf2e77E867 | Fixed-price listings + offers — write target for all new activity |
| Legacy marketplace (v7) | 0x003fEB578c595563e8790Ef0240B248e4D2C1Ae5 | Old listings/offers stay readable, buyable and cancellable here — no new listings |
HartiiBundleMarketplace | 0x0028E7a353cA07Ad754E8b1F144305e2E17b2eDA | Multi-NFT bundle listings, one flat price |
HartiiAuctionHouse | 0x0068d66A3FC1E65e89D00D801cADB095e6e4019c | English auctions with anti-snipe extension |
HartiiGaslessMarketplace | 0x005f633a448B10e0aF8E170394F92A83955a410f | EIP-712 signed orders, fulfilled by the buyer's tx |
HartiiMarketplace1155 | 0x00137c1eD65B084319ee1420a243aa1dD35BfA04 | Quantity-aware ERC-1155 trading venue |
HartiiCurationRegistry | 0x000404Cd0833465bCe3E345454B901b69B5ff51C | Editorial allow-list for a specific launch surface (see contracts) |
| Launchpad demo collection | 0x004Ff0147ca6AB274E171D2A47d0aD34762bE154 | Seed collection so Explore isn't empty before real factory deploys land |
Every collection a creator deploys through either factory is its own
HartiiCollectionV7Clone (or legacy HartiiCollection/HartiiCollectionV2) instance — there is
no single "the collection contract" address; see contracts for the template's
interface.
See contracts for the full interface and trust model of each contract above, and api / integrate for the HTTP surface and code examples.