Skip to content

Commit

Permalink
fix: [quanstamp-req] Contract data key (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-alchemy authored and jaypaik committed Jan 25, 2024
1 parent 9dbc0ba commit 911d957
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/session/permissions/SessionKeyPermissionsBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ abstract contract SessionKeyPermissionsBase is ISessionKeyPlugin {

// ContractData (128 bytes)
// 12 padding zeros || associated address || CONTRACT_DATA_PREFIX || batch index || sessionKeyId
// || contractAddress || 12 padding zero bytes
// || 12 padding zero bytes || contractAddress

// FunctionData (128 bytes)
// 12 padding zeros || associated address || FUNCTION_DATA_PREFIX || batch index || sessionKeyId || selector
Expand Down Expand Up @@ -154,7 +154,7 @@ abstract contract SessionKeyPermissionsBase is ISessionKeyPlugin {
PluginStorageLib.allocateAssociatedStorageKey(associated, prefixAndBatchIndex, 2);

bytes32 contractDataKey1 = SessionKeyId.unwrap(id);
bytes32 contractDataKey2 = bytes32(bytes20(contractAddress));
bytes32 contractDataKey2 = bytes32(uint256(uint160(contractAddress)));
return _toContractData(
PluginStorageLib.associatedStorageLookup(associatedStorageKey, contractDataKey1, contractDataKey2)
);
Expand Down

0 comments on commit 911d957

Please sign in to comment.