Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions contracts/account/utils/draft-ERC7579Utils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ library ERC7579Utils {
function decodeSingle(
bytes calldata executionCalldata
) internal pure returns (address target, uint256 value, bytes calldata callData) {
target = address(bytes20(executionCalldata[0x00:0x14]));
value = uint256(bytes32(executionCalldata[0x14:0x34]));
callData = executionCalldata[0x34:];
target = address(bytes20(executionCalldata));
value = uint256(bytes32(executionCalldata[20:52]));
callData = executionCalldata[52:];
}

/// @dev Encodes a delegate call execution. See {decodeDelegate}.
Expand All @@ -163,8 +163,8 @@ library ERC7579Utils {
function decodeDelegate(
bytes calldata executionCalldata
) internal pure returns (address target, bytes calldata callData) {
target = address(bytes20(executionCalldata[0:0x14]));
callData = executionCalldata[0x14:];
target = address(bytes20(executionCalldata));
callData = executionCalldata[20:];
}

/// @dev Encodes a batch of executions. See {decodeBatch}.
Expand Down