Skip to content

Commit 90a1e83

Browse files
committed
feat: add deployment ID support for DataProtectorSharing contract deployment
1 parent 34f9f39 commit 90a1e83

File tree

1 file changed

+8
-0
lines changed
  • packages/sharing-smart-contract/scripts

1 file changed

+8
-0
lines changed

packages/sharing-smart-contract/scripts/deploy.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ import DataProtectorSharingModule from '../ignition/modules/DataProtectorSharing
44

55
const { ethers, upgrades } = hre;
66

7+
// Parse command line arguments
8+
const args = process.argv.slice(2);
9+
const deploymentIdIndex = args.indexOf('--deployment-id');
10+
const deploymentId = deploymentIdIndex !== -1 && deploymentIdIndex + 1 < args.length
11+
? args[deploymentIdIndex + 1]
12+
: undefined;
13+
714
/**
815
* This script deploys DataProtectorSharing contract and its dependencies using
916
* Hardhat Ignition and createX factory if supported.
@@ -36,6 +43,7 @@ async function main() {
3643
strategyConfig: hre.userConfig.ignition.strategyConfig.create2,
3744
}),
3845
displayUi: true, // for logs.
46+
...(deploymentId && { deploymentId }),
3947
},
4048
);
4149
// Import proxies in OZ `upgrades` plugin for future upgrades.

0 commit comments

Comments
 (0)