Safety and errors
Handle changed state, approvals, expiry, slippage, and transaction errors.
Contract integrations should assume that prices, owners, approvals, pause state, and listings can change between page render and transaction execution.
Transaction checklist
- Confirm chain ID
4663. - Load active contract addresses from configuration.
- Validate every user-entered address with checksum parsing.
- Read the current contract state immediately before the write.
- Show value, price, minimum output, fees, and target contract.
- Wait for a successful receipt.
- Keep the transaction hash while waiting for indexing.
Launchpad failures
| Error | Meaning | Response |
|---|---|---|
DeployDisabled | New launches are paused | Disable submission and retry after configuration changes |
InsufficientInitialBuy | ETH is below initialBuyAmount() | Refresh the minimum and ask for a new amount |
InvalidFeeRecipient | Fee recipient is the zero address | Require a checksummed nonzero wallet |
Slippage exceeded | Sell output fell below minEthOut | Refresh the quote and let the user choose a new tolerance |
| ERC-20 allowance failure | Router cannot transfer the sell amount | Check allowance and complete approval first |
Marketplace failures
| Error | Meaning | Response |
|---|---|---|
MarketplaceNotApproved | Token approval does not point to the marketplace | Read getApproved and request token-specific approval |
NotTokenOwner | Connected seller does not own the NFT | Refresh ownerOf and disable seller controls |
ListingAlreadyExists | A record already exists for the token | Read it, then update, cancel, or invalidate as appropriate |
ListingExpired | The expiry has passed | Invalidate the listing or choose another item |
ListingStale | Ownership or approval changed | Refresh owner and approval, then invalidate stale state |
IncorrectPayment | Sent ETH differs from the current price | Re-read the listing and ask for price review |
BuyerIsSeller | Seller wallet attempted its own purchase | Connect a different buyer wallet |
EmptyProceeds | Caller has no pending balance | Hide withdrawal until pendingProceeds is positive |
User rejection and replacement
A wallet rejection is a normal outcome. Restore the form without reporting a contract failure. If the wallet replaces or reprices a pending transaction, track the final hash returned by the provider and inspect its receipt.
Approval safety
Approve only the required spender. Token sales can approve the exact ERC-20 amount. NFT listings use approve(marketplace, tokenId), which limits authority to one item and clears on transfer.
Reporting a problem
Record the chain ID, connected account, transaction hash, target contract, expected action, and visible error. Never include a seed phrase, private key, or raw wallet backup in a support message.