Skip to content

Commit 7bc3e08

Browse files
committed
refactor: store initial token lists locally
1 parent ba794d6 commit 7bc3e08

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
@@ -131,6 +131,3 @@ pkg/sentry/SENTRY_PRODUCTION
131131
# Don't ignore generated files in the vendor/ directory
132132
!vendor/**/*.pb.go
133133
!vendor/**/migrations.go
134-
services/wallet/token/local-token-lists/default-lists/status.go
135-
services/wallet/token/local-token-lists/default-lists/coingecko_*.go
136-
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
@@ -292,20 +292,14 @@ generate: export GO_GENERATE_FAST_DEBUG ?= false
292292
generate: export GO_GENERATE_FAST_RECACHE ?= false
293293
generate: ##@ Run generate for all given packages using go-generate-fast, fallback to `go generate` (e.g. for docker)
294294
@GOROOT=$$(go env GOROOT) $(GO_GENERATE_CMD) $(PACKAGES)
295-
make download-tokens
296295

297296
generate-contracts:
298297
go generate ./contracts
299298

300299
download-tokens:
301-
@if [ ! -f services/wallet/token/local-token-lists/default-lists/status.go ] || \
302-
[ ! -f services/wallet/token/local-token-lists/default-lists/uniswap.go ]; then \
303-
echo "Downloading token lists..."; \
304-
GOROOT=$$(go env GOROOT) GOFLAGS="-mod=mod" go run ./services/wallet/token/local-token-lists/default-lists/downloader/main.go; \
305-
echo "token list downloaded successfully"; \
306-
else \
307-
echo "Token lists are already downloaded, skipping download"; \
308-
fi
300+
echo "Downloading token lists..."; \
301+
GOROOT=$$(go env GOROOT) GOFLAGS="-mod=mod" go run ./services/wallet/token/local-token-lists/default-lists/downloader/main.go; \
302+
echo "token list downloaded successfully"; \
309303

310304
analyze-token-stores:
311305
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)