Skip to content

Commit

Permalink
Merge pull request #2 from zkLinkProtocol/goerli
Browse files Browse the repository at this point in the history
Add environment-specific build and development scripts and configurat…
  • Loading branch information
zkLinkLabs authored Feb 22, 2024
2 parents 04e1fe2 + c3d320c commit 18a897e
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
"repository": "https://github.com/matter-labs/block-explorer",
"scripts": {
"dev": "vite",
"dev:sepolia": "VITE_APP_ENVIRONMENT=sepolia vite",
"dev:goerli": "VITE_APP_ENVIRONMENT=goerli vite",
"build": "vue-tsc --noEmit && vite build",
"build:sepolia": "VITE_APP_ENVIRONMENT=sepolia vue-tsc --noEmit && VITE_APP_ENVIRONMENT=sepolia vite build",
"build:goerli": "VITE_APP_ENVIRONMENT=goerli vue-tsc --noEmit && VITE_APP_ENVIRONMENT=goerli vite build",
"start": "vite preview --port 3010",
"test": "TZ=UTC-3 vitest --environment jsdom",
"test:ci": "TZ=UTC-3 vitest --environment jsdom --run --reporter=verbose --reporter=junit --outputFile.junit=./junit.xml",
Expand Down
6 changes: 6 additions & 0 deletions packages/app/public/img/linea.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions packages/app/src/configs/goerli.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"networks": [
{
"apiUrl": "https://goerli.explorer-api.zklink.network",
"verificationApiUrl": "https://goerli.verification.zklink.network",
"bridgeUrl": "https://goerli.portal.zklink.network",
"hostnames": [],
"icon": "/images/icons/cion.png",
"l1ExplorerUrl": "https://goerli.lineascan.build",
"l2ChainId": 810182,
"l2NetworkName": "zkLink Nova Goerli Testnet",
"maintenance": false,
"name": "goerli",
"published": true,
"rpcUrl": "https://goerli.rpc.zklink.network"
}
],
"iconsList":{
"goerli": "/img/ethereum.svg",
"primary":"/img/linea.svg"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@
"primary":"/img/arbitrum-arb-logo.svg",
"zksyncsepolia":"/img/era.svg",
"scrollsepolia":"/img/sepolia.jpg"

}
}
19 changes: 19 additions & 0 deletions packages/data-fetcher/.env.goerli
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
LOG_LEVEL=debug
PORT=3040

BLOCKCHAIN_RPC_URL=https://goerli.rpc.zklink.network

RPC_CALLS_DEFAULT_RETRY_TIMEOUT=30000
RPC_CALLS_QUICK_RETRY_TIMEOUT=500
RPC_CALLS_RETRIES_MAX_TOTAL_TIMEOUT=90000

RPC_CALLS_CONNECTION_TIMEOUT=20000
RPC_CALLS_CONNECTION_QUICK_TIMEOUT=10000

MAX_BLOCKS_BATCH_SIZE=20

BRIDGE_NETWORK_KEYS=primary,goerli
L1_ERC20_BRIDGE_PRIMARY=0x9aCd0f29dae518A548371E8880df9cD488aBE99c
L2_ERC20_BRIDGE_PRIMARY=0x2dbBC031B357332478ac31648779b7Ea7b32A652
L1_ERC20_BRIDGE_GOERLI=0x8c965AAb7450Ea5b99bAb0B39371Db869d1A200D
L2_ERC20_BRIDGE_GOERLI=0x1b6954b93d9b1Cf25D372eE74d0F30C3Cf0345a5
File renamed without changes.
49 changes: 49 additions & 0 deletions packages/worker/.env.goerli
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
LOG_LEVEL=debug
PORT=3001

DATABASE_HOST=localhost
DATABASE_USER=postgres
DATABASE_PASSWORD=123456
DATABASE_NAME=block-explorer
DATABASE_CONNECTION_IDLE_TIMEOUT_MS=12000
DATABASE_CONNECTION_POOL_SIZE=100

BLOCKCHAIN_RPC_URL=https://goerli.rpc.zklink.network
DATA_FETCHER_URL=http://localhost:3040
DATA_FETCHER_REQUEST_TIMEOUT=120000

WAIT_FOR_BLOCKS_INTERVAL=1000
BLOCKS_PROCESSING_BATCH_SIZE=10
NUMBER_OF_BLOCKS_PER_DB_TRANSACTION=10

BATCHES_PROCESSING_POLLING_INTERVAL=60000
DELETE_BALANCES_INTERVAL=300000

RPC_CALLS_DEFAULT_RETRY_TIMEOUT=30000
RPC_CALLS_QUICK_RETRY_TIMEOUT=500
RPC_CALLS_CONNECTION_TIMEOUT=20000
RPC_CALLS_CONNECTION_QUICK_TIMEOUT=10000

COLLECT_DB_CONNECTION_POOL_METRICS_INTERVAL=10000
COLLECT_BLOCKS_TO_PROCESS_METRIC_INTERVAL=10000

DISABLE_BATCHES_PROCESSING=false
DISABLE_COUNTERS_PROCESSING=false
DISABLE_OLD_BALANCES_CLEANER=false
DISABLE_BLOCKS_REVERT=false

ENABLE_TOKEN_OFFCHAIN_DATA_SAVER=false
UPDATE_TOKEN_OFFCHAIN_DATA_INTERVAL=86400000
SELECTED_TOKEN_OFFCHAIN_DATA_PROVIDER=coingecko

FROM_BLOCK=0
TO_BLOCK=

COINGECKO_IS_PRO_PLAN=false
COINGECKO_API_KEY=

BRIDGE_NETWORK_KEYS=primary,goerli
L1_ERC20_BRIDGE_PRIMARY=0x9aCd0f29dae518A548371E8880df9cD488aBE99c
L2_ERC20_BRIDGE_PRIMARY=0x2dbBC031B357332478ac31648779b7Ea7b32A652
L1_ERC20_BRIDGE_GOERLI=0x8c965AAb7450Ea5b99bAb0B39371Db869d1A200D
L2_ERC20_BRIDGE_GOERLI=0x1b6954b93d9b1Cf25D372eE74d0F30C3Cf0345a5
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ BRIDGE_NETWORK_KEYS=primary,sepolia
L1_ERC20_BRIDGE_PRIMARY=0x72de6d167ded1ee5fba17334bdcce686f3204d38
L2_ERC20_BRIDGE_PRIMARY=0x1895de0bea0eb8d8c7e6997c9be7649bb402d9e6
L1_ERC20_BRIDGE_SEPOLIA=0x9FF541E9de225157d245Ca46cFF6868e5c289C8F
L2_ERC20_BRIDGE_SEPOLIA=0x3247575b4336C79956C5Df667A19C0AcBA9C62D6
L2_ERC20_BRIDGE_SEPOLIA=0x3247575b4336C79956C5Df667A19C0AcBA9C62D6

0 comments on commit 18a897e

Please sign in to comment.