Skip to content

Commit 055c410

Browse files
committed
fix
1 parent fe7165f commit 055c410

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/world/src/modules/init/implementations/BatchCallSystem.sol

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@ contract BatchCallSystem is System, LimitedCallContext {
2626
returnDatas = new bytes[](systemCalls.length);
2727

2828
for (uint256 i; i < systemCalls.length; i++) {
29-
bytes memory returnData = SystemCall.callWithHooksOrRevert(
29+
returnDatas[i] = SystemCall.callWithHooksOrRevert(
3030
_msgSender(),
3131
systemCalls[i].systemId,
3232
systemCalls[i].callData,
3333
0
3434
);
35-
returnDatas[i] = abi.decode(returnData, (bytes));
3635
}
3736
}
3837

@@ -49,11 +48,11 @@ contract BatchCallSystem is System, LimitedCallContext {
4948
returnDatas = new bytes[](systemCalls.length);
5049

5150
for (uint256 i; i < systemCalls.length; i++) {
51+
// TODO: swap this with SystemCall.callFromWithHooksOrRevert once available
5252
(bool success, bytes memory returnData) = address(world).delegatecall(
5353
abi.encodeCall(world.callFrom, (systemCalls[i].from, systemCalls[i].systemId, systemCalls[i].callData))
5454
);
5555
if (!success) revertWithBytes(returnData);
56-
5756
returnDatas[i] = abi.decode(returnData, (bytes));
5857
}
5958
}

0 commit comments

Comments
 (0)