Skip to Content
ContractsOverview

/contracts/overview

Dealers.sh is implemented as a set of small, composable smart contracts on Abstract rather than as a single monolithic contract. The split keeps each component auditable on its own and makes it easier to swap or extend pieces without touching the rest. This page lists every contract in the system and walks through how they cooperate during a typical action.

The Dealers.sh public function surface grouped by domain: ERC-721 lifecycle, PVE actions, shop and claims, PVP, and the supporting registries.

This map mirrors the game loop diagram — each colored region corresponds to the same gameplay area, but populated with the actual on-chain functions that drive it.

The contract graph

The system has sixteen deployed contracts at present. Each one has a focused responsibility, and most player actions touch three or four of them in sequence.

ContractResponsibility
DealersNFTThe ERC-721 itself. Holds ownership records and per-token game state.
DealersCoreShared game configuration and state used by every action module.
DealersActionsThe dispatcher. Routes player calls to the appropriate module.
DealersPVEHandles buy, sell, clear heat, and black market resolution.
DealersPVPHandles same-area player versus player attacks.
DealersHeistsThe heists module: five-stage push-your-luck runs and the optional ETH jackpot add-on, drawn through Pyth Entropy.
DealersBoostsImplements the time-limited shop boosts (Grinder, Hustler, Kingpin).
DEDrugRegistryThe drug catalogue: names, rarities, and base prices.
DEAreaRegistryThe area catalogue: names, types, and price bands.
DealersClaimsVerifies achievement criteria and issues rewards.
DealersMulticallBatched reads and writes used by the in-NFT UI.
DealersPaymentHandlerCentralises cash flows for mint, bail, shop, and travel.
DealersRandomnessProvides the resolution source for stochastic outcomes.
DealersChatFactoryStores the on-chain chat and pager log per token.
DealerRendererSVGBuilds the character SVG from packed trait data.
DealerRendererHTMLWraps the SVG and the embedded game into the animation_url.

How a deal flows in plain English

Following a single buy action through the contracts is a useful way to understand how everything fits together. When the player taps Buy on the deal tab inside the NFT viewer, the game UI builds a call to DealersActions. The dispatcher inspects the call and routes it to DealersPVE, which is the PVE module.

The PVE module reads the relevant drug data from DEDrugRegistry and the relevant area data from DEAreaRegistry, then asks DealersRandomness for the roll that determines how the negotiation resolves. With those inputs in hand, the module computes the result, updates the player’s reputation, heat, cash, and stash on DealersCore, and instructs DealersPaymentHandler to settle the cash side of the deal.

The chat log is appended through DealersChatFactory, which is the contract that holds the per-token activity stream that the pager reads from. When the next render happens, the in-NFT UI reads the updated state from DealersCore, reads the new chat entries from the chat factory, and shows the player exactly what happened.

Every step of that flow is a public, verified contract call that anyone can inspect on the Abstract block explorer. The contract addresses are documented on /contracts/addresses.