Skip to content

Commit d40d32a

Browse files
committed
refactor: store initial token lists locally
1 parent 2ca0d2a commit d40d32a

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
@@ -290,20 +290,14 @@ generate: export GO_GENERATE_FAST_DEBUG ?= false
290290
generate: export GO_GENERATE_FAST_RECACHE ?= false
291291
generate: ##@ Run generate for all given packages using go-generate-fast, fallback to `go generate` (e.g. for docker)
292292
@GOROOT=$$(go env GOROOT) $(GO_GENERATE_CMD) $(PACKAGES)
293-
make download-tokens
294293

295294
generate-contracts:
296295
go generate ./contracts
297296

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

308302
analyze-token-stores:
309303
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)