-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
The ERC-7579 states that :
The execution mode is a bytes32 value that is structured as follows:
callType (1 byte): 0x00 for a single call, 0x01 for a batch call, 0xfe for staticcall and 0xff for delegatecall
execType (1 byte): 0x00 for executions that revert on failure, 0x01 for executions that do not revert on failure but implement some form of error handling
unused (4 bytes): this range is reserved for future standardization
modeSelector (4 bytes): an additional mode selector that can be used to create further execution modes
modePayload (22 bytes): additional data to be passedThe implementation of Solady has the following code:
function encodeMode(bytes1 callType, bytes1 execType, bytes4 selector, bytes22 payload)
internal
pure
returns (bytes32 result)
{
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, callType)
mstore(0x01, execType)
mstore(0x02, selector)
mstore(0x06, 0)
mstore(0x0a, payload)
result := mload(0x00)
}
}which I believe swaps the unused 4 bytes and the selector 4 bytes.
This was later fixed but the dependency of Kernel seems to be the outdated.
I don't think there are any implication other than some tests not passing (or missing)
Metadata
Metadata
Assignees
Labels
No labels