Skip to content

Commit

Permalink
more minor config updates
Browse files Browse the repository at this point in the history
  • Loading branch information
b-pmcg committed Nov 4, 2022
1 parent 32386e3 commit b13b998
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 16 deletions.
53 changes: 44 additions & 9 deletions .env
Original file line number Diff line number Diff line change
@@ -1,13 +1,47 @@
### DOCKER USAGE
### PROD USAGE
VL_DB_DATABASE=database
VL_DB_USER=user
VL_DB_PASSWORD=password
VL_DB_HOST=host.docker.internal
VL_DB_PORT=5432
VL_CHAIN_HOST=http://host.docker.internal:8545
VL_CHAIN_HOST_L2=http://host.docker.internal:8546
VL_CONFIG_NAME=docker_config
VL_LOGGING_LEVEL=3
VL_DB_HOST=localhost
VL_DB_PORT=5433
VL_CHAIN_HOST=https://eth-mainnet.g.alchemy.com/v2/<PROD KEY>
VL_CHAIN_HOST_L2=https://arb-mainnet.g.alchemy.com/v2/<PROD KEY>
VL_CONFIG_NAME=multi

### STAGING USAGE
# VL_DB_DATABASE=database
# VL_DB_USER=user
# VL_DB_PASSWORD=password
# VL_DB_HOST=localhost
# VL_DB_PORT=5433
# VL_CHAIN_HOST=https://eth-mainnet.g.alchemy.com/v2/<STAGING KEY>
# VL_CHAIN_HOST_L2=https://arb-mainnet.g.alchemy.com/v2/<STAGING KEY>
# VL_CONFIG_NAME=multi

### GOERLI USAGE
# VL_DB_DATABASE=database
# VL_DB_USER=user
# VL_DB_PASSWORD=password
# VL_DB_HOST=localhost
# VL_DB_PORT=5433
# VL_CHAIN_HOST=https://eth-goerli.alchemyapi.io/v2/<GOERLI KEY>
# VL_CHAIN_HOST_L2=https://arb-goerli.g.alchemy.com/v2/<GOERLI KEY>
# VL_CONFIG_NAME=multi_goerli
# VL_LOGGING_LEVEL=3
# STARTING_BLOCK_GOERLI=5273000

### DOCKER USAGE
# VL_DB_DATABASE=database
# VL_DB_USER=user
# VL_DB_PASSWORD=password
# VL_DB_HOST=host.docker.internal
# VL_DB_PORT=5432
# VL_CHAIN_HOST=http://host.docker.internal:8545
# VL_CHAIN_HOST_L2=http://host.docker.internal:8546
# VL_CONFIG_NAME=docker_config
# VL_LOGGING_LEVEL=3
# STARTING_BLOCK_GOERLI=7810463
# STARTING_BLOCK_ARB_TESTNET=793614


### LOCAL USAGE
Expand All @@ -20,6 +54,7 @@ VL_LOGGING_LEVEL=3
# VL_CHAIN_HOST_L2=http://localhost:8546
# VL_CONFIG_NAME=docker_config
# VL_LOGGING_LEVEL=3
# STARTING_BLOCK_GOERLI=7810463
# STARTING_BLOCK_ARB_TESTNET=793614


STARTING_BLOCK_GOERLI=7810463
STARTING_BLOCK_ARB_TESTNET=793614
7 changes: 3 additions & 4 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const goerli = {
host: CHAIN_HOST_L1,
retries: 15,
},
startingBlock: STARTING_BLOCK_GOERLI,
startingBlock: 5273000,
extractors: [
...makeRawLogExtractors([
BATCH_VOTING_CONTRACT_GOERLI_ADDRESS,
Expand Down Expand Up @@ -204,10 +204,9 @@ const arbitrumTestnet = {
host: CHAIN_HOST_L2,
retries: 15,
},
startingBlock: STARTING_BLOCK_ARB_TESTNET,
startingBlock: 154800,
extractors: [...makeRawLogExtractors([ARB_TESTNET_POLLING_ADDRESS])],
transformers: [arbitrumPollingTransformer(ARB_TESTNET_POLLING_ADDRESS)],
// TODO: I think don't need to run the migrations a second time, remove this:
migrations: {
mkr: './migrations',
},
Expand Down Expand Up @@ -261,7 +260,7 @@ const dockerConfig = [
}
},
},
arbitrumTestnet,
{ ...arbitrumTestnet, startingBlock: STARTING_BLOCK_ARB_TESTNET },
];

let config;
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ services:
- POSTGRES_PORT=5432
- POSTGRES_DB=database
ports:
- '5432:5432'
- '5433:5432'
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"start-etl": "node -r ./loadenv.js ./node_modules/@makerdao-dux/spock-etl/dist/bin/etl ./config.js",
"start-sync": "yarn migrate",
"migrate": "node -r ./loadenv.js ./node_modules/@makerdao-dux/spock-etl/dist/bin/migrate ./config.js",
"start-api": "node -r ./loadenv.js ./node_modules/@makerdao-dux/spock-graphql-api/dist/index.js ./config.js &",
"start-all": "yarn migrate && yarn start-api && yarn start-etl",
"start-api": "node -r ./loadenv.js ./node_modules/@makerdao-dux/spock-graphql-api/dist/index.js ./config.js",
"start-all": "yarn migrate && yarn start-api & yarn start-etl",
"test": "jest",
"test:ci": "./tests/run-tests.sh",
"repl": "node --experimental-repl-await -r ./loadenv.js ./repl"
Expand Down

0 comments on commit b13b998

Please sign in to comment.