Skip to content

Commit

Permalink
chore: vanity2gen: read constructorArgs from file if not specified on…
Browse files Browse the repository at this point in the history
… CLI
  • Loading branch information
guidiaz committed Oct 21, 2024
1 parent 90e1eab commit 7b40891
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/vanity2gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const fs = require("fs")
const utils = require("../src/utils")

const addresses = require("../migrations/addresses")
const constructorArgs = require("../migrations/constructorArgs.json")

module.exports = async function () {
let artifact
Expand Down Expand Up @@ -46,6 +47,9 @@ module.exports = async function () {
})
try {
from = from || addresses[network]?.WitnetDeployer || addresses.default.WitnetDeployer
if (hexArgs === "" && artifact !== "") {
hextArgs = constructorArgs[network][artifact]
}
} catch {
console.error(`WitnetDeployer must have been previously deployed on network '${network}'.\n`)
console.info("Usage:\n")
Expand Down

0 comments on commit 7b40891

Please sign in to comment.