You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// @review does Solady v0.1 have something equivalent offerings for these depedencies? would be nice to use what we recently paid to audit and would probably also be optimized
/// @review In general I think we should split our tests here between implementation-agnostic invariants the proxy maintains and separate integration tests specific to CoinbaseSmartWallet
/// @review In general I think we should split our tests here between implementation-agnostic invariants the proxy maintains and separate integration tests specific to CoinbaseSmartWallet
10
11
contractInitializeTestisEIP7702ProxyBase {
12
+
/// @review style should be snake_case, e.g. test_success_validSignature
13
+
/// @review prefer fuzzing where possible
14
+
/// @review add test where fails because initializer delegatecall fails
11
15
function testSucceedsWithValidSignature() public {
/// @review In general I think we should split our tests here between implementation-agnostic invariants the proxy maintains and separate integration tests specific to CoinbaseSmartWallet
9
10
contractIsValidSignatureTestisEIP7702ProxyBase {
10
11
bytes4constant ERC1271_MAGIC_VALUE =0x1626ba7e;
11
12
bytes4constant ERC1271_FAIL_VALUE =0xffffffff;
@@ -26,17 +27,13 @@ contract IsValidSignatureTest is EIP7702ProxyBase {
26
27
testHash =keccak256("test message");
27
28
28
29
// Verify owner was set correctly
29
-
assertTrue(
30
-
wallet.isOwnerAddress(_newOwner),
31
-
"New owner should be set after initialization"
32
-
);
33
-
assertEq(
34
-
wallet.ownerAtIndex(0),
35
-
abi.encode(_newOwner),
36
-
"Owner at index 0 should be new owner"
37
-
);
30
+
assertTrue(wallet.isOwnerAddress(_newOwner), "New owner should be set after initialization");
31
+
assertEq(wallet.ownerAtIndex(0), abi.encode(_newOwner), "Owner at index 0 should be new owner");
38
32
}
39
33
34
+
/// @review add test for calling on uninitialized contract
35
+
/// @review add test if delegatecall reverts then bubbles up revert data
36
+
40
37
function testValidContractOwnerSignature() public {
41
38
// Create signature from contract owner
42
39
bytesmemory signature =_createOwnerSignature(
@@ -47,11 +44,7 @@ contract IsValidSignatureTest is EIP7702ProxyBase {
47
44
);
48
45
49
46
bytes4 result = wallet.isValidSignature(testHash, signature);
0 commit comments