Skip to content

Commit

Permalink
fix(protocol): make RegularERC20 predeployed in genesis (#18876)
Browse files Browse the repository at this point in the history
Co-authored-by: Gavin “yoghurt” Yu <[email protected]>
  • Loading branch information
YoGhurt111 and Gavin “yoghurt” Yu authored Feb 5, 2025
1 parent ecfd79f commit 149ddef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"eslint": "pnpm exec eslint --fix --ignore-path .eslintignore --ext .js,.ts .",
"fmt:sol": "forge fmt && pnpm solhint 'contracts/**/*.sol'",
"test:coverage": "mkdir -p coverage && forge coverage --report lcov && lcov --ignore-errors inconsistent --ignore-errors unused --remove ./lcov.info -o ./coverage/lcov.info 'test/' 'script/' 'contracts/thirdparty/' && genhtml coverage/lcov.info --branch-coverage --output-dir coverage --ignore-errors category --ignore-errors inconsistent --ignore-errors corrupt && open coverage/index.html",
"genesis:gen": "pnpm compile:l2 && ts-node ./test/genesis/generate/generate.ts",
"genesis:gen": "pnpm compile:l2 && pnpm compile:shared && ts-node ./test/genesis/generate/generate.ts",
"genesis:test": "./test/genesis/genesis.test.sh",
"export:simconf": "mkdir -p simulation/out && FOUNDRY_PROFILE=layer2 forge test --match-test 'test_L2_NoFeeCheck_simulation' -vv > simulation/out/simconf_$(date +%s).txt"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/test/genesis/generate/erc20.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ethers } from "ethers";
import { Result } from "./interface";
const path = require("path");
const ARTIFACTS_PATH = path.join(__dirname, "../../../out/genesis");
const ARTIFACTS_PATH = path.join(__dirname, "../../../out/shared");
const { computeStorageSlots, getStorageLayout } = require("./utils");

export const TOKEN_NAME = "RegularERC20";
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/test/genesis/generate/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function getStorageLayout(
): Promise<SolidityStorageLayout> {
const artifactPath =
name === "RegularERC20"
? `../../../out/genesis/${name}.sol/${name}.json`
? `../../../out/shared/${name}.sol/${name}.json`
: `../../../out/layer2/${name}.sol/${name}.json`;
const artifact = require(artifactPath);
if (!("storageLayout" in artifact)) {
Expand Down

0 comments on commit 149ddef

Please sign in to comment.