Skip to content

Commit

Permalink
update readme and rename verify to publich sources
Browse files Browse the repository at this point in the history
  • Loading branch information
kovalgek committed Feb 11, 2025
1 parent 937652a commit 10f6685
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Available actions:

- `fork` - deploy, check and test on forked network
- `deploy` - deploy on live network
- `verify` - verify the contract's source code on the live network
- `publish-sources` - publish sources on live network
- `check` - check and test on live network
- `all` - run all actions

Expand Down
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Context, getSteps, DeployAction } from "./steps";
function parseCmdLineArgs() {
program
.argument("<config-path>", "path to .yaml config file")
.option("--actions [actions...]", "list of actions: fork deploy verify check", ["all"])
.option("--actions [actions...]", "list of actions: fork deploy publish-sources check. E.g. --actions fork deploy publish-sources check. Default: all", ["all"])
.option("--showLogs", "show logs in console")
.parse();

Expand All @@ -37,10 +37,10 @@ function deployActionsFromActionsOption(actionsOption: string[]): DeployAction[]
switch (trimmedAction) {
case "fork": return DeployAction.Fork;
case "deploy": return DeployAction.Deploy;
case "verify": return DeployAction.Verify;
case "publish-sources": return DeployAction.PublishSources;
case "check": return DeployAction.Check;
default:
throw new Error(`Invalid action: ${action}. Valid actions are: fork, deploy, verify, check`);
throw new Error(`Invalid action: ${action}. Valid actions are: fork, deploy, publish-sources, check`);
}
});
}
Expand Down
14 changes: 7 additions & 7 deletions src/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ interface Step {
}

enum DeployAction {
Fork = "fork", // Deploy and test on fork
Deploy = "deploy", // Deploy on real network
Verify = "verify", // Run verification steps
Check = "check" // Check real network deployment
Fork = "fork", // Deploy and test on fork
Deploy = "deploy", // Deploy on real network
PublishSources = "publish-sources", // Publish sources on live network
Check = "check" // Check real network deployment
}

function getSteps(actions: DeployAction[]): Step[] {
Expand All @@ -63,8 +63,8 @@ function getSteps(actions: DeployAction[]): Step[] {
steps.push(...deployOnRealNetworkSteps);
}

if (actions.includes(DeployAction.Verify)) {
steps.push(...verifyOnRealNetworkSteps);
if (actions.includes(DeployAction.PublishSources)) {
steps.push(...publishSourcesSteps);
}

if (actions.includes(DeployAction.Check)) {
Expand Down Expand Up @@ -249,7 +249,7 @@ const deployOnRealNetworkSteps: Step[] = [
}
];

const verifyOnRealNetworkSteps: Step[] = [
const publishSourcesSteps: Step[] = [
{
name: "Wait for Block Explorer to Confirm Address as Contract",
action: async (_, logCallback) => {
Expand Down

0 comments on commit 10f6685

Please sign in to comment.