Skip to content

Commit 55264ce

Browse files
committed
refactor: update universalReceiver event in lsp0 & lsp9
1 parent 1653101 commit 55264ce

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol

+5-5
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ abstract contract LSP0ERC725AccountCore is
120120
*
121121
* 2. If the data sent to this function is of length less than 4 bytes (not a function selector), return.
122122
*
123-
* @custom:events {UniversalReceiver} event when receiving native tokens.
123+
* @custom:events {UniversalReceiver} event when receiving native tokens and extension function selector is not found or not payable.
124124
*/
125125
// solhint-disable-next-line no-complex-fallback
126126
fallback(
@@ -198,7 +198,7 @@ abstract contract LSP0ERC725AccountCore is
198198
msg.sender,
199199
msg.value,
200200
_TYPEID_LSP0_VALUE_RECEIVED,
201-
"",
201+
abi.encodePacked(msg.sig),
202202
""
203203
);
204204
}
@@ -262,7 +262,7 @@ abstract contract LSP0ERC725AccountCore is
262262
msg.sender,
263263
msg.value,
264264
_TYPEID_LSP0_VALUE_RECEIVED,
265-
"",
265+
abi.encodePacked(msg.sig),
266266
""
267267
);
268268
}
@@ -321,7 +321,7 @@ abstract contract LSP0ERC725AccountCore is
321321
msg.sender,
322322
msg.value,
323323
_TYPEID_LSP0_VALUE_RECEIVED,
324-
"",
324+
abi.encodePacked(msg.sig),
325325
""
326326
);
327327
}
@@ -364,7 +364,7 @@ abstract contract LSP0ERC725AccountCore is
364364
msg.sender,
365365
msg.value,
366366
_TYPEID_LSP0_VALUE_RECEIVED,
367-
"",
367+
abi.encodePacked(msg.sig),
368368
""
369369
);
370370
}

contracts/LSP9Vault/LSP9VaultCore.sol

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ contract LSP9VaultCore is
122122
*
123123
* 2. If the data sent to this function is of length less than 4 bytes (not a function selector), return.
124124
*
125-
* @custom:events {UniversalReceiver} event when receiving native tokens.
125+
* @custom:events {UniversalReceiver} event when receiving native tokens and extension function selector is not found or not payable.
126126
*/
127127
// solhint-disable-next-line no-complex-fallback
128128
fallback(
@@ -202,7 +202,7 @@ contract LSP9VaultCore is
202202
msg.sender,
203203
msg.value,
204204
_TYPEID_LSP9_VALUE_RECEIVED,
205-
"",
205+
abi.encodePacked(msg.sig),
206206
""
207207
);
208208
}
@@ -237,7 +237,7 @@ contract LSP9VaultCore is
237237
msg.sender,
238238
msg.value,
239239
_TYPEID_LSP9_VALUE_RECEIVED,
240-
"",
240+
abi.encodePacked(msg.sig),
241241
""
242242
);
243243
}

docs/contracts/LSP0ERC725Account/LSP0ERC725Account.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ This function is executed when:
110110

111111
**Emitted events:**
112112

113-
- [`UniversalReceiver`](#universalreceiver) event when receiving native tokens.
113+
- [`UniversalReceiver`](#universalreceiver) event when receiving native tokens and extension function selector is not found or not payable.
114114

115115
</blockquote>
116116

docs/contracts/LSP9Vault/LSP9Vault.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ This function is executed when:
9696

9797
**Emitted events:**
9898

99-
- [`UniversalReceiver`](#universalreceiver) event when receiving native tokens.
99+
- [`UniversalReceiver`](#universalreceiver) event when receiving native tokens and extension function selector is not found or not payable.
100100

101101
</blockquote>
102102

tests/UniversalProfile.behaviour.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export const shouldBehaveLikeLSP3 = (
289289
context.accounts[0].address,
290290
msgValue,
291291
LSP1_TYPE_IDS.LSP0ValueReceived,
292-
'0x',
292+
context.universalProfile.interface.getSighash('setData'),
293293
'0x',
294294
);
295295

@@ -314,7 +314,7 @@ export const shouldBehaveLikeLSP3 = (
314314
context.accounts[0].address,
315315
msgValue,
316316
LSP1_TYPE_IDS.LSP0ValueReceived,
317-
'0x',
317+
context.universalProfile.interface.getSighash('setDataBatch'),
318318
'0x',
319319
);
320320

0 commit comments

Comments
 (0)