Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/sb-prepare-upgrade' into sb-prep…
Browse files Browse the repository at this point in the history
…are-upgrade
  • Loading branch information
StanislavBreadless committed Nov 14, 2023
2 parents e1578dd + 61c11f6 commit fe52dbe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ used on msg.sender, when it calls other contracts.

## Building

This repository is used as a submodule of the [zksync-2-dev](https://github.com/matter-labs/zksync-2-dev).
This repository is used as a submodule of the [zksync-era](https://github.com/matter-labs/zksync-era).

Compile the solidity and yul contracts: `yarn build`

Expand Down Expand Up @@ -84,9 +84,11 @@ See [LICENSE-MIT](LICENSE-MIT) for details.

- [Website](https://zksync.io/)
- [GitHub](https://github.com/matter-labs)
- [ZK Credo](https://github.com/zksync/credo)
- [Twitter](https://twitter.com/zksync)
- [Twitter for Devs](https://twitter.com/zkSyncDevs)
- [Discord](https://discord.gg/nMaPGrDDwk)
- [Discord](https://join.zksync.dev/)
- [Mirror](https://zksync.mirror.xyz/)

## Disclaimer

Expand Down
15 changes: 10 additions & 5 deletions scripts/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as hre from "hardhat";

import { ethers } from "ethers";
import { existsSync, mkdirSync, writeFileSync } from "fs";
import { join } from "path";
import { renderFile } from "template-file";
import { utils } from "zksync-web3";
import { SYSTEM_CONTRACTS, getRevertSelector, getTransactionUtils } from "./constants";
Expand All @@ -14,6 +15,10 @@ const SYSTEM_PARAMS = require("../SystemConfig.json");

const OUTPUT_DIR = "bootloader/build";

function path(...args: string[]): string {
return join(__dirname, ...args);
}

function getSelector(contractName: string, method: string): string {
const artifact = hre.artifacts.readArtifactSync(contractName);
const contractInterface = new ethers.utils.Interface(artifact.abi);
Expand Down Expand Up @@ -239,11 +244,11 @@ async function main() {
mkdirSync(OUTPUT_DIR);
}

writeFileSync(`${OUTPUT_DIR}/bootloader_test.yul`, provedBootloaderWithTests);
writeFileSync(`${OUTPUT_DIR}/proved_batch.yul`, provedBatchBootloader);
writeFileSync(`${OUTPUT_DIR}/playground_batch.yul`, playgroundBatchBootloader);
writeFileSync(`${OUTPUT_DIR}/gas_test.yul`, gasTestBootloader);
writeFileSync(`${OUTPUT_DIR}/fee_estimate.yul`, feeEstimationBootloader);
writeFileSync(path(`../${OUTPUT_DIR}/bootloader_test.yul`), provedBootloaderWithTests);
writeFileSync(path(`../${OUTPUT_DIR}/proved_batch.yul`), provedBatchBootloader);
writeFileSync(path(`../${OUTPUT_DIR}/playground_batch.yul`), playgroundBatchBootloader);
writeFileSync(path(`../${OUTPUT_DIR}/gas_test.yul`), gasTestBootloader);
writeFileSync(path(`../${OUTPUT_DIR}/fee_estimate.yul`), feeEstimationBootloader);

console.log("Preprocessing done!");
}
Expand Down

0 comments on commit fe52dbe

Please sign in to comment.