Skip to content

Commit

Permalink
feat: migrate all other L2s tenderly sim from API to node
Browse files Browse the repository at this point in the history
  • Loading branch information
jsy1218 committed Dec 10, 2024
1 parent cd071ee commit 1466e34
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/providers/tenderly-simulation-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,18 @@ const TENDERLY_NODE_API = (chainId: ChainId, tenderlyNodeApiKey: string) => {
return `https://mainnet.gateway.tenderly.co/${tenderlyNodeApiKey}`;
case ChainId.BASE:
return `https://base.gateway.tenderly.co/${tenderlyNodeApiKey}`;
case ChainId.ARBITRUM_ONE:
return `https://arbitrum-one.gateway.tenderly.co/${tenderlyNodeApiKey}`;
case ChainId.OPTIMISM:
return `https://optimism.gateway.tenderly.co/${tenderlyNodeApiKey}`;
case ChainId.POLYGON:
return `https://polygon.gateway.tenderly.co/${tenderlyNodeApiKey}`;
case ChainId.AVALANCHE:
return `https://avalanche.gateway.tenderly.co/${tenderlyNodeApiKey}`;
case ChainId.BLAST:
return `https://blast.gateway.tenderly.co/${tenderlyNodeApiKey}`;
case ChainId.WORLDCHAIN:
return `https://worldchain-mainnet.gateway.tenderly.co/${tenderlyNodeApiKey}`;
default:
throw new Error(
`ChainId ${chainId} does not correspond to a tenderly node endpoint`
Expand All @@ -151,6 +163,9 @@ export const TENDERLY_NOT_SUPPORTED_CHAINS = [
ChainId.CELO,
ChainId.CELO_ALFAJORES,
ChainId.ZKSYNC,
// tenderly node RPC supports BNB and ZORA upon request, we will make them available
ChainId.BNB,
ChainId.ZORA,
];

// We multiply tenderly gas limit by this to overestimate gas limit
Expand Down

0 comments on commit 1466e34

Please sign in to comment.