-
Notifications
You must be signed in to change notification settings - Fork 25
Added Base and Sepolia. Made it multichain. #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis update revises supported blockchain chain IDs across the application, adds Base Mainnet support, and updates related chain name mappings and explorer URLs. Dialog state management and transaction feedback in the InteractionClient component are improved, and contract address mappings are updated. Transaction confirmation logic is enhanced in the create page. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI
participant Blockchain
User->>UI: Initiate transaction (e.g., create cat)
UI->>Blockchain: Send transaction
Blockchain-->>UI: Return transaction hash
UI->>Blockchain: Poll for transaction receipt
Blockchain-->>UI: Return receipt (confirmed)
UI->>User: Show success toast, refresh data, redirect after delay
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
web/src/utils/catExplorer.ts (1)
9-10: Consider DRY by centralizing explorer URL mappings.The new Base Mainnet (8453) and Base Goerli (84531) entries mirror those in
explorer.ts. Extracting this mapping into a shared constant (e.g.EXPLORER_URLS) and importing it in both utilities would reduce duplication and make it easier to add or remove chains consistently across address and transaction explorers.web/src/app/page.tsx (1)
34-35: Additions look good; consider DRY.Including Base Mainnet (8453) and Polygon Mainnet (137) here correctly extends the supported networks for “Use CAT.” To avoid divergent lists in multiple components, you could centralize
supportedChainsin a shared module and import it wherever needed.web/src/utils/explorer.ts (1)
9-10: DRY: unify explorer URL mappings.These new transaction explorer mappings for Base Mainnet (8453) and Base Goerli (84531) duplicate what's in
catExplorer.ts. Moving both into a single exported constant (e.g.EXPLORER_URLS) would simplify maintenance and ensure consistency.web/src/app/[cat]/InteractionClient.tsx (1)
734-738: Remove unnecessary React fragment.The fragment wrapper is redundant when wrapping a single element.
-<> - <p className="text-sm text-gray-600 dark:text-yellow-200"> - Transfers to any address are already enabled - </p> -</> +<p className="text-sm text-gray-600 dark:text-yellow-200"> + Transfers to any address are already enabled +</p>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
web/src/app/[cat]/InteractionClient.tsx(13 hunks)web/src/app/create/page.tsx(2 hunks)web/src/app/my-cats/page.tsx(2 hunks)web/src/app/page.tsx(1 hunks)web/src/utils/address.ts(1 hunks)web/src/utils/catExplorer.ts(1 hunks)web/src/utils/config.tsx(2 hunks)web/src/utils/explorer.ts(1 hunks)
🔇 Additional comments (8)
web/src/utils/config.tsx (1)
5-5: Verify import & chain support fromwagmi/chains.You’ve imported
baseand added it to thechainsarray to enable Base Mainnet support. Please confirm that:
wagmi/chainsexports abaseconstant corresponding to chain ID 8453.- The
baseobject aligns with the expected network configuration in RainbowKit.Also applies to: 24-24
web/src/utils/address.ts (1)
3-4: Verify new vault factory addresses.You’ve enabled Citrea (5115) and Ethereum Classic (61) and added Polygon (137) and Base Mainnet (8453) entries. Please confirm that each on-chain vault factory is deployed at these addresses. If a factory exists on Base Goerli (84531), consider adding it here too.
Also applies to: 6-7
web/src/app/create/page.tsx (1)
194-226: Good improvement in transaction finality handling!The new implementation properly waits for transaction confirmation before showing the success toast and redirecting. This prevents premature UI updates and ensures the blockchain state is updated before navigation.
web/src/app/my-cats/page.tsx (1)
19-19: Consistent multichain support implementation!The chain ID updates are properly synchronized across the type definition, display names, and validation logic. Good job clarifying "Citrea" as "Citrea Testnet" for better user understanding.
Also applies to: 25-25, 27-27, 41-41
web/src/app/[cat]/InteractionClient.tsx (4)
24-24: Chain ID updates are consistent with other files.The supported chain IDs properly match the updates across the application.
Also applies to: 90-90
83-86: Excellent dialog state management implementation!The controlled dialog states provide better UI control and user experience. The dialogs now properly close after initiating actions, preventing users from accidentally triggering multiple transactions.
Also applies to: 553-553, 607-607, 661-661, 581-584, 635-638, 689-692
275-277: Great transaction feedback improvements!Adding
getTokenDetails()after successful transactions ensures the UI stays synchronized with on-chain state. The consistent pattern of resettingisSigningand clearing input fields improves user experience.Also applies to: 288-290, 301-303, 314-316, 320-342
365-384: Proper signing state management!The removal of
finallyblocks and movingsetIsSigning(false)to the transaction receipt effects ensures the signing state accurately reflects the transaction lifecycle. This prevents premature UI state changes.Also applies to: 386-405, 407-426, 428-446, 448-472, 474-498
Summary by CodeRabbit