-
Notifications
You must be signed in to change notification settings - Fork 0
Testing #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Testing #1
Conversation
| ); | ||
|
|
||
| DaimoAccountFactory factory = new DaimoAccountFactory{salt: 0}( | ||
| DaimoAccountFactory factory = new DaimoAccountFactory{salt: "splits.damioverifier.v0"}( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sigh
| address verifier = address(new DaimoVerifier{salt: keccak256("splits.damioverifier.v0")}()); | ||
| address initOwner = 0x8603fb56E2B6DeaF02F3e247110CEc6f4Cbb7C8F; // Daimo Ledger | ||
| new DaimoVerifierProxy{salt: 0}( | ||
| new DaimoVerifierProxy{salt: "splits.damioverifier.v0"}( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈
|
|
||
| // TODO: this requires all signatures be valid. What | ||
| // if 2 sigs are required, 3 get passed in, and 1 is | ||
| // invalid. Should op succeed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah wouldn't worry about it for now but probably for w/e we launch with we'd use a counter
| uint256 offset = 1; | ||
| for (uint256 i = 0; i < numSignatures;) { | ||
| uint8 keySlot = uint8(signature[offset]); | ||
| // TODO: is this even needed? can signatures vary in length? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i assume but don't know that different kinds of signatures might have different lengths. all passkey sigs have the same length i think and i think maybe same as EOAs (since technically it's the same curve with different params..?) idk we'll figure out later
| uint8 keySlot = uint8(signature[offset]); | ||
| // TODO: is this even needed? can signatures vary in length? | ||
| // TODO: best way to do this? | ||
| uint16 signatureLength = (uint16(uint8(signature[offset + 1])) << 8) + uint16(uint8(signature[offset + 2])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you can do uint16(signature[offset+1:offset+3])
| // invalid. Should op succeed? | ||
| uint256 offset = 1; | ||
| for (uint256 i = 0; i < numSignatures;) { | ||
| uint8 keySlot = uint8(signature[offset]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[reposting from gh so it doesn't get lost] need to add check to make sure keys aren't re-used
pseudo code that ~works gas-efficiently since we don't have access to maps in memory:
uint256 usedKeys;
loop i = each used keyslot {
uint256 bit = 1 << i;
uint256 flipped = usedKeys ^= bit;
if (flipped & bit == 0) revert Invalid();
}
No description provided.