Skip to content

Commit 3747d92

Browse files
committed
refactor: store initial token lists locally
1 parent 735f8b1 commit 3747d92

File tree

9 files changed

+87
-12
lines changed

9 files changed

+87
-12
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,3 @@ pkg/sentry/SENTRY_PRODUCTION
132132
# Don't ignore generated files in the vendor/ directory
133133
!vendor/**/*.pb.go
134134
!vendor/**/migrations.go
135-
services/wallet/token/local-token-lists/default-lists/status.go
136-
services/wallet/token/local-token-lists/default-lists/coingecko_*.go
137-
services/wallet/token/local-token-lists/default-lists/uniswap.go

Makefile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -323,20 +323,14 @@ generate: export GO_GENERATE_FAST_DEBUG ?= false
323323
generate: export GO_GENERATE_FAST_RECACHE ?= false
324324
generate: ##@ Run generate for all given packages using go-generate-fast, fallback to `go generate` (e.g. for docker)
325325
@GOROOT=$$(go env GOROOT) $(GO_GENERATE_CMD) $(PACKAGES)
326-
make download-tokens
327326

328327
generate-contracts:
329328
go generate ./contracts
330329

331330
download-tokens:
332-
@if [ ! -f services/wallet/token/local-token-lists/default-lists/status.go ] || \
333-
[ ! -f services/wallet/token/local-token-lists/default-lists/uniswap.go ]; then \
334-
echo "Downloading token lists..."; \
335-
GOROOT=$$(go env GOROOT) GOFLAGS="-mod=mod" go run ./services/wallet/token/local-token-lists/default-lists/downloader/main.go; \
336-
echo "token list downloaded successfully"; \
337-
else \
338-
echo "Token lists are already downloaded, skipping download"; \
339-
fi
331+
echo "Downloading token lists..."; \
332+
GOROOT=$$(go env GOROOT) GOFLAGS="-mod=mod" go run ./services/wallet/token/local-token-lists/default-lists/downloader/main.go; \
333+
echo "token list downloaded successfully"; \
340334

341335
analyze-token-stores:
342336
go run ./services/wallet/token/local-token-lists/analyzer/main.go

services/wallet/token/local-token-lists/default-lists/coingecko_arbitrum.go

Lines changed: 12 additions & 0 deletions
Large diffs are not rendered by default.

services/wallet/token/local-token-lists/default-lists/coingecko_base.go

Lines changed: 12 additions & 0 deletions
Large diffs are not rendered by default.

services/wallet/token/local-token-lists/default-lists/coingecko_bsc.go

Lines changed: 12 additions & 0 deletions
Large diffs are not rendered by default.

services/wallet/token/local-token-lists/default-lists/coingecko_ethereum.go

Lines changed: 12 additions & 0 deletions
Large diffs are not rendered by default.

services/wallet/token/local-token-lists/default-lists/coingecko_optimism.go

Lines changed: 12 additions & 0 deletions
Large diffs are not rendered by default.

services/wallet/token/local-token-lists/default-lists/status.go

Lines changed: 12 additions & 0 deletions
Large diffs are not rendered by default.

services/wallet/token/local-token-lists/default-lists/uniswap.go

Lines changed: 12 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)