Tracking epic for settling crypto (USDC) ticket revenue on-chain, routed by isRefundable. Supersedes the accumulate-then-withdraw assumptions in #37 and the internal-transfer leg of #68.
Architecture (verified against the deployed Base Sepolia MarketplaceFacet)
Crypto checkout settles via the Diamond's mintTicket(ticketId, USDC, buyer), which splits on-chain by isRefundable:
- Non-refundable → organizer's cut (
ticketFee) transferred instantly to the on-chain ticketAdmin (the organizer) in the mint tx; HostIT's 3% accrues to hostItBalance.
- Refundable → organizer's cut escrowed;
claimRefund valid endTime..endTime+3d; withdrawTicketBalance releases it after the window (WithdrawPeriodNotReached gate is conditional on isRefundable).
The buyer never transacts on-chain — a HostIT settlement wallet holds the deposited USDC and signs mintTicket; only that wallet + user wallets need gas (Circle Gas Station).
Phase 1 — foundation ✅ (branch feat/crypto-onchain-split)
Phase 2 — scanner delegation
Phase 3 — crypto settlement + refunds
Ops prerequisite
Refs #37, #68
Tracking epic for settling crypto (USDC) ticket revenue on-chain, routed by
isRefundable. Supersedes the accumulate-then-withdraw assumptions in #37 and the internal-transfer leg of #68.Architecture (verified against the deployed Base Sepolia MarketplaceFacet)
Crypto checkout settles via the Diamond's
mintTicket(ticketId, USDC, buyer), which splits on-chain byisRefundable:ticketFee) transferred instantly to the on-chainticketAdmin(the organizer) in the mint tx; HostIT's 3% accrues tohostItBalance.claimRefundvalidendTime..endTime+3d;withdrawTicketBalancereleases it after the window (WithdrawPeriodNotReachedgate is conditional onisRefundable).The buyer never transacts on-chain — a HostIT settlement wallet holds the deposited USDC and signs
mintTicket; only that wallet + user wallets need gas (Circle Gas Station).Phase 1 — foundation ✅ (branch
feat/crypto-onchain-split)executeContractaccepts a signerwalletId(default treasury)createTicketsigned by the organizer → organizer is the on-chainticketAdmin(payout target + mainAdmin + scanner-role holder)checkInsigned by the scanner's wallet (role holder), not treasuryPhase 2 — scanner delegation
ticketAdminRoleto other HostIT users (organizer-signedaddTicketAdmins/removeTicketAdmins)Phase 3 — crypto settlement + refunds
mintTicket(approve + execute) instead of the freemintFiatTicketwithdrawTicketBalanceafter window) — narrows Blockchain: Bull queue — payout (withdrawTicketBalance on-chain) #37claimRefundendpoint for refundable events (buyer-initiated, within window)withdrawHostItBalance→ treasury (HostIT's 3%)Ops prerequisite
CIRCLE_WALLET_SET_ID) on Base-Sepolia + Base, funded — organizer-signedcreateTicket/checkInfail without it.Refs #37, #68