Skip to content

Commit ae9bf8a

Browse files
committed
maintenance: switch from Etherscan.io to Shiftcrypto's proxy server.
1 parent 50395e9 commit ae9bf8a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

backend/coins/eth/etherscan/etherscan.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ import (
4747
var CallsPerSec = 3.8
4848

4949
const (
50-
apiKey = "X3AFAGQT2QCAFTFPIH9VJY88H9PIQ2UWP7"
5150
maxAddressesForBalances = 20
5251
)
5352

@@ -65,7 +64,7 @@ type EtherScan struct {
6564
// NewEtherScan creates a new instance of EtherScan.
6665
func NewEtherScan(chainId string, httpClient *http.Client, limiter *rate.Limiter) *EtherScan {
6766
return &EtherScan{
68-
url: "https://api.etherscan.io/v2/api",
67+
url: "https://etherscan-api.shiftcrypto.dev/v2/api",
6968
httpClient: httpClient,
7069
limiter: limiter,
7170
chainId: chainId,
@@ -76,7 +75,6 @@ func (etherScan *EtherScan) call(ctx context.Context, params url.Values, result
7675
if err := etherScan.limiter.Wait(ctx); err != nil {
7776
return errp.WithStack(err)
7877
}
79-
params.Set("apikey", apiKey)
8078
params.Set("chainId", etherScan.chainId)
8179
response, err := etherScan.httpClient.Get(etherScan.url + "?" + params.Encode())
8280
if err != nil {

0 commit comments

Comments
 (0)