Skip to content

Commit

Permalink
enh: optionally use env vars in snapshot tool (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
bard authored Jul 19, 2023
1 parent 785dedf commit a802fc2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions util/snapshot-take.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

set -ue

# This must be within the blocks covered by seed/<chainId>/prices.json
SNAPSHOT_UNTIL_BLOCK=17199975
CHAINS=mainnet
TO_BLOCK=${TO_BLOCK:-17199975}
CHAINS=${CHAINS:-mainnet}

function is_stage_empty() {
git diff-index --quiet --cached HEAD --
Expand Down Expand Up @@ -36,5 +35,5 @@ mkdir -p "$STORAGE_DIR" "$CACHE_DIR"
message "Snapping to $SNAPSHOT_DIR..."

npm run build
npm run start -- --chains "$CHAINS" --to-block "$SNAPSHOT_UNTIL_BLOCK" --run-once
npm run start -- --chains "$CHAINS" --to-block "$TO_BLOCK" --run-once

0 comments on commit a802fc2

Please sign in to comment.