-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
function decodeNonce(uint256 nonce)
internal
pure
returns (ValidationMode mode, ValidationType vType, ValidationId identifier)
{
// 2bytes mode (1byte currentMode, 1byte type)
// 21bytes identifier
// 1byte mode | 1byte type | 20bytes identifierWithoutType | 2byte nonceKey | 8byte nonce == 32bytes
assembly {
mode := nonce
vType := shl(8, nonce)
identifier := shl(8, nonce)
switch shr(248, identifier)
case 0x0000000000000000000000000000000000000000000000000000000000000002 {
identifier := and(identifier, 0xffffffffff000000000000000000000000000000000000000000000000000000)
}
}
}
it should be: "vType := shr(8, nonce)"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels