Skip to content

Commit

Permalink
add flag to toggle UI on for scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
zoeyTM committed Dec 15, 2024
1 parent dc2e8bf commit 8423f92
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,23 @@ export class EthersIgnitionHelper {
strategy,
strategyConfig,
deploymentId: givenDeploymentId = undefined,
displayUi = false,
}: {
parameters?: DeploymentParameters;
config?: Partial<DeployConfig>;
defaultSender?: string;
strategy?: StrategyT;
strategyConfig?: StrategyConfig[StrategyT];
deploymentId?: string;
displayUi?: boolean;
} = {
parameters: {},
config: {},
defaultSender: undefined,
strategy: undefined,
strategyConfig: undefined,
deploymentId: undefined,
displayUi: undefined,
}
): Promise<
IgnitionModuleResultsTToEthersContracts<
Expand Down Expand Up @@ -135,7 +138,9 @@ export class EthersIgnitionHelper {
deploymentId
);

const executionEventListener = new PrettyEventHandler();
const executionEventListener = displayUi
? new PrettyEventHandler()
: undefined;

const result = await deploy({
config: resolvedConfig,
Expand Down
7 changes: 6 additions & 1 deletion packages/hardhat-plugin-viem/src/viem-ignition-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,23 @@ export class ViemIgnitionHelper {
strategy,
strategyConfig,
deploymentId: givenDeploymentId = undefined,
displayUi = false,
}: {
parameters?: DeploymentParameters;
config?: Partial<DeployConfig>;
defaultSender?: string;
strategy?: StrategyT;
strategyConfig?: StrategyConfig[StrategyT];
deploymentId?: string;
displayUi?: boolean;
} = {
parameters: {},
config: {},
defaultSender: undefined,
strategy: undefined,
strategyConfig: undefined,
deploymentId: undefined,
displayUi: undefined,
}
): Promise<
IgnitionModuleResultsToViemContracts<ContractNameT, IgnitionModuleResultsT>
Expand Down Expand Up @@ -125,7 +128,9 @@ export class ViemIgnitionHelper {
deploymentId
);

const executionEventListener = new PrettyEventHandler();
const executionEventListener = displayUi
? new PrettyEventHandler()
: undefined;

const result = await deploy({
config: resolvedConfig,
Expand Down

0 comments on commit 8423f92

Please sign in to comment.