@latticexyz/world 2.2.23-a8c404b4b10462f5f390a82f9e40ceb80bc5eb23 → 2.2.23-e1c2958b99c9fe4c7189ab24938e0978ff85a75f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node.js +6 -10
- package/dist/node.js.map +1 -1
- package/out/AccessManagementSystem.sol/AccessManagementSystem.json +1 -1
- package/out/BalanceTransferSystem.sol/BalanceTransferSystem.json +1 -1
- package/out/BatchCallSystem.sol/BatchCallSystem.json +1 -1
- package/out/BatchCallSystemLib.sol/BatchCallSystemLib.json +1 -1
- package/out/BatchCallSystemLib.sol/_batchCallFrom_SystemCallFromDataArray.json +1 -1
- package/out/BatchCallSystemLib.sol/_batchCall_SystemCallDataArray.json +1 -1
- package/out/InitModule.sol/InitModule.json +1 -1
- package/out/RegistrationSystem.sol/RegistrationSystem.json +1 -1
- package/out/WorldRegistrationSystemLib.sol/WorldRegistrationSystemLib.json +1 -1
- package/out/WorldRegistrationSystemLib.sol/_registerDelegation_address_ResourceId_bytes.json +1 -1
- package/out/WorldRegistrationSystemLib.sol/_registerFunctionSelector_ResourceId_string.json +1 -1
- package/out/WorldRegistrationSystemLib.sol/_registerNamespaceDelegation_ResourceId_ResourceId_bytes.json +1 -1
- package/out/WorldRegistrationSystemLib.sol/_registerNamespace_ResourceId.json +1 -1
- package/out/WorldRegistrationSystemLib.sol/_registerRootFunctionSelector_ResourceId_string_string.json +1 -1
- package/out/WorldRegistrationSystemLib.sol/_registerSystemHook_ResourceId_ISystemHook_uint8.json +1 -1
- package/out/WorldRegistrationSystemLib.sol/_registerSystem_ResourceId_System_bool.json +1 -1
- package/out/WorldRegistrationSystemLib.sol/_unregisterDelegation_address.json +1 -1
- package/out/WorldRegistrationSystemLib.sol/_unregisterNamespaceDelegation_ResourceId.json +1 -1
- package/out/WorldRegistrationSystemLib.sol/_unregisterSystemHook_ResourceId_ISystemHook.json +1 -1
- package/out/build-info/{e6f011585aed24d85d685c8bc5326202.json → bf27acd14b2b959864c0abf4ffaa7965.json} +1 -1
- package/package.json +9 -9
- package/src/codegen/experimental/systems/BatchCallSystemLib.sol +4 -16
- package/src/codegen/experimental/systems/WorldRegistrationSystemLib.sol +4 -16
package/dist/node.js
CHANGED
@@ -275,8 +275,7 @@ function renderSystemLibrary(options) {
|
|
275
275
|
const functions = functionsInput.map((func) => ({
|
276
276
|
...func,
|
277
277
|
// Format parameters (add auxiliary argument names, replace calldata location)
|
278
|
-
parameters: formatParams(
|
279
|
-
returnParameters: formatParams("__auxRet", func.returnParameters),
|
278
|
+
parameters: formatParams(func.parameters),
|
280
279
|
// Remove `payable` from stateMutability for library functions
|
281
280
|
stateMutability: func.stateMutability.replace("payable", "")
|
282
281
|
}));
|
@@ -514,22 +513,19 @@ function renderAbiDecode(expression, returnParameters) {
|
|
514
513
|
const returnTypes = returnParameters.map((param) => param.split(" ")[0]).join(", ");
|
515
514
|
return `
|
516
515
|
bytes memory result = ${expression};
|
517
|
-
|
518
|
-
if (result.length != 0) {
|
519
|
-
return abi.decode(result, (${returnTypes}));
|
520
|
-
}
|
516
|
+
return abi.decode(result, (${returnTypes}));
|
521
517
|
`;
|
522
518
|
}
|
523
519
|
function renderReturnParameters2(returnParameters) {
|
524
520
|
if (returnParameters.length == 0) return "";
|
525
521
|
return `returns (${renderArguments2(returnParameters)})`;
|
526
522
|
}
|
527
|
-
function formatParams(
|
523
|
+
function formatParams(params) {
|
528
524
|
let auxCount = 0;
|
529
|
-
return params.map((arg) => arg.replace(/ calldata
|
525
|
+
return params.map((arg) => arg.replace(/ calldata /, " memory ")).map((arg) => {
|
530
526
|
const items = arg.split(" ");
|
531
|
-
const needsAux = items.length === 1 || items.length === 2 && ["memory"
|
532
|
-
return needsAux ? `${arg} ${
|
527
|
+
const needsAux = items.length === 1 || items.length === 2 && items[1] === "memory";
|
528
|
+
return needsAux ? `${arg} __aux${auxCount++}` : arg;
|
533
529
|
});
|
534
530
|
}
|
535
531
|
|