Skip to content

Commit

Permalink
test: turn ENABLE_GAS where it is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Apr 12, 2024
1 parent 3be402c commit 66037e8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe('benchmarks/tx_size_fees', () => {

// setup the environment
beforeAll(async () => {
process.env.ENABLE_GAS ??= '1';
const { wallets, aztecNode, deployL1ContractsValues } = await setup(3);

gasPortalAddress = deployL1ContractsValues.l1ContractAddresses.gasPortalAddress;
Expand Down
1 change: 1 addition & 0 deletions yarn-project/end-to-end/src/e2e_account_init_fees.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ describe('e2e_fees_account_init', () => {
}

beforeAll(async () => {
process.env.ENABLE_GAS ??= '1';
ctx = await setup(2);
logger = ctx.logger;
[sequencer, alice] = ctx.wallets;
Expand Down
1 change: 1 addition & 0 deletions yarn-project/end-to-end/src/e2e_dapp_subscription.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ describe('e2e_dapp_subscription', () => {

beforeAll(async () => {
process.env.PXE_URL = '';
process.env.ENABLE_GAS ??= '1';

let wallets: AccountWalletWithPrivateKey[];
let aztecNode: AztecNode;
Expand Down
1 change: 1 addition & 0 deletions yarn-project/end-to-end/src/e2e_fees.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ describe('e2e_fees', () => {
let bananaPrivateBalances: BalancesFn;

beforeAll(async () => {
process.env.ENABLE_GAS ??= '1';
const { wallets: _wallets, aztecNode, deployL1ContractsValues, logger, pxe } = await setup(3);
wallets = _wallets;

Expand Down
5 changes: 2 additions & 3 deletions yarn-project/end-to-end/src/fixtures/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ const {
TEMP_DIR = '/tmp',
ACVM_BINARY_PATH = '',
ACVM_WORKING_DIRECTORY = '',
ENABLE_GAS = '',
} = process.env;

const getAztecUrl = () => {
Expand Down Expand Up @@ -259,7 +258,7 @@ async function setupWithRemoteEnvironment(
const cheatCodes = CheatCodes.create(config.rpcUrl, pxeClient!);
const teardown = () => Promise.resolve();

if (['1', 'true'].includes(ENABLE_GAS)) {
if (['1', 'true'].includes(process.env.ENABLE_GAS!)) {
const { chainId, protocolVersion } = await pxeClient.getNodeInfo();
// this contract might already have been deployed
// the following function is idempotent
Expand Down Expand Up @@ -388,7 +387,7 @@ export async function setup(
logger.verbose('Creating a pxe...');
const { pxe, wallets } = await setupPXEService(numberOfAccounts, aztecNode!, pxeOpts, logger);

if (['1', 'true'].includes(ENABLE_GAS)) {
if (['1', 'true'].includes(process.env.ENABLE_GAS!)) {
await deployCanonicalGasToken(
new SignerlessWallet(pxe, new DefaultMultiCallEntrypoint(config.chainId, config.version)),
);
Expand Down

0 comments on commit 66037e8

Please sign in to comment.