Skip to content

Commit

Permalink
Update validium mode env
Browse files Browse the repository at this point in the history
  • Loading branch information
ilitteri committed Jan 2, 2024
1 parent 7455c0f commit 7fe7979
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions l1-contracts/.env
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ CONTRACTS_L1_ALLOW_LIST_ADDR=0x0000000000000000000000000000000000000000
CONTRACTS_CREATE2_FACTORY_ADDR=0x0000000000000000000000000000000000000000
CONTRACTS_VALIDATOR_TIMELOCK_ADDR=0x0000000000000000000000000000000000000000
CONTRACTS_VALIDATOR_TIMELOCK_EXECUTION_DELAY=0
ETH_SENDER_SENDER_VALIDIUM_MODE=false
6 changes: 3 additions & 3 deletions l1-contracts/contracts/zksync/facets/Executor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity 0.8.20;

// #def VALIDIUM_MODE true
// #def ETH_SENDER_SENDER_VALIDIUM_MODE true

import {Base} from "./Base.sol";
import {COMMIT_TIMESTAMP_NOT_OLDER, COMMIT_TIMESTAMP_APPROXIMATION_DELTA, EMPTY_STRING_KECCAK, L2_TO_L1_LOG_SERIALIZE_SIZE, MAX_INITIAL_STORAGE_CHANGES_COMMITMENT_BYTES, MAX_REPEATED_STORAGE_CHANGES_COMMITMENT_BYTES, MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES, PACKED_L2_BLOCK_TIMESTAMP_MASK, PUBLIC_INPUT_SHIFT} from "../Config.sol";
Expand Down Expand Up @@ -121,7 +121,7 @@ contract ExecutorFacet is Base, IExecutor {
// See SystemLogKey enum in Constants.sol for ordering.
uint256 processedLogs;

// #if VALIDIUM_MODE == false
// #if ETH_SENDER_SENDER_VALIDIUM_MODE == false
bytes32 providedL2ToL1PubdataHash = keccak256(_newBatch.totalL2ToL1Pubdata);
// #endif

Expand All @@ -141,7 +141,7 @@ contract ExecutorFacet is Base, IExecutor {
require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "lm");
l2LogsTreeRoot = logValue;
} else if (logKey == uint256(SystemLogKey.TOTAL_L2_TO_L1_PUBDATA_KEY)) {
// #if VALIDIUM_MODE == false
// #if ETH_SENDER_SENDER_VALIDIUM_MODE == false
require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "ln");
require(providedL2ToL1PubdataHash == logValue, "wp");
// #endif
Expand Down
4 changes: 2 additions & 2 deletions l1-contracts/src.ts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export class Deployer {
const contractAddress = await this.deployViaCreate2('ExecutorFacet', [], create2Salt, ethTxOptions);

if (this.verbose) {
console.log(`VALIDIUM_MODE=false`);
console.log(`ETH_SENDER_SENDER_VALIDIUM_MODE=false`);
console.log(`CONTRACTS_EXECUTOR_FACET_ADDR=${contractAddress}`);
}

Expand All @@ -261,7 +261,7 @@ export class Deployer {
const contractAddress = await this.deployViaCreate2('ValidiumExecutorFacet', [], create2Salt, ethTxOptions);

if (this.verbose) {
console.log(`VALIDIUM_MODE=true`);
console.log(`ETH_SENDER_SENDER_VALIDIUM_MODE=true`);
console.log(`CONTRACTS_VALIDIUM_EXECUTOR_FACET_ADDR=${contractAddress}`);
}

Expand Down

0 comments on commit 7fe7979

Please sign in to comment.