Skip to content

Commit

Permalink
fix: ensure ENS address is always present
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmardefago committed Apr 14, 2023
1 parent 32aeaf3 commit 67f0141
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-arbitrum-goerli-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Testnet Subgraph L2 (Arbitrum-Goerli)

on:
push:
branches:
- mainnet-staging
tags:
- v*

jobs:
deploy:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-goerli-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Testnet Subgraph (Goerli)

on:
push:
branches:
- mainnet-staging
tags:
- v*

jobs:
deploy:
Expand Down
3 changes: 3 additions & 0 deletions config/arbitrumAddressScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ const main = (): void => {
let output = JSON.parse(mustache.render(JSON.stringify(addresses), renameAddresses))
output.blockNumber = '42440000' // Hardcoded a few thousand blocks before 1st contract deployed
output.network = 'arbitrum-one'
if(output.ens == '') {
output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config
}
fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2))
} catch (e) {
console.log(`Error saving artifacts: ${e.message}`)
Expand Down
3 changes: 3 additions & 0 deletions config/goerliAddressScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ const main = (): void => {
let output = JSON.parse(mustache.render(JSON.stringify(addresses), renameAddresses))
output.blockNumber = '7210000' // Hardcoded from first contract deploy of the latest phase
output.network = 'goerli'
if(output.ens == '') {
output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config
}
fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2))
} catch (e) {
console.log(`Error saving artifacts: ${e.message}`)
Expand Down
3 changes: 3 additions & 0 deletions config/goerliArbitrumAddressScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ const main = (): void => {
let output = JSON.parse(mustache.render(JSON.stringify(addresses), renameAddresses))
output.blockNumber = '1023264' // Hardcoded from first contract deploy of the latest phase
output.network = 'arbitrum-goerli'
if(output.ens == '') {
output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config
}
fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2))
} catch (e) {
console.log(`Error saving artifacts: ${e.message}`)
Expand Down
3 changes: 3 additions & 0 deletions config/mainnetAddressScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ const main = (): void => {
let output = JSON.parse(mustache.render(JSON.stringify(addresses), renameAddresses))
output.blockNumber = '11440000' // Hardcoded a few thousand blocks before 1st contract deployed
output.network = 'mainnet'
if(output.ens == '') {
output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config
}
fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2))
} catch (e) {
console.log(`Error saving artifacts: ${e.message}`)
Expand Down

0 comments on commit 67f0141

Please sign in to comment.