Conversation
Replace all XRPL/XRP logic, dependencies, and adapters with EVM equivalents. No backward compatibility layer — clean break. ### API changes - Replace `xrpl` package with `viem` for EVM signing and tx submission - New `apps/api/src/evm/client.ts` for operator-signed ETH transfers - Remove `apps/api/src/xrpl/` directory (client, tx-builder, memo, ledger-sync) - Remove `apps/api/src/db/models/escrows.ts` (escrow model) - Rename all `*_drops` fields to `*_wei` in DB models and routes - Rename `ledger_events` → `chain_events`, `ledger_index` → `block_number` - Market auto-opens immediately on creation (no escrow tx required) - Auto-payouts via `signAndSubmitWithOperator` using operator private key - Update config: `EVM_RPC_URL`, `EVM_CHAIN_ID`, `EVM_OPERATOR_ADDRESS/PRIVATE_KEY` - Update default user provider: `"gemwallet"` → `"metamask"` ### Routes - `bets.ts`: amountWei, effectiveAmountWei, plain EVM unsignedTx (no trustSet) - `offers.ts`: ethAmountWei, blockNumber, volumeWei - `resolve.ts`: removed duplicate /resolve endpoint (now in markets.ts), amountWei - `markets.ts`: /resolve handles auto-payouts via viem ### Frontend changes - Replace GemWallet (`@gemwallet/api`) with MetaMask (EIP-1193 `window.ethereum`) - `WalletContext.tsx`: eth_requestAccounts, eth_sendTransaction, eth_chainId - `api.ts`: all types updated (totalPoolWei, amountWei, blockNumber, etc.) - Remove XRP helpers (formatXrp, xrpToDrops); add ETH helpers (formatEth, ethToWei) - Admin page: simplified 1-step market creation (no escrow signing flow) - Bet panel: ETH quick amounts [0.001, 0.01, 0.1, 1], single tx signing step - All components updated: formatEth, metaMaskInstalled, ETH labels - Footer updated: "EVM Parimutuel Prediction Market" ### Docs - README.md, DEMO.md, docs/ADR.md, docs/runbook.md: XRPL → EVM throughout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Breaking changes
Validation