Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions backend/coins/eth/etherscan/etherscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import (
var CallsPerSec = 3.8

const (
apiKey = "X3AFAGQT2QCAFTFPIH9VJY88H9PIQ2UWP7"
maxAddressesForBalances = 20
)

Expand All @@ -65,7 +64,7 @@ type EtherScan struct {
// NewEtherScan creates a new instance of EtherScan.
func NewEtherScan(chainId string, httpClient *http.Client, limiter *rate.Limiter) *EtherScan {
return &EtherScan{
url: "https://api.etherscan.io/v2/api",
url: "https://etherscan-api.shiftcrypto.dev/v2/api",
httpClient: httpClient,
limiter: limiter,
chainId: chainId,
Expand All @@ -76,7 +75,6 @@ func (etherScan *EtherScan) call(ctx context.Context, params url.Values, result
if err := etherScan.limiter.Wait(ctx); err != nil {
return errp.WithStack(err)
}
params.Set("apikey", apiKey)
params.Set("chainId", etherScan.chainId)
response, err := etherScan.httpClient.Get(etherScan.url + "?" + params.Encode())
if err != nil {
Expand Down