Skip to content

Commit 67f0141

Browse files
committed
fix: ensure ENS address is always present
1 parent 32aeaf3 commit 67f0141

File tree

6 files changed

+16
-4
lines changed

6 files changed

+16
-4
lines changed

.github/workflows/deploy-arbitrum-goerli-subgraph.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Testnet Subgraph L2 (Arbitrum-Goerli)
22

33
on:
44
push:
5-
branches:
6-
- mainnet-staging
5+
tags:
6+
- v*
77

88
jobs:
99
deploy:

.github/workflows/deploy-goerli-subgraph.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Testnet Subgraph (Goerli)
22

33
on:
44
push:
5-
branches:
6-
- mainnet-staging
5+
tags:
6+
- v*
77

88
jobs:
99
deploy:

config/arbitrumAddressScript.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ const main = (): void => {
2929
let output = JSON.parse(mustache.render(JSON.stringify(addresses), renameAddresses))
3030
output.blockNumber = '42440000' // Hardcoded a few thousand blocks before 1st contract deployed
3131
output.network = 'arbitrum-one'
32+
if(output.ens == '') {
33+
output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config
34+
}
3235
fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2))
3336
} catch (e) {
3437
console.log(`Error saving artifacts: ${e.message}`)

config/goerliAddressScript.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ const main = (): void => {
2929
let output = JSON.parse(mustache.render(JSON.stringify(addresses), renameAddresses))
3030
output.blockNumber = '7210000' // Hardcoded from first contract deploy of the latest phase
3131
output.network = 'goerli'
32+
if(output.ens == '') {
33+
output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config
34+
}
3235
fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2))
3336
} catch (e) {
3437
console.log(`Error saving artifacts: ${e.message}`)

config/goerliArbitrumAddressScript.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ const main = (): void => {
2929
let output = JSON.parse(mustache.render(JSON.stringify(addresses), renameAddresses))
3030
output.blockNumber = '1023264' // Hardcoded from first contract deploy of the latest phase
3131
output.network = 'arbitrum-goerli'
32+
if(output.ens == '') {
33+
output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config
34+
}
3235
fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2))
3336
} catch (e) {
3437
console.log(`Error saving artifacts: ${e.message}`)

config/mainnetAddressScript.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ const main = (): void => {
2929
let output = JSON.parse(mustache.render(JSON.stringify(addresses), renameAddresses))
3030
output.blockNumber = '11440000' // Hardcoded a few thousand blocks before 1st contract deployed
3131
output.network = 'mainnet'
32+
if(output.ens == '') {
33+
output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config
34+
}
3235
fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2))
3336
} catch (e) {
3437
console.log(`Error saving artifacts: ${e.message}`)

0 commit comments

Comments
 (0)