Skip to content

Commit

Permalink
fix: set bytecode_hash = none to prevent metadata to be included in t…
Browse files Browse the repository at this point in the history
…he creationCode and adjust expected addresses
  • Loading branch information
zkfriendly committed Dec 19, 2024
1 parent e49780b commit 80a7bb3
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 34 deletions.
2 changes: 1 addition & 1 deletion packages/contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fs_permissions = [
{ access = "read", path = "./zkout/ERC1967Proxy.sol/ERC1967Proxy.json" },
{ access = "read", path = "./artifacts" },
]

bytecode_hash = "none"
solc = "0.8.26"

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
Expand Down
10 changes: 5 additions & 5 deletions packages/contracts/test/script/ChangeOwnersScript.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ contract ChangeOwnersScriptTest is StructHelper {

Deploy deploy = new Deploy();
deploy.run();
vm.setEnv("DKIM", "0x1445eb74cea4Be2FDc961646cc5e7F6b6eD96718");
vm.setEnv("VERIFIER", "0xFa093e866780eE4A3546b5BC4Ffb38b186269C52");
vm.setEnv("DKIM", "0xedF4bB8f2d504dDCe967A72cb738F8F3E2e44374");
vm.setEnv("VERIFIER", "0x38323919eFb82A1f1a04D863BbBe12925cb93f2D");
vm.setEnv(
"EMAIL_AUTH_IMPL",
"0x647e0FcF727a6DCec40c179a2E44Bde108b341d6"
"0x4393aB187b8B509d153681383a8aB26593BfA8d6"
);
vm.setEnv(
"RECOVERY_CONTROLLER",
"0x7bE0655b25E90e971Ca54f717250Bf6021bcA353"
"0x064c9B191E626618b787e77630995bDcEbAD69F6"
);
deploy.deployECDSAOwnedDKIMRegistry(
vm.envAddress("INITIAL_OWNER"),
vm.envAddress("DKIM_SIGNER")
);
vm.setEnv("ECDSA_DKIM", "0x916B5308713E70bd53c1f9aF7F0d228B62736af9");
vm.setEnv("ECDSA_DKIM", "0x6600f69ba900BFD830bE1a8985ED59A80694A06f");
ChangeOwners changeOwners = new ChangeOwners();
changeOwners.run();
address verifier = vm.envAddress("VERIFIER");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ contract ChangeSignerInECDSAOwnedDKIMRegistryScriptTest is StructHelper {

Deploy deploy = new Deploy();
deploy.run();
vm.setEnv("DKIM", "0x1445eb74cea4Be2FDc961646cc5e7F6b6eD96718");
vm.setEnv("VERIFIER", "0xFa093e866780eE4A3546b5BC4Ffb38b186269C52");
vm.setEnv("DKIM", "0xedF4bB8f2d504dDCe967A72cb738F8F3E2e44374");
vm.setEnv("VERIFIER", "0x38323919eFb82A1f1a04D863BbBe12925cb93f2D");
vm.setEnv(
"EMAIL_AUTH_IMPL",
"0x647e0FcF727a6DCec40c179a2E44Bde108b341d6"
"0x4393aB187b8B509d153681383a8aB26593BfA8d6"
);
vm.setEnv(
"RECOVERY_CONTROLLER",
"0x7bE0655b25E90e971Ca54f717250Bf6021bcA353"
"0x064c9B191E626618b787e77630995bDcEbAD69F6"
);
deploy.deployECDSAOwnedDKIMRegistry(
vm.addr(vm.envUint("PRIVATE_KEY")),
vm.envAddress("DKIM_SIGNER")
);
vm.setEnv("ECDSA_DKIM", "0x916B5308713E70bd53c1f9aF7F0d228B62736af9");
vm.setEnv("ECDSA_DKIM", "0x6600f69ba900BFD830bE1a8985ED59A80694A06f");
ChangeSigner changeSigner = new ChangeSigner();
changeSigner.run();
address ecdsaDkimAddr = vm.envAddress("ECDSA_DKIM");
Expand Down
22 changes: 11 additions & 11 deletions packages/contracts/test/script/DeployRecoveryControllerScript.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,48 +27,48 @@ contract DeployRecoveryControllerScriptTest is StructHelper {

Deploy deploy = new Deploy();
deploy.run();
vm.setEnv("DKIM", "0x1445eb74cea4Be2FDc961646cc5e7F6b6eD96718");
vm.setEnv("VERIFIER", "0xFa093e866780eE4A3546b5BC4Ffb38b186269C52");
vm.setEnv("DKIM", "0xedF4bB8f2d504dDCe967A72cb738F8F3E2e44374");
vm.setEnv("VERIFIER", "0x38323919eFb82A1f1a04D863BbBe12925cb93f2D");
vm.setEnv(
"EMAIL_AUTH_IMPL",
"0x647e0FcF727a6DCec40c179a2E44Bde108b341d6"
"0x4393aB187b8B509d153681383a8aB26593BfA8d6"
);
vm.setEnv(
"RECOVERY_CONTROLLER",
"0x7bE0655b25E90e971Ca54f717250Bf6021bcA353"
"0x064c9B191E626618b787e77630995bDcEbAD69F6"
);
vm.setEnv(
"SIMPLE_WALLET",
"0xd314baEA5ccD35E1335e865793d589fb42525ea7"
"0x300f752d60986Dd7b7b41795e46b3326D8127dCb"
);
deploy.deployECDSAOwnedDKIMRegistry(
vm.addr(vm.envUint("PRIVATE_KEY")),
vm.envAddress("DKIM_SIGNER")
);
vm.setEnv("ECDSA_DKIM", "0x916B5308713E70bd53c1f9aF7F0d228B62736af9");
vm.setEnv("ECDSA_DKIM", "0x6600f69ba900BFD830bE1a8985ED59A80694A06f");
require(
vm.envAddress("ECDSA_DKIM") ==
0x916B5308713E70bd53c1f9aF7F0d228B62736af9,
0x6600f69ba900BFD830bE1a8985ED59A80694A06f,
"ECDSA_DKIM address mismatch"
);
require(
vm.envAddress("VERIFIER") ==
0xFa093e866780eE4A3546b5BC4Ffb38b186269C52,
0x38323919eFb82A1f1a04D863BbBe12925cb93f2D,
"VERIFIER address mismatch"
);
require(
vm.envAddress("EMAIL_AUTH_IMPL") ==
0x647e0FcF727a6DCec40c179a2E44Bde108b341d6,
0x4393aB187b8B509d153681383a8aB26593BfA8d6,
"EMAIL_AUTH_IMPL address mismatch"
);
require(
vm.envAddress("RECOVERY_CONTROLLER") ==
0x7bE0655b25E90e971Ca54f717250Bf6021bcA353,
0x064c9B191E626618b787e77630995bDcEbAD69F6,
"RECOVERY_CONTROLLER address mismatch"
);
require(
vm.envAddress("SIMPLE_WALLET") ==
0xd314baEA5ccD35E1335e865793d589fb42525ea7,
0x300f752d60986Dd7b7b41795e46b3326D8127dCb,
"SIMPLE_WALLET address mismatch"
);
}
Expand Down
20 changes: 14 additions & 6 deletions packages/contracts/test/script/DeploySimpleWalletScript.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,20 @@ contract DeploySimpleWalletScriptTest is StructHelper {
"0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"
);
vm.setEnv("DKIM_SIGNER", "0x69bec2dd161d6bbcc91ec32aa44d9333ebc864c0");
vm.setEnv("INITIAL_OWNER", "0x70997970C51812dc3A010C7d01b50e0d17dc79C8");

vm.setEnv("DKIM", vm.toString(address(dkim)));
vm.setEnv("VERIFIER", vm.toString(address(verifier)));
vm.setEnv("EMAIL_AUTH_IMPL", vm.toString(address(emailAuth)));
vm.setEnv("SIMPLE_WALLET_IMPL", vm.toString(address(simpleWalletImpl)));
vm.setEnv(
"INITIAL_OWNER",
"0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
);
vm.setEnv("DKIM", "0xedF4bB8f2d504dDCe967A72cb738F8F3E2e44374");
vm.setEnv("VERIFIER", "0x38323919eFb82A1f1a04D863BbBe12925cb93f2D");
vm.setEnv(
"EMAIL_AUTH_IMPL",
"0x4393aB187b8B509d153681383a8aB26593BfA8d6"
);
vm.setEnv(
"SIMPLE_WALLET_IMPL",
"0xD6d903a25e94551c70D9F23335b9E35A8a9d310c"
);
}

function test_run() public {
Expand Down
12 changes: 6 additions & 6 deletions packages/contracts/test/script/RenounceOwnersScript.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ contract RenounceOwnersScriptTest is StructHelper {
skipIfZkSync();
Deploy deploy = new Deploy();
deploy.run();
vm.setEnv("DKIM", "0x1445eb74cea4Be2FDc961646cc5e7F6b6eD96718");
vm.setEnv("VERIFIER", "0xFa093e866780eE4A3546b5BC4Ffb38b186269C52");
vm.setEnv("DKIM", "0xedF4bB8f2d504dDCe967A72cb738F8F3E2e44374");
vm.setEnv("VERIFIER", "0x38323919eFb82A1f1a04D863BbBe12925cb93f2D");
vm.setEnv(
"EMAIL_AUTH_IMPL",
"0x647e0FcF727a6DCec40c179a2E44Bde108b341d6"
"0x4393aB187b8B509d153681383a8aB26593BfA8d6"
);
vm.setEnv(
"RECOVERY_CONTROLLER",
"0x7bE0655b25E90e971Ca54f717250Bf6021bcA353"
"0x064c9B191E626618b787e77630995bDcEbAD69F6"
);
vm.setEnv(
"SIMPLE_WALLET",
"0xd314baEA5ccD35E1335e865793d589fb42525ea7"
"0x300f752d60986Dd7b7b41795e46b3326D8127dCb"
);
deploy.deployECDSAOwnedDKIMRegistry(
vm.addr(vm.envUint("PRIVATE_KEY")),
vm.envAddress("DKIM_SIGNER")
);
vm.setEnv("ECDSA_DKIM", "0x916B5308713E70bd53c1f9aF7F0d228B62736af9");
vm.setEnv("ECDSA_DKIM", "0x6600f69ba900BFD830bE1a8985ED59A80694A06f");
RenounceOwners renounceOwners = new RenounceOwners();
renounceOwners.run();
address verifier = vm.envAddress("VERIFIER");
Expand Down

0 comments on commit 80a7bb3

Please sign in to comment.