diff --git a/packages/core/src/tasks/index.ts b/packages/core/src/tasks/index.ts index cd06bde66..46686a411 100644 --- a/packages/core/src/tasks/index.ts +++ b/packages/core/src/tasks/index.ts @@ -135,7 +135,8 @@ export const chugsplashProposeAbstractTask = async ( integration: Integration, artifactPaths: ArtifactPaths, canonicalConfigPath: string, - cre: ChugSplashRuntimeEnvironment + cre: ChugSplashRuntimeEnvironment, + shouldRelay = true ) => { const { remoteExecution } = cre @@ -211,12 +212,6 @@ export const chugsplashProposeAbstractTask = async ( spinner.succeed(`${parsedConfig.options.projectName} can be proposed.`) spinner.start(`Proposing ${parsedConfig.options.projectName}...`) - const shouldRelay = - process.env.CHUGSPLASH_API_KEY !== undefined && - ((await isLiveNetwork(provider)) || - process.env.LOCAL_TEST_METATX_PROPOSE === 'true' || - process.env.LOCAL_MANAGED_SERVICE === 'true') - const metatxs = await proposeChugSplashDeployment( provider, signer, @@ -1118,6 +1113,12 @@ export const proposeChugSplashDeployment = async ( ) } + if (!process.env.CHUGSPLASH_API_KEY) { + throw new Error( + 'Must provide a CHUGSPLASH_API_KEY environment variable to use gasless proposals' + ) + } + const { signature, request } = await signMetaTxRequest( provider, process.env.PRIVATE_KEY, diff --git a/packages/executor/test/Executor.test.ts b/packages/executor/test/Executor.test.ts index dd23a11ed..3bafd4625 100644 --- a/packages/executor/test/Executor.test.ts +++ b/packages/executor/test/Executor.test.ts @@ -87,7 +87,8 @@ describe('Remote Execution', () => { 'hardhat', artifactPaths, canonicalConfigPath, - cre + cre, + false ) // approve