Skip to content

Commit

Permalink
feat(scripts): Better determine base token uri depending on network
Browse files Browse the repository at this point in the history
  • Loading branch information
wottpal committed Aug 21, 2023
1 parent eeb781f commit 9df6212
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions scripts/deployAll.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { alephzero, getSubstrateChain } from '@scio-labs/use-inkathon'
import {
alephzero,
alephzeroTestnet,
development,
getSubstrateChain,
} from '@scio-labs/use-inkathon'
import * as dotenv from 'dotenv'
import { deployFeeCalculator } from './deploy/deployFeeCalculator'
import { deployMerkleVerifierWithWhitelist } from './deploy/deployMerkleVerifier'
Expand Down Expand Up @@ -45,9 +50,11 @@ const main = async () => {
const tlds = chain.network === alephzero.network ? ['azero', 'a0'] : ['tzero']
const tld = tlds[0]
const baseUri =
chain.network === alephzero.network
? 'https://azero.id/api/v1/metadata/'
: 'https://tzero.id/api/v1/metadata/'
{
[alephzero.network]: 'https://azero.id/api/v1/metadata/',
[alephzeroTestnet.network]: 'https://tzero.id/api/v1/metadata/',
[development.network]: 'http://localhost:3000/api/v1/metadata/',
}[chain.network] || 'https://tzero.id/api/v1/metadata/'
const registry = await deployRegistry(initParams, {
nameCheckerAddress: nameChecker.address,
feeCalculatorAddress: feeCalculator.address,
Expand Down

0 comments on commit 9df6212

Please sign in to comment.