diff --git a/xmtp_id/src/scw_verifier/chain_urls_default.json b/xmtp_id/src/scw_verifier/chain_urls_default.json index 47f07c32b..c3a1edebe 100644 --- a/xmtp_id/src/scw_verifier/chain_urls_default.json +++ b/xmtp_id/src/scw_verifier/chain_urls_default.json @@ -1,9 +1,9 @@ { - "1": "https://eth.llamarpc.com", - "10": "https://rpc.ankr.com/optimism", - "137": "https://polygon.llamarpc.com", - "324": "https://mainnet.era.zksync.io", - "8453": "https://base.llamarpc.com", - "42161": "https://arbitrum.llamarpc.com", - "59144": "https://linea-rpc.publicnode.com" + "eip155:1": "https://eth.llamarpc.com", + "eip155:10": "https://rpc.ankr.com/optimism", + "eip155:137": "https://polygon.llamarpc.com", + "eip155:324": "https://mainnet.era.zksync.io", + "eip155:8453": "https://base.llamarpc.com", + "eip155:42161": "https://arbitrum.llamarpc.com", + "eip155:59144": "https://linea-rpc.publicnode.com" } diff --git a/xmtp_id/src/scw_verifier/mod.rs b/xmtp_id/src/scw_verifier/mod.rs index 002491151..eb7116abc 100644 --- a/xmtp_id/src/scw_verifier/mod.rs +++ b/xmtp_id/src/scw_verifier/mod.rs @@ -117,7 +117,12 @@ impl MultiSmartContractSignatureVerifier { /// Upgrade the default urls to paid/private/alternative urls if the env vars are present. pub fn upgrade(mut self) -> Self { self.verifiers.iter_mut().for_each(|(id, verif)| { - if let Ok(url) = env::var(format!("CHAIN_RPC_{id}")) { + // TODO: coda - update the chain id env var ids to preceeded with "EIP155_" + let eip_id = id + .split(":") + .nth(1) + .expect("All chain ids are preceeded with 'eip155:' for now."); + if let Ok(url) = env::var(format!("CHAIN_RPC_{eip_id}")) { *verif = Box::new(RpcSmartContractWalletVerifier::new(url)); } else { info!("No upgraded chain url for chain {id}, using default.");