Skip to content

Commit 3289040

Browse files
authored
Enable Mayan Monad support (#808)
1 parent 85210e3 commit 3289040

File tree

6 files changed

+26
-2
lines changed

6 files changed

+26
-2
lines changed

crates/gem_evm/src/uniswap/path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ pub fn get_base_pair(chain: &EVMChain, weth_as_native: bool) -> Option<BasePair>
144144
EVMChain::OpBNB => "0x9e5AAC1Ba1a2e6aEd6b32689DFcF62A509Ca96f3",
145145
EVMChain::Ink => "0x0200C29006150606B650577BBE7B6248F58470c1",
146146
EVMChain::Plasma => "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb", // USDT0
147-
EVMChain::Monad => "0x754704Bc059F8C67012fEd69BC8A327a5aafb603", // USDT0
147+
EVMChain::Monad => "0xe7cd86e13AC4309349F30B3435a9d337750fC82D", // USDT0
148148
EVMChain::Blast | EVMChain::World => "", // None
149149
_ => panic!("USDT is not configured for this chain"),
150150
};

crates/primitives/src/asset_constants.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ pub const USDC_SOLANA_ASSET_ID: &str = "solana_EPjFWdd5AufqSSqeM2qN1xzybapC8G4wE
4545
pub const USDC_NEAR_ASSET_ID: &str = "near_17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1";
4646
pub const USDC_UNICHAIN_ASSET_ID: &str = "unichain_0x078D782b760474a361dDA0AF3839290b0EF57AD6";
4747
pub const USDC_HYPEREVM_ASSET_ID: &str = "hyperliquid_0xb88339CB7199b77E23DB6E890353E22632Ba630f";
48+
pub const USDC_MONAD_ASSET_ID: &str = "monad_0x754704Bc059F8C67012fEd69BC8A327a5aafb603";
4849

4950
pub const USDC_SMARTCHAIN_ASSET_ID: &str = "smartchain_0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d";
5051
pub const USDC_AVAX_ASSET_ID: &str = "avalanchec_0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E";
@@ -75,6 +76,7 @@ pub const USDT_NEAR_ASSET_ID: &str = "near_usdt.tether-token.near";
7576
pub const USDT_INK_ASSET_ID: &str = "ink_0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96"; // USDT0
7677
pub const USDT_HYPEREVM_ASSET_ID: &str = "hyperliquid_0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb"; // USDT0
7778
pub const USDT_PLASMA_ASSET_ID: &str = "plasma_0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb";
79+
pub const USDT_MONAD_ASSET_ID: &str = "monad_0xe7cd86e13AC4309349F30B3435a9d337750fC82D";
7880

7981
// WBTC
8082
pub const WBTC_ARB_ASSET_ID: &str = "arbitrum_0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f";

crates/swapper/src/asset.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,26 @@ pub static UNICHAIN_USDC: LazyLock<Asset> =
261261
LazyLock::new(|| Asset::new(USDC_UNICHAIN_ASSET_ID.into(), USDC_NAME.to_owned(), USDC_SYMBOL.to_owned(), 6, AssetType::ERC20));
262262
pub static UNICHAIN_DAI: LazyLock<Asset> =
263263
LazyLock::new(|| Asset::new(DAI_UNICHAIN_ASSET_ID.into(), DAI_NAME.to_owned(), DAI_SYMBOL.to_owned(), 18, AssetType::ERC20));
264+
// Monad
265+
pub static MONAD_MON: LazyLock<Asset> = LazyLock::new(|| Asset::from_chain(Chain::Monad));
266+
pub static MONAD_USDC: LazyLock<Asset> = LazyLock::new(|| {
267+
Asset::new(
268+
USDC_MONAD_ASSET_ID.into(),
269+
USDC_NAME.to_owned(),
270+
USDC_SYMBOL.to_owned(),
271+
6,
272+
AssetType::ERC20,
273+
)
274+
});
275+
pub static MONAD_USDT: LazyLock<Asset> = LazyLock::new(|| {
276+
Asset::new(
277+
USDT_MONAD_ASSET_ID.into(),
278+
USDT_NAME.to_owned(),
279+
USDT_SYMBOL.to_owned(),
280+
6,
281+
AssetType::ERC20,
282+
)
283+
});
264284
// HyperCore
265285
pub static HYPERCORE_HYPE: LazyLock<Asset> = LazyLock::new(|| Asset::from_chain(Chain::HyperCore));
266286
pub static HYPERCORE_SPOT_HYPE: LazyLock<Asset> = LazyLock::new(|| {

crates/swapper/src/proxy/mayan/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pub fn wormhole_chain_id_to_chain(chain_id: u16) -> Option<Chain> {
2828
44 => Some(Chain::Unichain),
2929
45 => Some(Chain::World),
3030
47 => Some(Chain::Hyperliquid),
31+
48 => Some(Chain::Monad),
3132
58 => Some(Chain::Plasma),
3233
65000 => Some(Chain::HyperCore),
3334
_ => None,

crates/swapper/src/proxy/provider.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ impl ProxyProvider<RpcClient> {
155155
SwapperChainAsset::Assets(Chain::Optimism, vec![OPTIMISM_USDC.id.clone(), OPTIMISM_USDT.id.clone()]),
156156
SwapperChainAsset::Assets(Chain::Linea, vec![LINEA_USDC.id.clone(), LINEA_USDT.id.clone()]),
157157
SwapperChainAsset::Assets(Chain::Unichain, vec![UNICHAIN_USDC.id.clone(), UNICHAIN_DAI.id.clone()]),
158+
SwapperChainAsset::Assets(Chain::Monad, vec![MONAD_MON.id.clone(), MONAD_USDC.id.clone(), MONAD_USDT.id.clone()]),
158159
SwapperChainAsset::Assets(Chain::Hyperliquid, vec![HYPEREVM_USDT.id.clone(), HYPEREVM_USDC.id.clone()]),
159160
];
160161

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ install-rust:
2020

2121
install-typeshare:
2222
@echo Install typeshare-cli
23-
cargo install typeshare-cli@1.13.2
23+
cargo install typeshare-cli@1.13.3
2424

2525
install-postgres:
2626
brew install libpq postgresql@15

0 commit comments

Comments
 (0)