Skip to content
This repository was archived by the owner on Dec 26, 2024. It is now read-only.
This repository was archived by the owner on Dec 26, 2024. It is now read-only.

Add snowtrace for avalanche mainnet and testnet (fuji) #115

@peterferguson

Description

@peterferguson

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch etherscan-api@10.2.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/etherscan-api/lib/pick-chain-url.js b/node_modules/etherscan-api/lib/pick-chain-url.js
index 067dcc5..ddb7fa9 100644
--- a/node_modules/etherscan-api/lib/pick-chain-url.js
+++ b/node_modules/etherscan-api/lib/pick-chain-url.js
@@ -5,9 +5,12 @@ const OTHER_API_URL_MAP = {
   rinkeby: 'https://api-rinkeby.etherscan.io',
   homestead: 'https://api.etherscan.io',
   arbitrum: 'https://api.arbiscan.io',
-  arbitrum_rinkeby: 'https://api-testnet.arbiscan.io'
+  arbitrum_rinkeby: 'https://api-testnet.arbiscan.io',
+  avalanche:'https://api.snowtrace.io',
+  avalanche_fuji: 'https://api-testnet.snowtrace.io',
 };
 
+
 /**
  * gets  the correct urls of the backend 
  * @param {string} chain 

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions