-
Notifications
You must be signed in to change notification settings - Fork 42
Add Rootstock (EVM compatible bitcoin sidechain)
#961
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
base: main
Are you sure you want to change the base?
Changes from all commits
cb88d5a
c682bde
f7ca3a1
3dd67bd
a1dc395
1207ff2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -92,6 +92,7 @@ pub fn get_base_pair(chain: &EVMChain, weth_as_native: bool) -> Option<BasePair> | |||||
| EVMChain::World => "0x03C7054BCB39f7b2e5B2c7AcB37583e32D70Cfa3", | ||||||
| EVMChain::Sonic => "0x0555E30da8f98308EdB960aa94C0Db47230d2B9c", | ||||||
| EVMChain::Linea => "0x3aAB2285ddcDdaD8edf438C1bAB47e1a9D05a9b4", | ||||||
| EVMChain::Rootstock => "0x542fda317318ebf1d3deaf76e0b632741a7e677d", // wrbtc | ||||||
| _ => "", // None | ||||||
| }; | ||||||
|
|
||||||
|
|
@@ -118,6 +119,7 @@ pub fn get_base_pair(chain: &EVMChain, weth_as_native: bool) -> Option<BasePair> | |||||
| EVMChain::Monad => "0x754704Bc059F8C67012fEd69BC8A327a5aafb603", | ||||||
| EVMChain::OpBNB | EVMChain::Plasma => "", | ||||||
| EVMChain::Stable => "0x8a2b28364102bea189d99a475c494330ef2bdd0b", // USDC.e (Stargate) | ||||||
| EVMChain::Rootstock => "0x74c9f2b00581f1b11aa7ff05aa9f608b7389de67", // USDC.e (Stargate) | ||||||
| _ => panic!("USDC is not configured for this chain"), | ||||||
| }; | ||||||
|
|
||||||
|
|
@@ -143,6 +145,7 @@ pub fn get_base_pair(chain: &EVMChain, weth_as_native: bool) -> Option<BasePair> | |||||
| EVMChain::Plasma => "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb", // USDT0 | ||||||
| EVMChain::Monad => "0xe7cd86e13AC4309349F30B3435a9d337750fC82D", // USDT0 | ||||||
| EVMChain::Stable => "0x779Ded0c9e1022225f8E0630b35a9b54bE713736", // USDT0 | ||||||
| EVMChain::Rootstock => "0x779ded0c9e1022225f8e0630b35a9b54be713736", // USDT0 | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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
Suggested change
|
||||||
| EVMChain::Blast | EVMChain::World => "", // None | ||||||
| _ => panic!("USDT is not configured for this chain"), | ||||||
| }; | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,5 +60,6 @@ pub fn price_feed_id_for_chain(chain: Chain) -> &'static str { | |
| Chain::Monad => "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", | ||
| Chain::XLayer => "d6f83dfeaff95d596ddec26af2ee32f391c206a183b161b7980821860eeef2f5", | ||
| Chain::Stable => "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b", | ||
| Chain::Rootstock => "", // pyth not supported yet | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we use BTC as pyth price provider? |
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,6 +63,7 @@ pub enum Chain { | |
| Monad, | ||
| XLayer, | ||
| Stable, | ||
| Rootstock, | ||
| } | ||
|
|
||
| impl fmt::Display for Chain { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,7 @@ pub enum EVMChain { | |
| Monad, | ||
| XLayer, | ||
| Stable, | ||
| Rootstock, | ||
| } | ||
|
|
||
| impl EVMChain { | ||
|
|
||
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.
For consistency and better maintainability, you should use the
permit2variable derived fromget_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.