Skip to content

Commit

Permalink
Just fix the block number without create2 in the integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
SoraSuegami committed Dec 3, 2024
1 parent 10b4b91 commit 3e70470
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 138 deletions.
30 changes: 13 additions & 17 deletions packages/contracts/test/Integration.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ contract IntegrationTest is Test {
address signer = deployer;

// Create DKIM registry
UserOverrideableDKIMRegistry overrideableDkimImpl = new UserOverrideableDKIMRegistry{
salt: 0
}();
UserOverrideableDKIMRegistry overrideableDkimImpl = new UserOverrideableDKIMRegistry();
{
ERC1967Proxy overrideableDkimProxy = new ERC1967Proxy{salt: 0}(
ERC1967Proxy overrideableDkimProxy = new ERC1967Proxy(
address(overrideableDkimImpl),
abi.encodeCall(
overrideableDkimImpl.initialize,
Expand Down Expand Up @@ -86,9 +84,9 @@ contract IntegrationTest is Test {

// Create Verifier
{
Verifier verifierImpl = new Verifier{salt: 0}();
Groth16Verifier groth16Verifier = new Groth16Verifier{salt: 0}();
ERC1967Proxy verifierProxy = new ERC1967Proxy{salt: 0}(
Verifier verifierImpl = new Verifier();
Groth16Verifier groth16Verifier = new Groth16Verifier();
ERC1967Proxy verifierProxy = new ERC1967Proxy(
address(verifierImpl),
abi.encodeCall(
verifierImpl.initialize,
Expand All @@ -99,15 +97,13 @@ contract IntegrationTest is Test {
}

// Create EmailAuth
EmailAuth emailAuthImpl = new EmailAuth{salt: 0}();
EmailAuth emailAuthImpl = new EmailAuth();
console.log("emailAuthImpl");
console.logAddress(address(emailAuthImpl));

// Create RecoveryController as EmailAccountRecovery implementation
RecoveryController recoveryControllerImpl = new RecoveryController{
salt: 0
}();
ERC1967Proxy recoveryControllerProxy = new ERC1967Proxy{salt: 0}(
RecoveryController recoveryControllerImpl = new RecoveryController();
ERC1967Proxy recoveryControllerProxy = new ERC1967Proxy(
address(recoveryControllerImpl),
abi.encodeCall(
recoveryControllerImpl.initialize,
Expand All @@ -124,8 +120,8 @@ contract IntegrationTest is Test {
);

// Create SimpleWallet as EmailAccountRecovery implementation
SimpleWallet simpleWalletImpl = new SimpleWallet{salt: 0}();
ERC1967Proxy simpleWalletProxy = new ERC1967Proxy{salt: 0}(
SimpleWallet simpleWalletImpl = new SimpleWallet();
ERC1967Proxy simpleWalletProxy = new ERC1967Proxy(
address(simpleWalletImpl),
abi.encodeCall(
simpleWalletImpl.initialize,
Expand Down Expand Up @@ -155,7 +151,7 @@ contract IntegrationTest is Test {
console.log("SimpleWallet is at ", address(simpleWallet));
assertEq(
address(simpleWallet),
0x4eF610d2c80b65446c33113C77a3E848719CE74a
0x46080822b1906e932858BB9580A90610b2028e9b
);
address simpleWalletOwner = simpleWallet.owner();

Expand Down Expand Up @@ -190,7 +186,7 @@ contract IntegrationTest is Test {
emailProof.publicKeyHash = bytes32(vm.parseUint(pubSignals[9]));
emailProof.timestamp = vm.parseUint(pubSignals[11]);
emailProof
.maskedCommand = "Accept guardian request for 0x4eF610d2c80b65446c33113C77a3E848719CE74a";
.maskedCommand = "Accept guardian request for 0x46080822b1906e932858BB9580A90610b2028e9b";
emailProof.emailNullifier = bytes32(vm.parseUint(pubSignals[10]));
emailProof.accountSalt = bytes32(vm.parseUint(pubSignals[32]));
accountSalt = emailProof.accountSalt;
Expand Down Expand Up @@ -269,7 +265,7 @@ contract IntegrationTest is Test {
emailProof.publicKeyHash = bytes32(vm.parseUint(pubSignals[9]));
emailProof.timestamp = vm.parseUint(pubSignals[11]);
emailProof
.maskedCommand = "Set the new signer of 0x4eF610d2c80b65446c33113C77a3E848719CE74a to 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720";
.maskedCommand = "Set the new signer of 0x46080822b1906e932858BB9580A90610b2028e9b to 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720";
emailProof.emailNullifier = bytes32(vm.parseUint(pubSignals[10]));
emailProof.accountSalt = bytes32(vm.parseUint(pubSignals[32]));
require(
Expand Down
122 changes: 61 additions & 61 deletions packages/contracts/test/emails/8453/accept.eml
Original file line number Diff line number Diff line change
@@ -1,97 +1,97 @@
Delivered-To: [email protected]
Received: by 2002:a05:6f02:829e:b0:7c:27d1:5778 with SMTP id j30csp2042964rcd;
Mon, 2 Dec 2024 20:10:17 -0800 (PST)
X-Received: by 2002:a05:690c:6108:b0:6e2:451c:df02 with SMTP id 00721157ae682-6efafae0dccmr8835807b3.16.1733199016815;
Mon, 02 Dec 2024 20:10:16 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1733199016; cv=none;
Received: by 2002:a05:6f02:829e:b0:7c:27d1:5778 with SMTP id j30csp2057688rcd;
Mon, 2 Dec 2024 20:53:43 -0800 (PST)
X-Received: by 2002:a05:690c:7082:b0:6ef:7372:1131 with SMTP id 00721157ae682-6efad347d99mr20965067b3.41.1733201623351;
Mon, 02 Dec 2024 20:53:43 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1733201623; cv=none;
d=google.com; s=arc-20240605;
b=CFLqpzXFHNsSS8VpnvRxpko+xX1U1iogvcle1jq2BrW1HQJdhbB4EmOMECy3Ra3Cwp
lkDNoGsCo5+rJTLC0Lc53qhpTCRJQQllM7ss7D3DwBj/XGFuAMP6+o+0eIIQ0amWAnDI
wrIzVHWSa4LT4ovZ6Tm8rSr0uioOU/DAsr0+5k280rk15JaykrKEQHcUghsuAPfkXZW8
efoZUAvj7v5HeaQEk9tEoQnfNV/aEuHsMvUv2M0MP6pVXt5Q+V8DnQQ+TgnY2SIMjbRN
N85ZC4YsKsS2Slxsu+3VrTY1wLttPpHXX6Z2huEGxZKILC0BZXCCyrSij+sKGI6tlRH4
KV1A==
b=VQY7S7VLYWi5FPGVsqlogVnChNFFLSc0PdPgE9Al6MHNrkA2SZcv0Lihyrwl2qgQD2
pLFRg/Nmwepf8WtzbqXVOZTiCiBWFppFDsYCbX6mjkzXbF72y3HCSpk/5a3zmYtMppEh
Wa2gsU7xGcnIutJ5ukY7NYz/dO+6KM934KsL2dkllR7eYn0SVx53JHzLtfuZBzxcf3Oo
yA2tY702IqX1wS0OnjCRMIXgGcXmA81Wg1pNBDOVMPJ5RSC9wnS2jpB/6s6E7huiEbhb
ahI5IY0zaLNQa9pASPW4s4WldoJIyOMX/hxDVRKjH9AvW3Sk9BFbbdmaqXkCMjAcBjtM
TWLQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
:dkim-signature;
bh=Im1yaAhgk46N+8vlue0l8aT2sFkn+mzRWeeDvObGfI4=;
bh=LHoKyoWZyAq8j/HR1woQ7Z1derA3CHV8WroEsgdxcvY=;
fh=piqzy4ujdlR+MUXqs15gF7XdlDw2mZShl76veKMclKc=;
b=jAXwyyCz1WBPLZJ21AMDWXb/qH5uClJp0Fj+zQyGFIq0QHi+u8FRwqUgx8v/XpiCBZ
VoPp3Ym9Q/4b1hsxZwR38w49R9dK5QvTR3knyBdKV+W4Mr5GrtYX6JfvhisGAZT2e0LA
zh/AAxnD6kWneNlFyPsj8l0RKKY2cO4B4SxMC15mWs9Dtn5LzACZHYqgPP5aAGMtU5Mm
A57qChC6vg+FESI5QRsGaMUGPgUbtU5QBFzW51HKf6v0F614LINnGEzpFG23S8aa4bbc
dB/0/ozbaG07VP6cdE+88EPEB4fRzg+n3lIyzY35GcJudVVhpu5K6niiuSgVk8L0q85/
+cIg==;
b=kdyipqc9RHZoco8igIEV5oMkTrpKCaNBhDsbCWZh8XFiUmIhJP7YCcKMmrj77xCtMJ
B4FnZWsasmOjACy6vJbGL2q2MC4LHGlO28bRYk8APZtDj3QnKd94n/yKnJQiXImzk7LP
musK4tfyKjNMWkUu2r3jgxMB7Bn+VTdcWWnHNL4kKZIBKjl7ZpQvVzx74wxfB9MeQcxW
3mWrdwg+ffoiLYYyPCfZVhbMbcCNZzi2Xk6nFkj1xi715uEX+b2ho0Cnv3di5p6JUSio
H4qVXQm8WxEfiWKx9V5uJMRjBeiOfUtu1FqoEH6SQ24wqjIaZIF1vGLZtCXlNIIRB62f
wlxw==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass [email protected] header.s=20230601 header.b=UGH0HWGJ;
dkim=pass [email protected] header.s=20230601 header.b=Q+ABwGeY;
spf=pass (google.com: domain of [email protected] designates 209.85.220.41 as permitted sender) smtp.mailfrom=[email protected];
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
dara=pass [email protected]
Return-Path: <[email protected]>
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
by mx.google.com with SMTPS id 00721157ae682-6ef4cd49acesor48619147b3.5.2024.12.02.20.10.16
by mx.google.com with SMTPS id 00721157ae682-6ef4db67fb2sor84766347b3.6.2024.12.02.20.53.43
for <[email protected]>
(Google Transport Security);
Mon, 02 Dec 2024 20:10:16 -0800 (PST)
Mon, 02 Dec 2024 20:53:43 -0800 (PST)
Received-SPF: pass (google.com: domain of [email protected] designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
Authentication-Results: mx.google.com;
dkim=pass [email protected] header.s=20230601 header.b=UGH0HWGJ;
dkim=pass [email protected] header.s=20230601 header.b=Q+ABwGeY;
spf=pass (google.com: domain of [email protected] designates 209.85.220.41 as permitted sender) smtp.mailfrom=[email protected];
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
dara=pass [email protected]
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1733199016; x=1733803816; dara=google.com;
d=gmail.com; s=20230601; t=1733201623; x=1733806423; dara=google.com;
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
:from:to:cc:subject:date:message-id:reply-to;
bh=Im1yaAhgk46N+8vlue0l8aT2sFkn+mzRWeeDvObGfI4=;
b=UGH0HWGJx4T2GpCoAlie1HaV02xgYAtEPfeJj1/RwXRXlax5rAQI4QJPQnGDpuiQWq
Ojvf2R4qazhLbpirAXpy7751ND0v+1WS8Vd4T/wCgV0QjOZg6iwYmxYZsYK5gvuINcC9
LG0w+WRsBCe8JK3AvUtu4jXQuQkvyK3DY181jm2k628CsLeMvkKABGwA8qu5U64qzqKp
Os12Trc/pWa5lzEnxIqDMW3SxiQByMOtBIWmS0yQOSDyK8U9gKTSUEY+8fhdXgkOHRgy
IVxVVexS2jYMgmxqxBiIzVcAjMCVzd1Ei7HdPh28qyPUj1p0vqftBmw0jkoYKUSQPl/h
li9g==
bh=LHoKyoWZyAq8j/HR1woQ7Z1derA3CHV8WroEsgdxcvY=;
b=Q+ABwGeYYUueQXc7dFLFy5O2t+tTMFoHu2O/opdEBgW4cW/SUGhcgRGnK+YzwPUyZ2
JPZ9H8Vy8nJmmyQJ+OPHOTgrM3MPBT81Vp6abUa0Su51CC1er8VmCUKYK92bzxnAlHE7
kArYCwiR+OJNwrPlnHT2ttSNCmt6cz2e/bcFao02EscTy+cgjUceF1FkDJDWmSCQ8xto
vyGjiJJRLiOudkOM+GGGbvj9A5McpzksrrQ0HiyxMnukXhuhevOUzT2Wt97cq7jv1yWC
/O5i2PfBL1q0ple3wS8XnVqwawQ+7vYRL216oMOLgRfseV/9p6DV67dl6/gJgqd2hzz0
jfdg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1733199016; x=1733803816;
d=1e100.net; s=20230601; t=1733201623; x=1733806423;
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=Im1yaAhgk46N+8vlue0l8aT2sFkn+mzRWeeDvObGfI4=;
b=iol8K1vKWMjy5y9WL8YfNFYZ5VZW0oDMP0Gs6UWgHXlK6SenKiMcsSTJvBTsLtnTEE
10Ocjc+cTmq2tkuONy+9epiAgvMG1RmPp8YM025wI19ERFdpaDKKxNMq3wYpMzyWnj8R
xjw44EDoce3JSIBJK0CkwNbTrDY2EgW9riCYLvVQA5nCv6ZhpWSAq9nscK+3QUc9j4dg
7me2VCyx9JN0o72kFGMuoVVwouDSyYJhl0ePY7ilpLZuYqPIDp+ww+osxv217edudG4t
M9yFFLPrYhXTzMY4lkBQfK762lwq6puJxhqR0cNE1buNSd0W3LbsjqG1QtlmXZ0ooCfm
dxAg==
X-Gm-Message-State: AOJu0YxbGbwRKGbw4N8kPGEBvJwOFIa3idlgizaXgkvJtmXJ25kLJbWM
Uwk892ezSpdTgyVFZWNFcsDFvondlaOr6q22tcP0ndV+ELthtaI3jTTEmao+qz+klVpkMKcHrDC
g6mSHISbajuz5IvOzL7MCW4VA0vEpyA==
X-Gm-Gg: ASbGncsMndNB6d/pIQOnziOe+5HhYt8X+9QxpLYR40upmWuAJiwdlwDnnY83ojR+h5z
+JZRGXW/Y2TVxvBUVgylzCS0hNI33vQ==
X-Google-Smtp-Source: AGHT+IHKGdZgrnzrfz2U1hxfejxfew+Vj7LEwYw/bFWc9dD48cSeJcxmvlWOcGiDrs8+JcIDtB7AJKRSiTfr5h9RYQQ=
X-Received: by 2002:a05:690c:708b:b0:6ee:669b:e90 with SMTP id
00721157ae682-6ef4a0fa1b9mr187719347b3.10.1733199016134; Mon, 02 Dec 2024
20:10:16 -0800 (PST)
bh=LHoKyoWZyAq8j/HR1woQ7Z1derA3CHV8WroEsgdxcvY=;
b=mLfB89Hus0YLOS+C7d0bLikcYgxMxFHRdT8NxBu4+w2eQF1XXBeJsXlacXAfpvMKS1
yek7mZ0R9zWcZpy0xzXG0+TypejGEm+or5LWX0w9QRtXLPrIKMGM8R2zKgsAX7eJ6+uO
30sziehbDoFx3j74pwZapcNu1GxiPpm0aW5CFXgIYKlXztbbX1rVrN8O8Xm4Y7PQVCuK
fdXKjTEbbkyRb0WVUqkcIZ9iinG7m7Tz/BbID/JjGvjx9073iOS+NPm1OZF3Sn8Hvfp/
bSLgqwn2dfMwcR+WkR2GWp6V8B69z3XkfL+iqmNdzJfTTAbHpomkOM9xHqfLvga+PsQC
Uhqg==
X-Gm-Message-State: AOJu0YzOfS6o3U2HfWBoO7OiymKhNTAcYe+SAUrhcF4YyjHScIb6U2zT
9F3kWIztT7cPHm7m/EDE9aziuUw+pJyQXYiTGEwcXWiGBjS8TOL/BAcqlvXA/vhFJMUd02fjHIT
bWWgA/raEwHRzWgB0uOr4j5IXXiQXeg==
X-Gm-Gg: ASbGnctqd2b5ZeJXHy1zt5rHBTjdMMjElUuVThiG4JNxyrE69F/0ZfExhLWuD9Dzt/O
bIQi3WntoMNQTQhegNauGS1D9JaG6NZ0=
X-Google-Smtp-Source: AGHT+IFyHjlIXvyj7ptRoOLRYuwDmhuRUYv2v3424Us7MHxHmmbZ1ba+uhZktlQpNOajKbHVbf0Jj/S8alvVkyPXjzQ=
X-Received: by 2002:a05:690c:6c87:b0:6ef:7fdb:7d41 with SMTP id
00721157ae682-6efacb20161mr24659137b3.0.1733201622599; Mon, 02 Dec 2024
20:53:42 -0800 (PST)
MIME-Version: 1.0
References: <674e848a.a70a0220.1fc487.69e1@mx.google.com>
In-Reply-To: <674e848a.a70a0220.1fc487.69e1@mx.google.com>
References: <674e8ebb.170a0220.1058c7.2ece@mx.google.com>
In-Reply-To: <674e8ebb.170a0220.1058c7.2ece@mx.google.com>
From: Sora Suegami <[email protected]>
Date: Tue, 3 Dec 2024 13:10:04 +0900
Message-ID: <CAJ7Y6jcr3Sp3Uztqeawr9VVzhPYK7ahG4=iBfdHUnE0gS5WMGA@mail.gmail.com>
Date: Tue, 3 Dec 2024 13:53:31 +0900
Message-ID: <CAJ7Y6jdRmNJ+o-D_KFbLmYtFHzaj-p971j4MOmcJmfi4_VOXog@mail.gmail.com>
Subject: Re: [Reply Needed] Accept Email
To: Alice <[email protected]>
Content-Type: multipart/alternative; boundary="000000000000ae8dbf062855d762"
Content-Type: multipart/alternative; boundary="0000000000000a0f56062856731f"

--000000000000ae8dbf062855d762
--0000000000000a0f56062856731f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Tue, Dec 3, 2024 at 1:09=E2=80=AFPM Alice <[email protected]> w=
On Tue, Dec 3, 2024 at 1:53=E2=80=AFPM Alice <[email protected]> w=
rote:
> Hello!
>
> This is a test email with a basic HTML body.
> Accept guardian request for 0x4eF610d2c80b65446c33113C77a3E848719CE74a
> Accept guardian request for 0x46080822b1906e932858BB9580A90610b2028e9b
> Code 1162ebff40918afe5305e68396f0283eb675901d0387f97d21928d423aaa0b54
>
> *Thank you!*
Expand All @@ -102,12 +102,12 @@ rote:
---
Sent with Gmail for Sidekick Browser <https://join.meetsidekick.com/_cdpcg>

--000000000000ae8dbf062855d762
--0000000000000a0f56062856731f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote gmail_quote_contai=
ner"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Dec 3, 2024 at 1:09=E2=
ner"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Dec 3, 2024 at 1:53=E2=
=80=AFPM Alice &lt;<a href=3D"mailto:[email protected]">emaiwallet=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" =
style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa=
Expand All @@ -116,9 +116,9 @@ dding-left:1ex">
<div>
<h1>Hello!</h1>
<p>This is a test email with a basic HTML body.</p>
<div id=3D"m_18489546416516190683D&quot;zkemail&quot;">Accept guard=
ian request for 0x4eF610d2c80b65446c33113C77a3E848719CE74a Code 1162ebff409=
18afe5305e68396f0283eb675901d0387f97d21928d423aaa0b54</div>
<div id=3D"m_-74840336225360528023D&quot;zkemail&quot;">Accept guar=
dian request for 0x46080822b1906e932858BB9580A90610b2028e9b Code 1162ebff40=
918afe5305e68396f0283eb675901d0387f97d21928d423aaa0b54</div>
<p><b>Thank you!</b></p>
</div>
=20
Expand All @@ -128,4 +128,4 @@ l_signature"><div dir=3D"ltr">---<br>Sent with Gmail for <a href=3D"https:/=
/join.meetsidekick.com/_cdpcg" target=3D"_blank">Sidekick Browser</a></div>=
</div>

--000000000000ae8dbf062855d762--
--0000000000000a0f56062856731f--
Loading

0 comments on commit 3e70470

Please sign in to comment.