Integrate deliberately.
Reconcile the result.
Wallet integration, contract calls, and transaction results.
Connect the user’s wallet
JPEG Markets uses Privy for user wallets. Network gas is covered when transaction sponsorship is available. Keep each user’s actions scoped to their own wallet. Review the target network, collection, amounts, and recipient before requesting a signature.
Integrations use the deployed contracts and their compiled ABIs. Read the launch receipt to verify the collection, FLOOR, converter, minter, and pool. Verify the router separately against those receipt bindings and the canonical pool key.
Read collection state
Read publicRemaining() and mintEconomics() from the minter, conversionOpensAt from the converter, and current wallet balances. For a selected vault piece, verify inventory(id) and NFT ownership.
Public minting and NFT deposits open after the configured activation delay. Token trading is available while the pool bootstraps. Display minted, revealed artwork; keep unminted assignments out of public galleries and payloads.
Choose a contract action
| Intent | CollectionRouter method |
|---|---|
| Buy FLOOR with the paired token | buyFloorWithQuote |
| Sell FLOOR for the paired token | sellFloorForQuote |
| Mint using FLOOR | mintWithFloor |
| Mint using the paired token | mintWithQuote |
| Redeem a selected vault NFT | redeemWithFloor or redeemWithQuote |
| Deposit an NFT for FLOOR | depositForFloor |
| Deposit and sell FLOOR | sellForQuote |
| Swap an NFT for a vault piece | exchangeNFTs |
Use the compiled ABI for exact arguments and units. Quote means the collection’s paired token. FLOOR uses 18 decimals; verify the paired token’s decimals separately. Supply explicit deadlines, spend limits, and minimum outputs where the method requires them.
Vault redemption and NFT deposits have no conversion fees. For v5, public minting costs one FLOOR for backing plus the 0–10% creator fee in FLOOR (default 10%); the minter sells the fee for quote through the collection’s Uniswap V4 pool and pays recipients in quote. Unavailable fee sales remain pending for a later mint or permissionless sellMintFees() call. Deployed v4 collections retain their original mint-fee payouts in FLOOR. Pool swaps have separate trading costs.
Confirm the result
Save the transaction hash, wait for its chain receipt, and refresh balances, ownership, supply, and vault inventory. Keep pending and confirmed states distinct.
If submission is interrupted, reconcile the known hash and canonical receipt before retrying. Never treat an unknown outcome as a failed transaction.
Router arguments and approvals
buyFloorWithQuote(address minter, uint256 floorAmount, uint256 maxQuote, uint256 deadline, address recipient) returns (uint256 spent)
sellFloorForQuote(address minter, uint256 floorAmount, uint256 minQuote, uint256 deadline, address recipient) returns (uint256 received)
mintWithQuote(address minter, uint256 quantity, uint256 maxQuote, uint256 deadline, address recipient)
redeemWithQuote(address minter, uint256[] ids, uint256 maxQuote, uint256 deadline, address recipient)
sellForQuote(address minter, uint256[] ids, uint256 minQuote, uint256 deadline, address recipient)
mintWithFloor(address minter, uint256 quantity, uint256 deadline, address recipient)
redeemWithFloor(address minter, uint256[] ids, uint256 deadline, address recipient)
depositForFloor(address minter, uint256[] ids, uint256 deadline, address recipient)
exchangeNFTs(address minter, uint256[] depositIds, uint256[] redeemIds, uint256 deadline, address recipient)These signatures describe the shared-router version. Supply the selected collection’s verified minter first; the router rejects minters outside its trusted coordinator. The production configuration serves Base (8453) and Robinhood Chain (4663). New launches use v5 economics; deployed legacy collections retain their original router and mint-fee behavior. Deadlines are Unix timestamps in seconds. Token amounts are raw integers. maxQuote for minting includes the total primary fee and pool purchase; minQuote bounds sale proceeds. Exchange arrays must have equal lengths. Quantities and batches must satisfy the deployed contracts’ limits.
Standalone FLOOR trades use a nonzero raw 18-decimal floorAmount, including fractions, up to type(int128).max. The buy delivers exactly that amount and refunds unused paired tokens to the caller; the sale consumes exactly that amount. These token trades do not charge a primary mint fee or wait for the public minting and deposit delay. Verify a router deployment containing these methods and pin its runtime hash; historical deployments do not gain new entry points.
For standalone trades, approve the router for maxQuote paired-token raw units when buying or the exact floorAmount when selling. For other router calls, approve the router to spend the required tokens: paired tokens up to the purchase limit for quote checkout; FLOOR plus the total paired-token mint fee for direct minting; FLOOR for direct redemption. Approve each deposited NFT to the router for deposits, sales, and exchanges. Direct minter calls instead require FLOOR approval to the converter and fee approval to the minter. Simulate again after approvals and before submission.
Standalone FLOOR trade events
event FloorPurchased(address indexed minter, address indexed payer, address indexed recipient, uint256 floorAmount, uint256 quoteSpent)
event FloorSold(address indexed minter, address indexed payer, address indexed recipient, uint256 floorAmount, uint256 quoteReceived)Verify a successful canonical receipt, the emitting router, all three indexed addresses, the exact raw FLOOR amount, and the paired-token spend or proceeds against the reviewed limits. Refresh wallet balances after confirmation. A pool price observation or transaction submission alone does not establish execution.
Public data and network configuration
Set chainId to 8453 for Base or 4663 for Robinhood Chain. Configure a matching public RPC, deployment addresses, and snapshot URL. The gateway serves chain-specific snapshot routes such as /data/8453/snapshot.json and /data/4663/snapshot.json, with corresponding health.json routes. The single-collection route remains /data/snapshot.json.
Snapshots are indexed observations, not executable quotes. Verify their chain, collection identities, canonical block, and freshness; recheck ownership and balances onchain before acting. Base market analytics require explicitly configured matching endpoints. The public gateway provides reads; launch preparation produces unsigned calldata and wallet transactions are submitted through the user’s provider.