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

chore: merge contracts and system-contracts repos #672

Merged
Merged
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
8 changes: 4 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ contracts/.git
!infrastructure/local-setup-preparation
!infrastructure/zk
!sdk/zksync-rs
!etc/system-contracts/bootloader/build/artifacts
!etc/system-contracts/contracts/artifacts
!etc/system-contracts/contracts/precompiles/artifacts
!etc/system-contracts/artifacts-zk
!contracts/system-contracts/bootloader/build/artifacts
!contracts/system-contracts/contracts/artifacts
!contracts/system-contracts/contracts/precompiles/artifacts
!contracts/system-contracts/artifacts-zk
!etc/multivm_bootloaders
!cargo
!bellman-cuda
Expand Down
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ bellman-cuda

# Ignore contract submodules
contracts
etc/system-contracts
2 changes: 1 addition & 1 deletion .github/workflows/build-core-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
run: |
ci_run git config --global --add safe.directory /usr/src/zksync
ci_run git config --global --add safe.directory /usr/src/zksync/sdk/binaryen
ci_run git config --global --add safe.directory /usr/src/zksync/etc/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run zk
ci_run zk clean --all
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-local-node-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: |
ci_run git config --global --add safe.directory /usr/src/zksync
ci_run git config --global --add safe.directory /usr/src/zksync/sdk/binaryen
ci_run git config --global --add safe.directory /usr/src/zksync/etc/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts

ci_run zk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- name: init
run: |
ci_run git config --global --add safe.directory /usr/src/zksync
ci_run git config --global --add safe.directory /usr/src/zksync/etc/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run zk

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
run: |
ci_run git config --global --add safe.directory /usr/src/zksync
ci_run git config --global --add safe.directory /usr/src/zksync/sdk/binaryen
ci_run git config --global --add safe.directory /usr/src/zksync/etc/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts

ci_run zk
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
run: |
ci_run git config --global --add safe.directory /usr/src/zksync
ci_run git config --global --add safe.directory /usr/src/zksync/sdk/binaryen
ci_run git config --global --add safe.directory /usr/src/zksync/etc/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run zk
ci_run zk init
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
run: |
ci_run git config --global --add safe.directory /usr/src/zksync
ci_run git config --global --add safe.directory /usr/src/zksync/sdk/binaryen
ci_run git config --global --add safe.directory /usr/src/zksync/etc/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run zk
ci_run zk init
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vm-perf-comparison.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
ci_run cargo bench --package vm-benchmark --bench iai | tee base-iai

- name: checkout PR
run: git checkout --force FETCH_HEAD
run: git checkout --force FETCH_HEAD --recurse-submodules

- name: run benchmarks on PR
shell: bash
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "etc/system-contracts"]
path = etc/system-contracts
url = https://github.com/matter-labs/era-system-contracts.git
[submodule "contracts"]
path = contracts
url = https://github.com/matter-labs/era-contracts.git
2 changes: 0 additions & 2 deletions .markdownlintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ bellman-cuda

# Ignore contract submodules
contracts
etc/system-contracts

1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ CHANGELOG.md

# Ignore contract submodules
contracts
etc/system-contracts
3 changes: 1 addition & 2 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Ignore contract submodules
contracts
etc/system-contracts
contracts
2 changes: 1 addition & 1 deletion contracts
Submodule contracts updated 341 files
2 changes: 1 addition & 1 deletion core/bin/system-constants-generator/src/intrinsic_costs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//!
//! The script that returns the L2 gas price constants is that calculates the constants currently used by the
//! bootloader as well as L1 smart contracts. It should be used to edit the config file located in the etc/system-contracts/SystemConfig.json
//! bootloader as well as L1 smart contracts. It should be used to edit the config file located in the contracts/system-contracts/SystemConfig.json
//! as well as contracts/SystemConfig.json
//!

Expand Down
5 changes: 4 additions & 1 deletion core/bin/system-constants-generator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,10 @@ fn update_l1_system_constants(intrinsic_gas_constants: &IntrinsicSystemGasConsta

fn update_l2_system_constants(intrinsic_gas_constants: &IntrinsicSystemGasConstants) {
let l2_system_config = generate_l2_contracts_system_config(intrinsic_gas_constants);
save_file("etc/system-contracts/SystemConfig.json", l2_system_config);
save_file(
"contracts/system-contracts/SystemConfig.json",
l2_system_config,
);
}

fn main() {
Expand Down
2 changes: 1 addition & 1 deletion core/bin/system-constants-generator/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ pub(super) fn get_l1_txs(number_of_txs: usize) -> (Vec<Transaction>, Vec<Transac

fn read_bootloader_test_code(test: &str) -> Vec<u8> {
read_zbin_bytecode(format!(
"etc/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
"contracts/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
test, test
))
}
Expand Down
20 changes: 10 additions & 10 deletions core/lib/contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ pub enum ContractLanguage {
}

const GOVERNANCE_CONTRACT_FILE: &str =
"contracts/ethereum/artifacts/cache/solpp-generated-contracts/governance/IGovernance.sol/IGovernance.json";
"contracts/l1-contracts/artifacts/cache/solpp-generated-contracts/governance/IGovernance.sol/IGovernance.json";
const ZKSYNC_CONTRACT_FILE: &str =
"contracts/ethereum/artifacts/cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol/IZkSync.json";
"contracts/l1-contracts/artifacts/cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol/IZkSync.json";
const MULTICALL3_CONTRACT_FILE: &str =
"contracts/ethereum/artifacts/cache/solpp-generated-contracts/dev-contracts/Multicall3.sol/Multicall3.json";
"contracts/l1-contracts/artifacts/cache/solpp-generated-contracts/dev-contracts/Multicall3.sol/Multicall3.json";
const VERIFIER_CONTRACT_FILE: &str =
"contracts/ethereum/artifacts/cache/solpp-generated-contracts/zksync/Verifier.sol/Verifier.json";
"contracts/l1-contracts/artifacts/cache/solpp-generated-contracts/zksync/Verifier.sol/Verifier.json";
const IERC20_CONTRACT_FILE: &str =
"contracts/ethereum/artifacts/cache/solpp-generated-contracts/common/interfaces/IERC20.sol/IERC20.json";
"contracts/l1-contracts/artifacts/cache/solpp-generated-contracts/common/interfaces/IERC20.sol/IERC20.json";
const FAIL_ON_RECEIVE_CONTRACT_FILE: &str =
"contracts/ethereum/artifacts/cache/solpp-generated-contracts/zksync/dev-contracts/FailOnReceive.sol/FailOnReceive.json";
"contracts/l1-contracts/artifacts/cache/solpp-generated-contracts/zksync/dev-contracts/FailOnReceive.sol/FailOnReceive.json";
const L2_BRIDGE_CONTRACT_FILE: &str =
"contracts/zksync/artifacts-zk/cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol/IL2Bridge.json";
"contracts/l2-contracts/artifacts-zk/cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol/IL2Bridge.json";
const LOADNEXT_CONTRACT_FILE: &str =
"etc/contracts-test-data/artifacts-zk/contracts/loadnext/loadnext_contract.sol/LoadnextContract.json";
const LOADNEXT_SIMPLE_CONTRACT_FILE: &str =
Expand Down Expand Up @@ -70,7 +70,7 @@ pub fn load_contract<P: AsRef<Path> + std::fmt::Debug>(path: P) -> Contract {

pub fn load_sys_contract(contract_name: &str) -> Contract {
load_contract(format!(
"etc/system-contracts/artifacts-zk/cache-zk/solpp-generated-contracts/{0}.sol/{0}.json",
"contracts/system-contracts/artifacts-zk/cache-zk/solpp-generated-contracts/{0}.sol/{0}.json",
contract_name
))
}
Expand Down Expand Up @@ -200,7 +200,7 @@ impl SystemContractsRepo {
let zksync_home = std::env::var("ZKSYNC_HOME").unwrap_or_else(|_| ".".into());
let zksync_home = PathBuf::from(zksync_home);
SystemContractsRepo {
root: zksync_home.join("etc/system-contracts"),
root: zksync_home.join("contracts/system-contracts"),
}
}
pub fn read_sys_contract_bytecode(
Expand All @@ -224,7 +224,7 @@ impl SystemContractsRepo {

pub fn read_bootloader_code(bootloader_type: &str) -> Vec<u8> {
read_zbin_bytecode(format!(
"etc/system-contracts/bootloader/build/artifacts/{}.yul/{}.yul.zbin",
"contracts/system-contracts/bootloader/build/artifacts/{}.yul/{}.yul.zbin",
bootloader_type, bootloader_type
))
}
Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_1_3_2/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ pub fn create_test_block_params() -> (BlockContext, BlockProperties) {

pub fn read_bootloader_test_code(test: &str) -> Vec<u8> {
read_zbin_bytecode(format!(
"etc/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
"contracts/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
test, test
))
}
Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_latest/tests/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub(crate) fn read_test_contract() -> Vec<u8> {

pub(crate) fn get_bootloader(test: &str) -> SystemContractCode {
let bootloader_code = read_zbin_bytecode(format!(
"etc/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
"contracts/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
test, test
));

Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_m5/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ pub fn create_test_block_params() -> (BlockContext, BlockProperties) {

pub fn read_bootloader_test_code(test: &str) -> Vec<u8> {
read_zbin_bytecode(format!(
"etc/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
"contracts/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
test, test
))
}
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_m6/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ pub fn create_test_block_params() -> (BlockContext, BlockProperties) {

pub fn read_bootloader_test_code(test: &str) -> Vec<u8> {
read_zbin_bytecode(format!(
"etc/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
"contracts/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
test, test
))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub(crate) fn read_test_contract() -> Vec<u8> {

pub(crate) fn get_bootloader(test: &str) -> SystemContractCode {
let bootloader_code = read_zbin_bytecode(format!(
"etc/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
"contracts/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
test, test
));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub(crate) fn read_test_contract() -> Vec<u8> {

pub(crate) fn get_bootloader(test: &str) -> SystemContractCode {
let bootloader_code = read_zbin_bytecode(format!(
"etc/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
"contracts/system-contracts/bootloader/tests/artifacts/{}.yul/{}.yul.zbin",
test, test
));

Expand Down
2 changes: 1 addition & 1 deletion core/tests/ts-integration/src/system.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BigNumber, BytesLike, ethers } from 'ethers';
import { Provider, utils } from 'zksync-web3';

const L1_CONTRACTS_FOLDER = `${process.env.ZKSYNC_HOME}/contracts/ethereum/artifacts/cache/solpp-generated-contracts`;
const L1_CONTRACTS_FOLDER = `${process.env.ZKSYNC_HOME}/contracts/l1-contracts/artifacts/cache/solpp-generated-contracts`;
const DIAMOND_UPGRADE_INIT_ABI = new ethers.utils.Interface(
require(`${L1_CONTRACTS_FOLDER}/zksync/upgrade-initializers/DiamondUpgradeInit1.sol/DiamondUpgradeInit1.json`).abi
);
Expand Down
10 changes: 4 additions & 6 deletions core/tests/ts-integration/tests/custom-erc20-bridge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import { spawn as _spawn } from 'child_process';
import * as zksync from 'zksync-web3';
import * as ethers from 'ethers';
import { scaledGasPrice } from '../src/helpers';
import {
L1ERC20BridgeFactory,
TransparentUpgradeableProxyFactory,
AllowListFactory
} from 'l1-zksync-contracts/typechain';
import { L1ERC20BridgeFactory, TransparentUpgradeableProxyFactory, AllowListFactory } from 'l1-contracts/typechain';
import { sleep } from 'zk/build/utils';

describe('Tests for the custom bridge behavior', () => {
Expand Down Expand Up @@ -59,7 +55,9 @@ describe('Tests for the custom bridge behavior', () => {
await l1BridgeProxy.deployTransaction.wait(2);

const isLocalSetup = process.env.ZKSYNC_LOCAL_SETUP;
const baseCommandL1 = isLocalSetup ? `yarn --cwd /contracts/ethereum` : `cd $ZKSYNC_HOME && yarn l1-contracts`;
const baseCommandL1 = isLocalSetup
? `yarn --cwd /contracts/l1-contracts`
: `cd $ZKSYNC_HOME && yarn l1-contracts`;
let args = `--private-key ${alice.privateKey} --erc20-bridge ${l1BridgeProxy.address}`;
let command = `${baseCommandL1} initialize-bridges ${args}`;
await spawn(command);
Expand Down
4 changes: 2 additions & 2 deletions core/tests/ts-integration/tests/l2-weth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { TestMaster } from '../src/index';

import * as zksync from 'zksync-web3';
import { scaledGasPrice, waitUntilBlockFinalized } from '../src/helpers';
import { WETH9, WETH9Factory } from 'l1-zksync-contracts/typechain';
import { L2Weth, L2WethFactory } from 'l2-zksync-contracts/typechain';
import { WETH9, WETH9Factory } from 'l1-contracts/typechain';
import { L2Weth, L2WethFactory } from 'l2-contracts/typechain';
import { BigNumber, ethers } from 'ethers';
import {
shouldChangeETHBalances,
Expand Down
2 changes: 1 addition & 1 deletion core/tests/ts-integration/tests/system.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ describe('System behavior checks', () => {
function bootloaderUtilsContract() {
const BOOTLOADER_UTILS_ADDRESS = '0x000000000000000000000000000000000000800c';
const BOOTLOADER_UTILS = new ethers.utils.Interface(
require(`${process.env.ZKSYNC_HOME}/etc/system-contracts/artifacts-zk/cache-zk/solpp-generated-contracts/BootloaderUtilities.sol/BootloaderUtilities.json`).abi
require(`${process.env.ZKSYNC_HOME}/contracts/system-contracts/artifacts-zk/cache-zk/solpp-generated-contracts/BootloaderUtilities.sol/BootloaderUtilities.json`).abi
);

return new ethers.Contract(BOOTLOADER_UTILS_ADDRESS, BOOTLOADER_UTILS, alice);
Expand Down
8 changes: 4 additions & 4 deletions core/tests/upgrade-test/tests/upgrade.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import fs from 'fs';
import { TransactionResponse } from 'zksync-web3/build/src/types';
import { BytesLike } from '@ethersproject/bytes';

const L1_CONTRACTS_FOLDER = `${process.env.ZKSYNC_HOME}/contracts/ethereum/artifacts/cache/solpp-generated-contracts`;
const L1_CONTRACTS_FOLDER = `${process.env.ZKSYNC_HOME}/contracts/l1-contracts/artifacts/cache/solpp-generated-contracts`;
const L1_DEFAULT_UPGRADE_ABI = new ethers.utils.Interface(
require(`${L1_CONTRACTS_FOLDER}/upgrades/DefaultUpgrade.sol/DefaultUpgrade.json`).abi
);
Expand All @@ -19,10 +19,10 @@ const ADMIN_FACET_ABI = new ethers.utils.Interface(
require(`${L1_CONTRACTS_FOLDER}/zksync/facets/Admin.sol/AdminFacet.json`).abi
);
const L2_FORCE_DEPLOY_UPGRADER_ABI = new ethers.utils.Interface(
require(`${process.env.ZKSYNC_HOME}/contracts/zksync/artifacts-zk/cache-zk/solpp-generated-contracts/ForceDeployUpgrader.sol/ForceDeployUpgrader.json`).abi
require(`${process.env.ZKSYNC_HOME}/contracts/l2-contracts/artifacts-zk/cache-zk/solpp-generated-contracts/ForceDeployUpgrader.sol/ForceDeployUpgrader.json`).abi
);
const COMPLEX_UPGRADER_ABI = new ethers.utils.Interface(
require(`${process.env.ZKSYNC_HOME}/etc/system-contracts/artifacts-zk/cache-zk/solpp-generated-contracts/ComplexUpgrader.sol/ComplexUpgrader.json`).abi
require(`${process.env.ZKSYNC_HOME}/contracts/system-contracts/artifacts-zk/cache-zk/solpp-generated-contracts/ComplexUpgrader.sol/ComplexUpgrader.json`).abi
);
const COUNTER_BYTECODE =
require(`${process.env.ZKSYNC_HOME}/core/tests/ts-integration/artifacts-zk/contracts/counter/counter.sol/Counter.json`).deployedBytecode;
Expand Down Expand Up @@ -130,7 +130,7 @@ describe('Upgrade test', function () {
});

step('Send l1 tx for saving new bootloader', async () => {
const path = `${process.env.ZKSYNC_HOME}/etc/system-contracts/bootloader/build/artifacts/playground_batch.yul/playground_batch.yul.zbin`;
const path = `${process.env.ZKSYNC_HOME}/contracts/system-contracts/bootloader/build/artifacts/playground_batch.yul/playground_batch.yul.zbin`;
const bootloaderCode = ethers.utils.hexlify(fs.readFileSync(path));
bootloaderHash = ethers.utils.hexlify(hashBytecode(bootloaderCode));
const txHandle = await tester.syncWallet.requestExecute({
Expand Down
4 changes: 2 additions & 2 deletions docker/contract-verifier/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ RUN mkdir -p /etc/vyper-bin/0.3.10 \
&& chmod +x /etc/vyper-bin/0.3.10/vyper

COPY --from=builder /usr/src/zksync/target/release/zksync_contract_verifier /usr/bin/
COPY etc/system-contracts/bootloader/build/artifacts/ /etc/system-contracts/bootloader/build/artifacts/
COPY etc/system-contracts/artifacts-zk /etc/system-contracts/artifacts-zk
COPY contracts/system-contracts/bootloader/build/artifacts/ /contracts/system-contracts/bootloader/build/artifacts/
COPY contracts/system-contracts/artifacts-zk /contracts/system-contracts/artifacts-zk

# CMD tail -f /dev/null
ENTRYPOINT ["zksync_contract_verifier"]
12 changes: 6 additions & 6 deletions docker/external-node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ COPY --from=builder /usr/src/zksync/target/release/zksync_external_node /usr/bin
COPY --from=builder /usr/src/zksync/target/release/block_reverter /usr/bin
COPY --from=builder /usr/local/cargo/bin/sqlx /usr/bin
COPY --from=builder /usr/src/zksync/docker/external-node/entrypoint.sh /usr/bin
COPY etc/system-contracts/bootloader/build/artifacts/ /etc/system-contracts/bootloader/build/artifacts/
COPY etc/system-contracts/contracts/artifacts/ /etc/system-contracts/contracts/artifacts/
COPY etc/system-contracts/contracts/precompiles/artifacts/ /etc/system-contracts/contracts/precompiles/artifacts/
COPY etc/system-contracts/artifacts-zk /etc/system-contracts/artifacts-zk
COPY contracts/ethereum/artifacts/ /contracts/ethereum/artifacts/
COPY contracts/zksync/artifacts-zk/ /contracts/zksync/artifacts-zk/
COPY contracts/system-contracts/bootloader/build/artifacts/ /contracts/system-contracts/bootloader/build/artifacts/
COPY contracts/system-contracts/contracts/artifacts/ /contracts/system-contracts/contracts/artifacts/
COPY contracts/system-contracts/contracts/precompiles/artifacts/ /contracts/system-contracts/contracts/precompiles/artifacts/
COPY contracts/system-contracts/artifacts-zk /contracts/system-contracts/artifacts-zk
COPY contracts/l1-contracts/artifacts/ /contracts/l1-contracts/artifacts/
COPY contracts/l2-contracts/artifacts-zk/ /contracts/l2-contracts/artifacts-zk/
COPY etc/tokens/ /etc/tokens/
COPY etc/ERC20/ /etc/ERC20/
COPY etc/multivm_bootloaders/ /etc/multivm_bootloaders/
Expand Down
4 changes: 2 additions & 2 deletions docker/local-node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ RUN cd /infrastructure/zk && yarn && yarn build && cd /
# Build `local-setup-preparation` tool
RUN cd /infrastructure/local-setup-preparation && yarn && cd /
# Build L1 contracts package (contracts themselves should be already built)
RUN cd /contracts/ethereum && yarn && cd /
RUN cd /contracts/l1-contracts && yarn && cd /
# Same for L2 contracts
RUN cd /contracts/zksync && yarn && cd /
RUN cd /contracts/l2-contracts && yarn && cd /

# setup entrypoint script
COPY ./docker/local-node/entrypoint.sh /usr/bin/
Expand Down
2 changes: 1 addition & 1 deletion docker/local-node/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ then
sed -i 's!^merkle_tree_backup_path=.*$!merkle_tree_backup_path="/var/lib/zksync/data/backups"!' /etc/env/base/database.toml

# Switch zksolc compiler source from docker to binary
sed -i "s!'docker'!'binary'!" /contracts/zksync/hardhat.config.ts
sed -i "s!'docker'!'binary'!" /contracts/l2-contracts/hardhat.config.ts

# Compile configs again (with changed values)
yarn start config compile
Expand Down
Loading