Skip to content

Commit

Permalink
feat(scripts): Add NEW_CONFIG deploy param to set updated fee & reg…
Browse files Browse the repository at this point in the history
…istration period
  • Loading branch information
wottpal committed Jul 25, 2024
1 parent 159b91c commit ade83a8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { writeContractAddresses } from './utils/writeContractAddresses'
* - `CHAIN`: Chain ID (optional, defaults to `development`)
* - `ADMIN`: Address of contract admin (optional, defaults to caller)
* - `RESERVATIONS`: Path to .csv file with reserved names & addresses
* - `NEW_CONFIG`: If set, use new default price (10 AZERO) & max registration duration (200 years)
*
* Example usage:
* - `CHAIN=alephzero-testnet ADMIN=5fei… RESERVATIONS=reserved-names.csv pnpm run deploy`
Expand All @@ -27,8 +28,15 @@ const main = async () => {
const chainId = initParams.chain.network

// Deploy all contracts
const useNewConfig = ['true', true, '1', 1].includes(process.env.NEW_CONFIG || '')
const feeCalculator = await deployFeeCalculator(
initParams,
useNewConfig && {
maxRegistrationDuration: 200,
commonPrice: initParams.toBNWithDecimals(10),
},
)
const nameChecker = await deployNameChecker(initParams)
const feeCalculator = await deployFeeCalculator(initParams)
const tlds = chainId === alephzero.network ? ['azero', 'a0'] : ['tzero']
const tld = tlds[0]
const baseUri =
Expand Down

0 comments on commit ade83a8

Please sign in to comment.