diff --git a/.env.example b/.env.example index 25207a2..0ea0f02 100755 --- a/.env.example +++ b/.env.example @@ -1,9 +1,9 @@ -AVAIL_CLIENT_URL=https://couscous-devnet.avail.tools/api +AVAIL_CLIENT_URL=https://rpc-hex-devnet.avail.tools/api SUCCINCT_URL=https://beaconapi.succinct.xyz/api/integrations/vectorx -AVAIL_CHAIN_NAME=couscous +AVAIL_CHAIN_NAME=hex CONTRACT_CHAIN_ID=11155111 -VECTORX_CONTRACT_ADDRESS=0xD528DdCd659D380DFDe96c8fa3e03BaAa03cb51A -BRIDGE_CONTRACT_ADDRESS=0x75545225C83B985f3A517bF61f316266057bb13b +VECTORX_CONTRACT_ADDRESS=0xbc281367e1F2dB1c3e92255AA2F040B1c642ec75 +BRIDGE_CONTRACT_ADDRESS=0x1369a4c9391cf90d393b40faead521b0f7019dc5 ETHEREUM_CLIENT_URL=https://ethereum-sepolia.publicnode.com BEACONCHAIN_URL=https://sepolia.beaconcha.in/api/v1/slot HOST=0.0.0.0 diff --git a/src/main.rs b/src/main.rs index d37f200..86bc075 100755 --- a/src/main.rs +++ b/src/main.rs @@ -339,11 +339,19 @@ async fn get_avl_proof( ), Err(err) => { tracing::error!("❌ Cannot get account and storage proofs: {:?}", err); - ( - StatusCode::INTERNAL_SERVER_ERROR, - [("Cache-Control", "max-age=300, must-revalidate")], - Json(json!({ "error": err.to_string()})), - ) + if err.to_string().ends_with("status code: 429") { + ( + StatusCode::TOO_MANY_REQUESTS, + [("Cache-Control", "max-age=300, must-revalidate")], + Json(json!({ "error": err.to_string()})), + ) + } else { + ( + StatusCode::INTERNAL_SERVER_ERROR, + [("Cache-Control", "max-age=300, must-revalidate")], + Json(json!({ "error": err.to_string()})), + ) + } } } }