Add Rootstock (EVM compatible bitcoin sidechain)#961
Add Rootstock (EVM compatible bitcoin sidechain)#961ahsan-javaiid wants to merge 6 commits intogemwalletcom:mainfrom
Rootstock (EVM compatible bitcoin sidechain)#961Conversation
Changed Files
|
Summary of ChangesHello @ahsan-javaiid, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request comprehensively integrates the Rootstock (RSK) blockchain into the gem wallet core library. This foundational work establishes all necessary configurations, including RPC endpoints, block explorers, native asset definitions, and mappings for various EVM-compatible services like Uniswap and Coingecko. The integration aims to enable full support for Rootstock within gemwallet mobile applications, allowing users to interact with this Bitcoin Layer 2 network. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds support for the Rootstock chain, an EVM-compatible Bitcoin sidechain. The changes are comprehensive, touching upon configuration, chain primitives, explorers, and integrations with services like CoinGecko and Uniswap. The implementation is mostly solid, but I have identified a few areas for improvement related to code consistency, maintainability, and a potential configuration issue with swap support. My review includes suggestions to address these points, such as correcting asset naming, ensuring consistent use of checksummed addresses, and refactoring for better code reuse.
| }), | ||
| Chain::Rootstock => Some(V3Deployment { | ||
| quoter_v2: "0xb51727c996c68e60f598a923a5006853cd2feb31", | ||
| permit2: "0xfcf5986450e4a014ffe7ad4ae24921b589d039b5", |
There was a problem hiding this comment.
For consistency and better maintainability, you should use the permit2 variable derived from get_uniswap_permit2_by_chain(chain)? at the beginning of the function, instead of hardcoding the address again. This avoids duplicating the address and ensures that if it changes, it only needs to be updated in one place.
| permit2: "0xfcf5986450e4a014ffe7ad4ae24921b589d039b5", | |
| permit2, |
| EVMChain::Plasma => "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb", // USDT0 | ||
| EVMChain::Monad => "0xe7cd86e13AC4309349F30B3435a9d337750fC82D", // USDT0 | ||
| EVMChain::Stable => "0x779Ded0c9e1022225f8E0630b35a9b54bE713736", // USDT0 | ||
| EVMChain::Rootstock => "0x779ded0c9e1022225f8e0630b35a9b54be713736", // USDT0 |
There was a problem hiding this comment.
For consistency with other addresses in this file and to prevent potential errors, it's best to use the checksummed version of the address. The address for the Stable chain is checksummed, so the one for Rootstock should be as well.
| EVMChain::Rootstock => "0x779ded0c9e1022225f8e0630b35a9b54be713736", // USDT0 | |
| EVMChain::Rootstock => "0x779Ded0c9e1022225f8E0630b35a9b54bE713736", // USDT0 |
d4f586f to
cb88d5a
Compare
| Chain::Monad => "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", | ||
| Chain::XLayer => "d6f83dfeaff95d596ddec26af2ee32f391c206a183b161b7980821860eeef2f5", | ||
| Chain::Stable => "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b", | ||
| Chain::Rootstock => "", // pyth not supported yet |
There was a problem hiding this comment.
can we use BTC as pyth price provider?
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Description
This PR adds Rootstock chain (evm compatible bitcoin sidechain) to gem wallet core library.
Rootstock is the leading Bitcoin Layer 2 (Bitcoin sidechain) network with strong DeFi traction, fully EVM compatible with security of bitcoin (with BTC hash rate ~85%) supported by the leading developer tools; oracles, indexers, Rootstock is the most advanced and complete infrastructure for building on Bitcoin.
About Rootstock
Website: https://rootstock.io/
Defillama: https://defillama.com/chain/Rootstock
Explorer: https://explorer.rootstock.io/
Developer portal: https://dev.rootstock.io/
Need this PR to be included in core library so that support for Rootstock in gemwallet mobile apps could be added. Please review this pull request and feel free to let me know/comment if there any changes required.