Skip to content

Commit

Permalink
Update licenseType doc and error message (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericglau authored Apr 16, 2024
1 parent d4c7cef commit fafbbaa
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.0.1-alpha.6 (2024-04-16)

- Update documentation and error message about supported values for `--licenseType` option. ([#9](https://github.com/OpenZeppelin/defender-deploy-client-cli/pull/9))

## 0.0.1-alpha.5 (2024-03-11)

- Support private networks and forked networks. ([#7](https://github.com/OpenZeppelin/defender-deploy-client-cli/pull/7))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Required options:
Additional options:
--constructorBytecode <CONSTRUCTOR_BYTECODE> 0x-prefixed ABI encoded byte string representing the constructor arguments. Required if the constructor has arguments.
--licenseType <LICENSE> License type for the contract. Recommended if verifying source code. Defaults to "None".
--licenseType "<LICENSE>" License type to display on block explorers for verified source code. See https://etherscan.io/contract-license-types for supported values and use the string found in brackets, e.g. "MIT"
--verifySourceCode <true|false> Whether to verify source code on block explorers. Defaults to true.
--relayerId <RELAYER_ID> Relayer ID to use for deployment. Defaults to the relayer configured for your deployment environment on Defender.
--salt <SALT> Salt to use for CREATE2 deployment. Defaults to a random salt.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openzeppelin/defender-deploy-client-cli",
"version": "0.0.1-alpha.5",
"version": "0.0.1-alpha.6",
"description": "CLI for deployments using OpenZeppelin Defender SDK",
"repository": "https://github.com/OpenZeppelin/defender-deploy-client-cli",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Required options:
Additional options:
--constructorBytecode <CONSTRUCTOR_BYTECODE> 0x-prefixed ABI encoded byte string representing the constructor arguments. Required if the constructor has arguments.
--licenseType <LICENSE> License type for the contract. Recommended if verifying source code. Defaults to "None".
--licenseType "<LICENSE>" License type to display on block explorers for verified source code. See https://etherscan.io/contract-license-types for supported values and use the string found in brackets, e.g. "MIT"
--verifySourceCode <true|false> Whether to verify source code on block explorers. Defaults to true.
--relayerId <RELAYER_ID> Relayer ID to use for deployment. Defaults to the relayer configured for your deployment environment on Defender.
--salt <SALT> Salt to use for CREATE2 deployment. Defaults to a random salt.
Expand Down
2 changes: 1 addition & 1 deletion src/internal/deploy-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export async function deployContract(args: FunctionArgs, client: DeployClient) {
} catch (e: any) {
if (e.response?.data?.message?.includes('licenseType should be equal to one of the allowed values')) {
throw new Error(
`License type ${args.licenseType} is not a valid SPDX license identifier for block explorer verification. Specify a valid license type.`,
`The licenseType option "${args.licenseType}" is not valid for block explorer verification. See https://etherscan.io/contract-license-types for supported values and use the string found in brackets, e.g. "MIT"`,
);
} else {
throw e;
Expand Down
2 changes: 1 addition & 1 deletion test/deploy.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Generated by [AVA](https://avajs.dev).
Additional options:␊
--constructorBytecode <CONSTRUCTOR_BYTECODE> 0x-prefixed ABI encoded byte string representing the constructor arguments. Required if the constructor has arguments.␊
--licenseType <LICENSE> License type for the contract. Recommended if verifying source code. Defaults to "None".
--licenseType "<LICENSE>" License type to display on block explorers for verified source code. See https://etherscan.io/contract-license-types for supported values and use the string found in brackets, e.g. "MIT"
--verifySourceCode <true|false> Whether to verify source code on block explorers. Defaults to true.␊
--relayerId <RELAYER_ID> Relayer ID to use for deployment. Defaults to the relayer configured for your deployment environment on Defender.␊
--salt <SALT> Salt to use for CREATE2 deployment. Defaults to a random salt.␊
Expand Down
Binary file modified test/deploy.js.snap
Binary file not shown.

0 comments on commit fafbbaa

Please sign in to comment.