Skip to content

Commit

Permalink
fix: make sure ENS record always exist
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmardefago committed Apr 11, 2023
1 parent 3b9c150 commit 02f13da
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/arbitrumGoerliAddressScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ const main = (): void => {
output.bridgeBlockNumber = '1023272' // Bridge deployment block on L2
output.network = 'arbitrum-goerli'
output.useTokenLockManager = false
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 @@ -39,6 +39,9 @@ const main = (): void => {
output.network = 'goerli'
output.tokenLockManager = '0x9a7a54e86560f4304d8862Ea00F45D1090c59ac8' // we don't have one, this is rinkebys'
output.useTokenLockManager = true
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 @@ -39,6 +39,9 @@ const main = (): void => {
output.bridgeBlockNumber = '16083315' // Bridge deployment block on L1
output.tokenLockManager = '0xFCf78AC094288D7200cfdB367A8CD07108dFa128'
output.useTokenLockManager = true
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/mainnetArbitrumAddressScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ const main = (): void => {
if(output.ethereumDIDRegistry == '') {
output.ethereumDIDRegistry = '0xdCa7EF03e98e0DC2B855bE647C39ABe984fcF21B' // since the package doens't have it yet
}
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 02f13da

Please sign in to comment.