diff --git a/package.json b/package.json index 71b95175..afabab93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@shardlabs/starknet-hardhat-plugin", - "version": "0.2.1", + "version": "0.2.2", "description": "Plugin for using Starknet tools within Hardhat projects", "main": "dist/index.js", "files": [ diff --git a/src/types.ts b/src/types.ts index e56a8c9a..f022f459 100644 --- a/src/types.ts +++ b/src/types.ts @@ -155,15 +155,15 @@ export class StarknetContract { }, networkMode: "host" } - ); - - if (executed.statusCode) { - const msg = `Could not ${kind} ${functionName}:\n` + executed.stderr.toString(); - const replacedMsg = adaptLog(msg); - throw new HardhatPluginError(PLUGIN_NAME, replacedMsg); - } - - return executed; + ); + + if (executed.statusCode) { + const msg = `Could not ${kind} ${functionName}:\n` + executed.stderr.toString(); + const replacedMsg = adaptLog(msg); + throw new HardhatPluginError(PLUGIN_NAME, replacedMsg); + } + + return executed; } private async checkStatus(txID: string) { @@ -175,7 +175,10 @@ export class StarknetContract { "--id", txID, "--gateway_url", this.gatewayUrl, "--feeder_gateway_url", this.feederGatewayUrl - ] + ], + { + networkMode: "host" + } ); if (executed.statusCode) {