Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validium mode new fee model update #11

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion l1-contracts/.env
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +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
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 ETH_SENDER_SENDER_VALIDIUM_MODE true
// #def 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 ETH_SENDER_SENDER_VALIDIUM_MODE == false
// #if 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 ETH_SENDER_SENDER_VALIDIUM_MODE == false
// #if VALIDIUM_MODE == false
require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "ln");
require(providedL2ToL1PubdataHash == logValue, "wp");
// #endif
Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/scripts/initialize-bridges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const provider = web3Provider();
const testConfigPath = path.join(process.env.ZKSYNC_HOME as string, "etc/test_config/constant");
const ethTestConfig = JSON.parse(fs.readFileSync(`${testConfigPath}/eth.json`, { encoding: "utf-8" }));

const contractArtifactsPath = path.join(process.env.ZKSYNC_HOME as string, "era-contracts-lambda/l2-contracts/artifacts-zk/");
const contractArtifactsPath = path.join(process.env.ZKSYNC_HOME as string, "contracts/l2-contracts/artifacts-zk/");

const l2BridgeArtifactsPath = path.join(contractArtifactsPath, "cache-zk/solpp-generated-contracts/bridge/");

Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/scripts/initialize-l2-weth-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const provider = web3Provider();
const testConfigPath = path.join(process.env.ZKSYNC_HOME as string, "etc/test_config/constant");
const ethTestConfig = JSON.parse(fs.readFileSync(`${testConfigPath}/eth.json`, { encoding: "utf-8" }));

const contractArtifactsPath = path.join(process.env.ZKSYNC_HOME as string, "era-contracts-lambda/l2-contracts/artifacts-zk/");
const contractArtifactsPath = path.join(process.env.ZKSYNC_HOME as string, "contracts/l2-contracts/artifacts-zk/");
const l2BridgeArtifactsPath = path.join(contractArtifactsPath, "cache-zk/solpp-generated-contracts/bridge/");
const openzeppelinTransparentProxyArtifactsPath = path.join(
contractArtifactsPath,
Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/scripts/initialize-weth-bridges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const provider = web3Provider();
const testConfigPath = path.join(process.env.ZKSYNC_HOME as string, "etc/test_config/constant");
const ethTestConfig = JSON.parse(fs.readFileSync(`${testConfigPath}/eth.json`, { encoding: "utf-8" }));

const contractArtifactsPath = path.join(process.env.ZKSYNC_HOME as string, "era-contracts-lambda/l2-contracts/artifacts-zk/");
const contractArtifactsPath = path.join(process.env.ZKSYNC_HOME as string, "contracts/l2-contracts/artifacts-zk/");
const l2BridgeArtifactsPath = path.join(contractArtifactsPath, "cache-zk/solpp-generated-contracts/bridge/");

const openzeppelinTransparentProxyArtifactsPath = path.join(
Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/scripts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function readBatchBootloaderBytecode() {
}

export function readSystemContractsBytecode(fileName: string) {
const systemContractsPath = path.join(process.env.ZKSYNC_HOME as string, "era-contracts-lambda/system-contracts");
const systemContractsPath = path.join(process.env.ZKSYNC_HOME as string, "contracts/system-contracts");
const artifact = fs.readFileSync(
`${systemContractsPath}/artifacts-zk/contracts-preprocessed/${fileName}.sol/${fileName}.json`
);
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 @@ -228,20 +228,20 @@
ethTxOptions.gasLimit ??= 10_000_000;
const contractAddress = await this.deployViaCreate2("ExecutorFacet", [], create2Salt, ethTxOptions);

if (this.verbose) {

Check failure on line 231 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `····`

Check failure on line 231 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `····`

Check failure on line 231 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `····`
console.log(`ETH_SENDER_SENDER_VALIDIUM_MODE=false`);
console.log(`VALIDIUM_MODE=false`);

Check failure on line 232 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `······`

Check failure on line 232 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Strings must use doublequote

Check failure on line 232 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `······`

Check failure on line 232 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Strings must use doublequote

Check failure on line 232 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `······`

Check failure on line 232 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Strings must use doublequote
console.log(`CONTRACTS_EXECUTOR_FACET_ADDR=${contractAddress}`);

Check failure on line 233 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `······`

Check failure on line 233 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `······`

Check failure on line 233 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `······`
}

Check failure on line 234 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `····`

Check failure on line 234 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `····`

Check failure on line 234 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `····`

this.addresses.ZkSync.ExecutorFacet = contractAddress;
}

public async deployValidiumExecutorFacet(create2Salt: string, ethTxOptions: ethers.providers.TransactionRequest) {
ethTxOptions.gasLimit ??= 10_000_000;
const contractAddress = await this.deployViaCreate2('ValidiumExecutorFacet', [], create2Salt, ethTxOptions);

Check failure on line 241 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `'ValidiumExecutorFacet'` with `"ValidiumExecutorFacet"`

Check failure on line 241 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Strings must use doublequote

Check failure on line 241 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `'ValidiumExecutorFacet'` with `"ValidiumExecutorFacet"`

Check failure on line 241 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Strings must use doublequote

Check failure on line 241 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `'ValidiumExecutorFacet'` with `"ValidiumExecutorFacet"`

Check failure on line 241 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Strings must use doublequote

if (this.verbose) {

Check failure on line 243 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `····`

Check failure on line 243 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `····`

Check failure on line 243 in l1-contracts/src.ts/deploy.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `····`
console.log(`ETH_SENDER_SENDER_VALIDIUM_MODE=true`);
console.log(`VALIDIUM_MODE=true`);
console.log(`CONTRACTS_VALIDIUM_EXECUTOR_FACET_ADDR=${contractAddress}`);
}

Expand Down
2 changes: 1 addition & 1 deletion l2-contracts/src/deployL2Weth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const provider = web3Provider();
const testConfigPath = path.join(process.env.ZKSYNC_HOME as string, "etc/test_config/constant");
const ethTestConfig = JSON.parse(fs.readFileSync(`${testConfigPath}/eth.json`, { encoding: "utf-8" }));

const contractArtifactsPath = path.join(process.env.ZKSYNC_HOME as string, "era-contracts-lambda/l2-contracts/artifacts-zk/");
const contractArtifactsPath = path.join(process.env.ZKSYNC_HOME as string, "contracts/l2-contracts/artifacts-zk/");
const l2BridgeArtifactsPath = path.join(contractArtifactsPath, "cache-zk/solpp-generated-contracts/bridge/");

const openzeppelinTransparentProxyArtifactsPath = path.join(
Expand Down
Loading