-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/sui-gmp
- Loading branch information
Showing
16 changed files
with
91 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,48 @@ | ||
const { Option } = require('commander'); | ||
const { addBaseOptions, ...exportedCliUtils } = require('../common/cli-utils'); | ||
|
||
const addEvmOptions = (program, options = {}) => { | ||
addBaseOptions(program, options); | ||
|
||
program.addOption(new Option('-v, --verify', 'verify the deployed contract on the explorer').env('VERIFY')); | ||
|
||
if (options.artifactPath) { | ||
program.addOption(new Option('--artifactPath <artifactPath>', 'artifact path')); | ||
} | ||
|
||
if (options.contractName) { | ||
program.addOption(new Option('-c, --contractName <contractName>', 'contract name').makeOptionMandatory(true)); | ||
} | ||
|
||
if (options.deployMethod) { | ||
program.addOption( | ||
new Option('-m, --deployMethod <deployMethod>', 'deployment method') | ||
.choices(['create', 'create2', 'create3']) | ||
.default(options.deployMethod), | ||
); | ||
} | ||
|
||
if (options.salt) { | ||
program.addOption(new Option('-s, --salt <salt>', 'salt to use for create2 deployment').env('SALT')); | ||
} | ||
|
||
if (options.skipExisting) { | ||
program.addOption(new Option('-x, --skipExisting', 'skip existing if contract was already deployed on chain').env('SKIP_EXISTING')); | ||
} | ||
|
||
if (options.upgrade) { | ||
program.addOption(new Option('-u, --upgrade', 'upgrade a deployed contract').env('UPGRADE')); | ||
} | ||
|
||
if (options.predictOnly) { | ||
program.addOption(new Option('--predictOnly', 'output the predicted changes only').env('PREDICT_ONLY')); | ||
} | ||
|
||
return program; | ||
}; | ||
|
||
module.exports = { | ||
...require('../common/cli-utils'), | ||
...exportedCliUtils, | ||
addBaseOptions, | ||
addEvmOptions, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.