From ddb1364e064a3afa5b0f04f1f7be0af5a840a7c2 Mon Sep 17 00:00:00 2001 From: Vicente Dragicevic <3252614+vdrg@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:32:26 +0900 Subject: [PATCH 01/10] Add staticcall to SystemCall and WorldContextProviderLib --- packages/world/src/SystemCall.sol | 48 +++++++++++++++++++++++++++++ packages/world/src/WorldContext.sol | 16 ++++++++++ 2 files changed, 64 insertions(+) diff --git a/packages/world/src/SystemCall.sol b/packages/world/src/SystemCall.sol index ac984fe3da..35831f6f0d 100644 --- a/packages/world/src/SystemCall.sol +++ b/packages/world/src/SystemCall.sol @@ -74,6 +74,54 @@ library SystemCall { }); } + /** + * @notice Makes a staticcall to a system identified by its Resource ID while ensuring necessary access controls. + * @dev This function does not revert if the system staticcall fails. Instead, it returns a success flag. + * @param caller The address initiating the system staticcall. + * @param systemId The unique Resource ID of the system being called. + * @param callData The calldata to be executed in the system. + * @return success A flag indicating whether the system staticcall was successful. + * @return data The return data from the system staticcall. + */ + function staticcall( + address caller, + ResourceId systemId, + bytes memory callData + ) internal view returns (bool success, bytes memory data) { + // Load the system data + (address systemAddress, bool publicAccess) = Systems._get(systemId); + + // Check if the system exists + if (systemAddress == address(0)) revert IWorldErrors.World_ResourceNotFound(systemId, systemId.toString()); + + // Allow access if the system is public or the caller has access to the namespace or name + if (!publicAccess) AccessControl._requireAccess(systemId, caller); + + // Call the system and forward any return data + (success, data) = WorldContextProviderLib.staticcallWithContext({ + msgSender: caller, + target: systemAddress, + callData: callData + }); + } + + /** + * @notice Makes a staticcall to a system identified by its Resource ID, ensures access controls, and reverts on failure. + * @param caller The address initiating the system staticcall. + * @param systemId The unique Resource ID of the system being called. + * @param callData The calldata to be executed in the system. + * @return data The return data from the system staticcall. + */ + function staticcallOrRevert( + address caller, + ResourceId systemId, + bytes memory callData + ) internal view returns (bytes memory data) { + (bool success, bytes memory returnData) = staticcall({ caller: caller, systemId: systemId, callData: callData }); + if (!success) revertWithBytes(returnData); + return returnData; + } + /** * @notice Calls a system identified by its Resource ID, ensuring access controls, and triggers associated system hooks. * @dev This function does not revert if the system call fails. Instead, it returns a success flag. diff --git a/packages/world/src/WorldContext.sol b/packages/world/src/WorldContext.sol index be7be9f7ae..92b1adb12d 100644 --- a/packages/world/src/WorldContext.sol +++ b/packages/world/src/WorldContext.sol @@ -139,6 +139,22 @@ library WorldContextProviderLib { ); } + /** + * @notice Makes a staticcall to the target contract with context values appended to the calldata. + * @param msgSender The address of the transaction sender. + * @param target The address of the contract to call. + * @param callData The calldata for the call. + * @return success A boolean indicating whether the call was successful or not. + * @return data The abi encoded return data from the call. + */ + function staticcallWithContext( + address msgSender, + address target, + bytes memory callData + ) internal view returns (bool success, bytes memory data) { + (success, data) = target.staticcall(appendContext({ callData: callData, msgSender: msgSender, msgValue: 0 })); + } + /** * @notice Makes a delegatecall to the target contract with context values appended to the calldata. * @param msgSender The address of the transaction sender. From f834da60f40edc0efd0c7b727dc5767d13844bac Mon Sep 17 00:00:00 2001 From: Vicente Dragicevic <3252614+vdrg@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:55:55 +0900 Subject: [PATCH 02/10] Update comment and prevent staticcalls to root namespaces --- packages/world/src/SystemCall.sol | 3 +++ packages/world/src/WorldContext.sol | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/world/src/SystemCall.sol b/packages/world/src/SystemCall.sol index 35831f6f0d..5234aa0af1 100644 --- a/packages/world/src/SystemCall.sol +++ b/packages/world/src/SystemCall.sol @@ -94,6 +94,9 @@ library SystemCall { // Check if the system exists if (systemAddress == address(0)) revert IWorldErrors.World_ResourceNotFound(systemId, systemId.toString()); + // Staticcalls are not supported for root systems + if (systemId.getNamespace() == ROOT_NAMESPACE) revert IWorldErrors.World_InvalidNamespace(ROOT_NAMESPACE); + // Allow access if the system is public or the caller has access to the namespace or name if (!publicAccess) AccessControl._requireAccess(systemId, caller); diff --git a/packages/world/src/WorldContext.sol b/packages/world/src/WorldContext.sol index 92b1adb12d..92637732c1 100644 --- a/packages/world/src/WorldContext.sol +++ b/packages/world/src/WorldContext.sol @@ -143,9 +143,9 @@ library WorldContextProviderLib { * @notice Makes a staticcall to the target contract with context values appended to the calldata. * @param msgSender The address of the transaction sender. * @param target The address of the contract to call. - * @param callData The calldata for the call. - * @return success A boolean indicating whether the call was successful or not. - * @return data The abi encoded return data from the call. + * @param callData The calldata for the staticcall. + * @return success A boolean indicating whether the staticcall was successful or not. + * @return data The abi encoded return data from the staticcall. */ function staticcallWithContext( address msgSender, From 1b3e48266eda884cff73133b9bb29f02aaeb52cc Mon Sep 17 00:00:00 2001 From: V <3252614+vdrg@users.noreply.github.com> Date: Fri, 22 Nov 2024 03:57:40 -0300 Subject: [PATCH 03/10] Create yellow-trains-do.md --- .changeset/yellow-trains-do.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/yellow-trains-do.md diff --git a/.changeset/yellow-trains-do.md b/.changeset/yellow-trains-do.md new file mode 100644 index 0000000000..a642ad1e2d --- /dev/null +++ b/.changeset/yellow-trains-do.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/world": patch +--- + +Add a SystemCall.staticcall function that performs a staticcall without executing hooks. From 3578ec0c87349ffdc0e483960498a06c49ce2c83 Mon Sep 17 00:00:00 2001 From: Vicente Dragicevic <3252614+vdrg@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:07:00 +0900 Subject: [PATCH 04/10] Update docs --- .../world/reference/internal/systemcall.mdx | 55 +++++++++++++++++++ docs/pages/world/reference/world-context.mdx | 27 +++++++++ 2 files changed, 82 insertions(+) diff --git a/docs/pages/world/reference/internal/systemcall.mdx b/docs/pages/world/reference/internal/systemcall.mdx index 2dafd8a466..f442c3ad21 100644 --- a/docs/pages/world/reference/internal/systemcall.mdx +++ b/docs/pages/world/reference/internal/systemcall.mdx @@ -42,6 +42,61 @@ function call( | `success` | `bool` | A flag indicating whether the system call was successful. | | `data` | `bytes` | The return data from the system call. | +#### staticcall + +Makes a staticcall to a system identified by its Resource ID while ensuring necessary access controls. + +_This function does not revert if the system staticcall fails. Instead, it returns a success flag._ + +```solidity +function staticcall( + address caller, + ResourceId systemId, + bytes memory callData +) internal view returns (bool success, bytes memory data); +``` + +**Parameters** + +| Name | Type | Description | +| ---------- | ------------ | -------------------------------------------------- | +| `caller` | `address` | The address initiating the system staticcall. | +| `systemId` | `ResourceId` | The unique Resource ID of the system being called. | +| `callData` | `bytes` | The calldata to be executed in the system. | + +**Returns** + +| Name | Type | Description | +| --------- | ------- | --------------------------------------------------------------- | +| `success` | `bool` | A flag indicating whether the system staticcall was successful. | +| `data` | `bytes` | The return data from the system staticcall. | + +#### staticcallOrRevert + +Makes a staticcall to a system identified by its Resource ID, ensures access controls, and reverts on failure. + +```solidity +function staticcallOrRevert( + address caller, + ResourceId systemId, + bytes memory callData +) internal view returns (bytes memory data); +``` + +**Parameters** + +| Name | Type | Description | +| ---------- | ------------ | -------------------------------------------------- | +| `caller` | `address` | The address initiating the system staticcall. | +| `systemId` | `ResourceId` | The unique Resource ID of the system being called. | +| `callData` | `bytes` | The calldata to be executed in the system. | + +**Returns** + +| Name | Type | Description | +| ------ | ------- | ------------------------------------------- | +| `data` | `bytes` | The return data from the system staticcall. | + #### callWithHooks Calls a system identified by its Resource ID, ensuring access controls, and triggers associated system hooks. diff --git a/docs/pages/world/reference/world-context.mdx b/docs/pages/world/reference/world-context.mdx index 512d8a7253..aca58289d0 100644 --- a/docs/pages/world/reference/world-context.mdx +++ b/docs/pages/world/reference/world-context.mdx @@ -198,6 +198,33 @@ function callWithContext( | `success` | `bool` | A boolean indicating whether the call was successful or not. | | `data` | `bytes` | The abi encoded return data from the call. | +#### staticcallWithContext + +Makes a staticcall to the target contract with context values appended to the calldata. + +```solidity +function staticcallWithContext( + address msgSender, + address target, + bytes memory callData +) internal view returns (bool success, bytes memory data); +``` + +**Parameters** + +| Name | Type | Description | +| ----------- | --------- | -------------------------------------- | +| `msgSender` | `address` | The address of the transaction sender. | +| `target` | `address` | The address of the contract to call. | +| `callData` | `bytes` | The calldata for the staticcall. | + +**Returns** + +| Name | Type | Description | +| --------- | ------- | ------------------------------------------------------------------ | +| `success` | `bool` | A boolean indicating whether the staticcall was successful or not. | +| `data` | `bytes` | The abi encoded return data from the staticcall. | + #### delegatecallWithContext Makes a delegatecall to the target contract with context values appended to the calldata. From 421cbeeff177f137a320c4083ae876756f2b0242 Mon Sep 17 00:00:00 2001 From: Vicente Dragicevic <3252614+vdrg@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:17:28 +0900 Subject: [PATCH 05/10] Update store test snapshot --- packages/store/ts/flattenStoreLogs.test.ts | 105 ++++++++++++- packages/store/ts/getStoreLogs.test.ts | 165 +++++++++++++++++---- 2 files changed, 242 insertions(+), 28 deletions(-) diff --git a/packages/store/ts/flattenStoreLogs.test.ts b/packages/store/ts/flattenStoreLogs.test.ts index 837b9deb9e..d9f7df77ef 100644 --- a/packages/store/ts/flattenStoreLogs.test.ts +++ b/packages/store/ts/flattenStoreLogs.test.ts @@ -121,6 +121,107 @@ describe("flattenStoreLogs", async () => { "Store_SetRecord world__InstalledModules (0x0000000000000000000000009fcc45958071325949b488a784268371f17cb2d7,0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470)", "Store_SetRecord world__NamespaceOwner (0x6e73000000000000000000000000000000000000000000000000000000000000)", "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266)", + "Store_SetRecord world__InitModuleAddres ()", + "Store_SetRecord store__Tables (0x746273746f72650000000000000000005461626c657300000000000000000000)", + "Store_SetRecord store__Tables (0x746273746f72650000000000000000005265736f757263654964730000000000)", + "Store_SetRecord store__ResourceIds (0x746273746f72650000000000000000005461626c657300000000000000000000)", + "Store_SetRecord store__ResourceIds (0x746273746f72650000000000000000005265736f757263654964730000000000)", + "Store_SetRecord store__Tables (0x746273746f726500000000000000000053746f7265486f6f6b73000000000000)", + "Store_SetRecord store__ResourceIds (0x746273746f726500000000000000000053746f7265486f6f6b73000000000000)", + "Store_SetRecord store__Tables (0x7462776f726c640000000000000000004e616d6573706163654f776e65720000)", + "Store_SetRecord store__ResourceIds (0x7462776f726c640000000000000000004e616d6573706163654f776e65720000)", + "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000042616c616e6365730000000000000000)", + "Store_SetRecord store__ResourceIds (0x7462776f726c6400000000000000000042616c616e6365730000000000000000)", + "Store_SetRecord store__Tables (0x7462776f726c64000000000000000000496e7374616c6c65644d6f64756c6573)", + "Store_SetRecord store__ResourceIds (0x7462776f726c64000000000000000000496e7374616c6c65644d6f64756c6573)", + "Store_SetRecord store__Tables (0x7462776f726c640000000000000000005573657244656c65676174696f6e436f)", + "Store_SetRecord store__ResourceIds (0x7462776f726c640000000000000000005573657244656c65676174696f6e436f)", + "Store_SetRecord store__Tables (0x7462776f726c640000000000000000004e616d65737061636544656c65676174)", + "Store_SetRecord store__ResourceIds (0x7462776f726c640000000000000000004e616d65737061636544656c65676174)", + "Store_SetRecord store__Tables (0x7462776f726c640000000000000000005265736f757263654163636573730000)", + "Store_SetRecord store__ResourceIds (0x7462776f726c640000000000000000005265736f757263654163636573730000)", + "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000053797374656d73000000000000000000)", + "Store_SetRecord store__ResourceIds (0x7462776f726c6400000000000000000053797374656d73000000000000000000)", + "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000046756e6374696f6e53656c6563746f72)", + "Store_SetRecord store__ResourceIds (0x7462776f726c6400000000000000000046756e6374696f6e53656c6563746f72)", + "Store_SetRecord store__Tables (0x6f74776f726c6400000000000000000046756e6374696f6e5369676e61747572)", + "Store_SetRecord store__ResourceIds (0x6f74776f726c6400000000000000000046756e6374696f6e5369676e61747572)", + "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000053797374656d486f6f6b730000000000)", + "Store_SetRecord store__ResourceIds (0x7462776f726c6400000000000000000053797374656d486f6f6b730000000000)", + "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000053797374656d52656769737472790000)", + "Store_SetRecord store__ResourceIds (0x7462776f726c6400000000000000000053797374656d52656769737472790000)", + "Store_SetRecord store__Tables (0x7462776f726c64000000000000000000496e69744d6f64756c65416464726573)", + "Store_SetRecord store__ResourceIds (0x7462776f726c64000000000000000000496e69744d6f64756c65416464726573)", + "Store_SetRecord store__ResourceIds (0x6e73000000000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord store__ResourceIds (0x6e7373746f726500000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__NamespaceOwner (0x6e7373746f726500000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__ResourceAccess (0x6e7373746f726500000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", + "Store_SetRecord store__ResourceIds (0x6e73776f726c6400000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__NamespaceOwner (0x6e73776f726c6400000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__ResourceAccess (0x6e73776f726c6400000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", + "Store_SetRecord store__ResourceIds (0x737900000000000000000000000000004163636573734d616e6167656d656e74)", + "Store_SetRecord world__Systems (0x737900000000000000000000000000004163636573734d616e6167656d656e74)", + "Store_SetRecord world__SystemRegistry (0x00000000000000000000000073e872dcf77241b6d2afe4169ac27f9d31767292)", + "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000073e872dcf77241b6d2afe4169ac27f9d31767292)", + "Store_SetRecord store__ResourceIds (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", + "Store_SetRecord world__Systems (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", + "Store_SetRecord world__SystemRegistry (0x00000000000000000000000050418155710200d0266e683a93209aa60501b7b3)", + "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000050418155710200d0266e683a93209aa60501b7b3)", + "Store_SetRecord store__ResourceIds (0x73790000000000000000000000000000426174636843616c6c00000000000000)", + "Store_SetRecord world__Systems (0x73790000000000000000000000000000426174636843616c6c00000000000000)", + "Store_SetRecord world__SystemRegistry (0x0000000000000000000000002aac36425e74ff6c0778da582c55176394a067b0)", + "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000002aac36425e74ff6c0778da582c55176394a067b0)", + "Store_SetRecord store__ResourceIds (0x73790000000000000000000000000000526567697374726174696f6e00000000)", + "Store_SetRecord world__Systems (0x73790000000000000000000000000000526567697374726174696f6e00000000)", + "Store_SetRecord world__SystemRegistry (0x000000000000000000000000047f80b91559887ab304519858c0bce90f2a00a6)", + "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000047f80b91559887ab304519858c0bce90f2a00a6)", + "Store_SetRecord world__FunctionSelector (0x40554c3a00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x40554c3a00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x8d53b20800000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x8d53b20800000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xef5d6bbb00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xef5d6bbb00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x219adc2e00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x219adc2e00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xc9c85a6000000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xc9c85a6000000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x45afd19900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x45afd19900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xce5e8dd900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xce5e8dd900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x8fc8cf7e00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x8fc8cf7e00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x8da798da00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x8da798da00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x0ba51f4900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x0ba51f4900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x530f4b6000000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x530f4b6000000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x0560912900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x0560912900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xb29e408900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xb29e408900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xd5f8337f00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xd5f8337f00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xa92813ad00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xa92813ad00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x3350b6a900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x3350b6a900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x26d9810200000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x26d9810200000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x6548a90a00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x6548a90a00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x1d2257ba00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x1d2257ba00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xcdc938c500000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xcdc938c500000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xbfdfaff700000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xbfdfaff700000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xaa66e9c800000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xaa66e9c800000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__InstalledModules (0x0000000000000000000000009fcc45958071325949b488a784268371f17cb2d7,0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470)", + "Store_SetRecord world__NamespaceOwner (0x6e73000000000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266)", "Store_SetRecord store__Tables (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", "Store_SetRecord store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", "Store_SetRecord store__Tables (0x746200000000000000000000000000004865616c746800000000000000000000)", @@ -135,8 +236,8 @@ describe("flattenStoreLogs", async () => { "Store_SetRecord store__ResourceIds (0x746200000000000000000000000000005465727261696e000000000000000000)", "Store_SetRecord store__ResourceIds (0x737900000000000000000000000000004d6f766553797374656d000000000000)", "Store_SetRecord world__Systems (0x737900000000000000000000000000004d6f766553797374656d000000000000)", - "Store_SetRecord world__SystemRegistry (0x000000000000000000000000c3082aa42cf81d515c45c3c2c59775f71dfe987c)", - "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000c3082aa42cf81d515c45c3c2c59775f71dfe987c)", + "Store_SetRecord world__SystemRegistry (0x00000000000000000000000008f2b45d8787be8a81869d9968f25323861352b0)", + "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000008f2b45d8787be8a81869d9968f25323861352b0)", "Store_SetRecord world__FunctionSelector (0xb591186e00000000000000000000000000000000000000000000000000000000)", "Store_SetRecord world__FunctionSignatur (0xb591186e00000000000000000000000000000000000000000000000000000000)", "Store_SetRecord store__Tables (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", diff --git a/packages/store/ts/getStoreLogs.test.ts b/packages/store/ts/getStoreLogs.test.ts index 51c45476f4..d1a2617cd1 100644 --- a/packages/store/ts/getStoreLogs.test.ts +++ b/packages/store/ts/getStoreLogs.test.ts @@ -144,6 +144,132 @@ describe("getStoreLogs", async () => { "Store_SpliceStaticData world__NamespaceOwner (0x6e73000000000000000000000000000000000000000000000000000000000000)", "Store_DeleteRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266)", + "Store_SpliceStaticData world__InitModuleAddres ()", + "Store_SetRecord store__Tables (0x746273746f72650000000000000000005461626c657300000000000000000000)", + "Store_SetRecord store__Tables (0x746273746f72650000000000000000005265736f757263654964730000000000)", + "Store_SpliceStaticData store__ResourceIds (0x746273746f72650000000000000000005461626c657300000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x746273746f72650000000000000000005265736f757263654964730000000000)", + "Store_SetRecord store__Tables (0x746273746f726500000000000000000053746f7265486f6f6b73000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x746273746f726500000000000000000053746f7265486f6f6b73000000000000)", + "Store_SetRecord store__Tables (0x7462776f726c640000000000000000004e616d6573706163654f776e65720000)", + "Store_SpliceStaticData store__ResourceIds (0x7462776f726c640000000000000000004e616d6573706163654f776e65720000)", + "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000042616c616e6365730000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462776f726c6400000000000000000042616c616e6365730000000000000000)", + "Store_SetRecord store__Tables (0x7462776f726c64000000000000000000496e7374616c6c65644d6f64756c6573)", + "Store_SpliceStaticData store__ResourceIds (0x7462776f726c64000000000000000000496e7374616c6c65644d6f64756c6573)", + "Store_SetRecord store__Tables (0x7462776f726c640000000000000000005573657244656c65676174696f6e436f)", + "Store_SpliceStaticData store__ResourceIds (0x7462776f726c640000000000000000005573657244656c65676174696f6e436f)", + "Store_SetRecord store__Tables (0x7462776f726c640000000000000000004e616d65737061636544656c65676174)", + "Store_SpliceStaticData store__ResourceIds (0x7462776f726c640000000000000000004e616d65737061636544656c65676174)", + "Store_SetRecord store__Tables (0x7462776f726c640000000000000000005265736f757263654163636573730000)", + "Store_SpliceStaticData store__ResourceIds (0x7462776f726c640000000000000000005265736f757263654163636573730000)", + "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000053797374656d73000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462776f726c6400000000000000000053797374656d73000000000000000000)", + "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000046756e6374696f6e53656c6563746f72)", + "Store_SpliceStaticData store__ResourceIds (0x7462776f726c6400000000000000000046756e6374696f6e53656c6563746f72)", + "Store_SetRecord store__Tables (0x6f74776f726c6400000000000000000046756e6374696f6e5369676e61747572)", + "Store_SpliceStaticData store__ResourceIds (0x6f74776f726c6400000000000000000046756e6374696f6e5369676e61747572)", + "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000053797374656d486f6f6b730000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462776f726c6400000000000000000053797374656d486f6f6b730000000000)", + "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000053797374656d52656769737472790000)", + "Store_SpliceStaticData store__ResourceIds (0x7462776f726c6400000000000000000053797374656d52656769737472790000)", + "Store_SetRecord store__Tables (0x7462776f726c64000000000000000000496e69744d6f64756c65416464726573)", + "Store_SpliceStaticData store__ResourceIds (0x7462776f726c64000000000000000000496e69744d6f64756c65416464726573)", + "Store_SpliceStaticData store__ResourceIds (0x6e73000000000000000000000000000000000000000000000000000000000000)", + "Store_SpliceStaticData world__NamespaceOwner (0x6e73000000000000000000000000000000000000000000000000000000000000)", + "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", + "Store_SpliceStaticData store__ResourceIds (0x6e7373746f726500000000000000000000000000000000000000000000000000)", + "Store_SpliceStaticData world__NamespaceOwner (0x6e7373746f726500000000000000000000000000000000000000000000000000)", + "Store_SpliceStaticData world__ResourceAccess (0x6e7373746f726500000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", + "Store_SpliceStaticData store__ResourceIds (0x6e73776f726c6400000000000000000000000000000000000000000000000000)", + "Store_SpliceStaticData world__NamespaceOwner (0x6e73776f726c6400000000000000000000000000000000000000000000000000)", + "Store_SpliceStaticData world__ResourceAccess (0x6e73776f726c6400000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", + "Store_SpliceStaticData store__ResourceIds (0x737900000000000000000000000000004163636573734d616e6167656d656e74)", + "Store_SetRecord world__Systems (0x737900000000000000000000000000004163636573734d616e6167656d656e74)", + "Store_SpliceStaticData world__SystemRegistry (0x00000000000000000000000073e872dcf77241b6d2afe4169ac27f9d31767292)", + "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000073e872dcf77241b6d2afe4169ac27f9d31767292)", + "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", + "Store_SetRecord world__Systems (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", + "Store_SpliceStaticData world__SystemRegistry (0x00000000000000000000000050418155710200d0266e683a93209aa60501b7b3)", + "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000050418155710200d0266e683a93209aa60501b7b3)", + "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000426174636843616c6c00000000000000)", + "Store_SetRecord world__Systems (0x73790000000000000000000000000000426174636843616c6c00000000000000)", + "Store_SpliceStaticData world__SystemRegistry (0x0000000000000000000000002aac36425e74ff6c0778da582c55176394a067b0)", + "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000002aac36425e74ff6c0778da582c55176394a067b0)", + "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000526567697374726174696f6e00000000)", + "Store_SetRecord world__Systems (0x73790000000000000000000000000000526567697374726174696f6e00000000)", + "Store_SpliceStaticData world__SystemRegistry (0x000000000000000000000000047f80b91559887ab304519858c0bce90f2a00a6)", + "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000047f80b91559887ab304519858c0bce90f2a00a6)", + "Store_SetRecord world__FunctionSelector (0x40554c3a00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x40554c3a00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x40554c3a00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x8d53b20800000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x8d53b20800000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x8d53b20800000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xef5d6bbb00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xef5d6bbb00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xef5d6bbb00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x219adc2e00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x219adc2e00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x219adc2e00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xc9c85a6000000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xc9c85a6000000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xc9c85a6000000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x45afd19900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x45afd19900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x45afd19900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xce5e8dd900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xce5e8dd900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xce5e8dd900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x8fc8cf7e00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x8fc8cf7e00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x8fc8cf7e00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x8da798da00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x8da798da00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x8da798da00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x0ba51f4900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x0ba51f4900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x0ba51f4900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x530f4b6000000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x530f4b6000000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x530f4b6000000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x0560912900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x0560912900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x0560912900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xb29e408900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xb29e408900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xb29e408900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xd5f8337f00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xd5f8337f00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xd5f8337f00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xa92813ad00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xa92813ad00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xa92813ad00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x3350b6a900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x3350b6a900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x3350b6a900000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x26d9810200000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x26d9810200000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x26d9810200000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x6548a90a00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x6548a90a00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x6548a90a00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0x1d2257ba00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x1d2257ba00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0x1d2257ba00000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xcdc938c500000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xcdc938c500000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xcdc938c500000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xbfdfaff700000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xbfdfaff700000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xbfdfaff700000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSelector (0xaa66e9c800000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xaa66e9c800000000000000000000000000000000000000000000000000000000)", + "Store_SetRecord world__FunctionSignatur (0xaa66e9c800000000000000000000000000000000000000000000000000000000)", + "Store_SpliceStaticData world__InstalledModules (0x0000000000000000000000009fcc45958071325949b488a784268371f17cb2d7,0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470)", + "Store_SpliceStaticData world__NamespaceOwner (0x6e73000000000000000000000000000000000000000000000000000000000000)", + "Store_DeleteRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", + "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266)", "Store_SetRecord store__Tables (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", "Store_SetRecord store__Tables (0x746200000000000000000000000000004865616c746800000000000000000000)", @@ -158,8 +284,8 @@ describe("getStoreLogs", async () => { "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000005465727261696e000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x737900000000000000000000000000004d6f766553797374656d000000000000)", "Store_SetRecord world__Systems (0x737900000000000000000000000000004d6f766553797374656d000000000000)", - "Store_SpliceStaticData world__SystemRegistry (0x000000000000000000000000c3082aa42cf81d515c45c3c2c59775f71dfe987c)", - "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000c3082aa42cf81d515c45c3c2c59775f71dfe987c)", + "Store_SpliceStaticData world__SystemRegistry (0x00000000000000000000000008f2b45d8787be8a81869d9968f25323861352b0)", + "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000008f2b45d8787be8a81869d9968f25323861352b0)", "Store_SetRecord world__FunctionSelector (0xb591186e00000000000000000000000000000000000000000000000000000000)", "Store_SetRecord world__FunctionSignatur (0xb591186e00000000000000000000000000000000000000000000000000000000)", "Store_SetRecord world__FunctionSignatur (0xb591186e00000000000000000000000000000000000000000000000000000000)", @@ -239,18 +365,13 @@ describe("getStoreLogs", async () => { "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000426174636843616c6c00000000000000)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000526567697374726174696f6e00000000)", - "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000496e76656e746f727900000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000005465727261696e000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x737900000000000000000000000000004d6f766553797374656d000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000044656c65676174696f6e000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x6e736d6574616461746100000000000000000000000000000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x74626d657461646174610000000000005265736f757263655461670000000000)", - "Store_SpliceStaticData store__ResourceIds (0x73796d657461646174610000000000004d6574616461746153797374656d0000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", + "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000044656c65676174696f6e000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", ] `); }); @@ -300,26 +421,18 @@ describe("getStoreLogs", async () => { "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000426174636843616c6c00000000000000)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000526567697374726174696f6e00000000)", - "Store_SetRecord store__Tables (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", - "Store_SetRecord store__Tables (0x746200000000000000000000000000004865616c746800000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", - "Store_SetRecord store__Tables (0x74620000000000000000000000000000496e76656e746f727900000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000496e76656e746f727900000000000000)", - "Store_SetRecord store__Tables (0x7462000000000000000000000000000053636f72650000000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", - "Store_SetRecord store__Tables (0x7462000000000000000000000000000057696e6e657200000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", "Store_SetRecord store__Tables (0x746200000000000000000000000000005465727261696e000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000005465727261696e000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x737900000000000000000000000000004d6f766553797374656d000000000000)", + "Store_SetRecord store__Tables (0x7462000000000000000000000000000057696e6e657200000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", "Store_SetRecord store__Tables (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000044656c65676174696f6e000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x6e736d6574616461746100000000000000000000000000000000000000000000)", - "Store_SetRecord store__Tables (0x74626d657461646174610000000000005265736f757263655461670000000000)", - "Store_SpliceStaticData store__ResourceIds (0x74626d657461646174610000000000005265736f757263655461670000000000)", - "Store_SpliceStaticData store__ResourceIds (0x73796d657461646174610000000000004d6574616461746153797374656d0000)", + "Store_SetRecord store__Tables (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", + "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000044656c65676174696f6e000000000000)", + "Store_SetRecord store__Tables (0x746200000000000000000000000000004865616c746800000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", ] `); }); From b62792fffda75b467bf2702148f6093286faec59 Mon Sep 17 00:00:00 2001 From: Vicente Dragicevic <3252614+vdrg@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:30:42 +0900 Subject: [PATCH 06/10] Update store test snapshot --- packages/store/ts/flattenStoreLogs.test.ts | 101 ------------- packages/store/ts/getStoreLogs.test.ts | 163 +++------------------ 2 files changed, 24 insertions(+), 240 deletions(-) diff --git a/packages/store/ts/flattenStoreLogs.test.ts b/packages/store/ts/flattenStoreLogs.test.ts index d9f7df77ef..ad2ac5ddb1 100644 --- a/packages/store/ts/flattenStoreLogs.test.ts +++ b/packages/store/ts/flattenStoreLogs.test.ts @@ -121,107 +121,6 @@ describe("flattenStoreLogs", async () => { "Store_SetRecord world__InstalledModules (0x0000000000000000000000009fcc45958071325949b488a784268371f17cb2d7,0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470)", "Store_SetRecord world__NamespaceOwner (0x6e73000000000000000000000000000000000000000000000000000000000000)", "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266)", - "Store_SetRecord world__InitModuleAddres ()", - "Store_SetRecord store__Tables (0x746273746f72650000000000000000005461626c657300000000000000000000)", - "Store_SetRecord store__Tables (0x746273746f72650000000000000000005265736f757263654964730000000000)", - "Store_SetRecord store__ResourceIds (0x746273746f72650000000000000000005461626c657300000000000000000000)", - "Store_SetRecord store__ResourceIds (0x746273746f72650000000000000000005265736f757263654964730000000000)", - "Store_SetRecord store__Tables (0x746273746f726500000000000000000053746f7265486f6f6b73000000000000)", - "Store_SetRecord store__ResourceIds (0x746273746f726500000000000000000053746f7265486f6f6b73000000000000)", - "Store_SetRecord store__Tables (0x7462776f726c640000000000000000004e616d6573706163654f776e65720000)", - "Store_SetRecord store__ResourceIds (0x7462776f726c640000000000000000004e616d6573706163654f776e65720000)", - "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000042616c616e6365730000000000000000)", - "Store_SetRecord store__ResourceIds (0x7462776f726c6400000000000000000042616c616e6365730000000000000000)", - "Store_SetRecord store__Tables (0x7462776f726c64000000000000000000496e7374616c6c65644d6f64756c6573)", - "Store_SetRecord store__ResourceIds (0x7462776f726c64000000000000000000496e7374616c6c65644d6f64756c6573)", - "Store_SetRecord store__Tables (0x7462776f726c640000000000000000005573657244656c65676174696f6e436f)", - "Store_SetRecord store__ResourceIds (0x7462776f726c640000000000000000005573657244656c65676174696f6e436f)", - "Store_SetRecord store__Tables (0x7462776f726c640000000000000000004e616d65737061636544656c65676174)", - "Store_SetRecord store__ResourceIds (0x7462776f726c640000000000000000004e616d65737061636544656c65676174)", - "Store_SetRecord store__Tables (0x7462776f726c640000000000000000005265736f757263654163636573730000)", - "Store_SetRecord store__ResourceIds (0x7462776f726c640000000000000000005265736f757263654163636573730000)", - "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000053797374656d73000000000000000000)", - "Store_SetRecord store__ResourceIds (0x7462776f726c6400000000000000000053797374656d73000000000000000000)", - "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000046756e6374696f6e53656c6563746f72)", - "Store_SetRecord store__ResourceIds (0x7462776f726c6400000000000000000046756e6374696f6e53656c6563746f72)", - "Store_SetRecord store__Tables (0x6f74776f726c6400000000000000000046756e6374696f6e5369676e61747572)", - "Store_SetRecord store__ResourceIds (0x6f74776f726c6400000000000000000046756e6374696f6e5369676e61747572)", - "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000053797374656d486f6f6b730000000000)", - "Store_SetRecord store__ResourceIds (0x7462776f726c6400000000000000000053797374656d486f6f6b730000000000)", - "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000053797374656d52656769737472790000)", - "Store_SetRecord store__ResourceIds (0x7462776f726c6400000000000000000053797374656d52656769737472790000)", - "Store_SetRecord store__Tables (0x7462776f726c64000000000000000000496e69744d6f64756c65416464726573)", - "Store_SetRecord store__ResourceIds (0x7462776f726c64000000000000000000496e69744d6f64756c65416464726573)", - "Store_SetRecord store__ResourceIds (0x6e73000000000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord store__ResourceIds (0x6e7373746f726500000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__NamespaceOwner (0x6e7373746f726500000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__ResourceAccess (0x6e7373746f726500000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", - "Store_SetRecord store__ResourceIds (0x6e73776f726c6400000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__NamespaceOwner (0x6e73776f726c6400000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__ResourceAccess (0x6e73776f726c6400000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", - "Store_SetRecord store__ResourceIds (0x737900000000000000000000000000004163636573734d616e6167656d656e74)", - "Store_SetRecord world__Systems (0x737900000000000000000000000000004163636573734d616e6167656d656e74)", - "Store_SetRecord world__SystemRegistry (0x00000000000000000000000073e872dcf77241b6d2afe4169ac27f9d31767292)", - "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000073e872dcf77241b6d2afe4169ac27f9d31767292)", - "Store_SetRecord store__ResourceIds (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", - "Store_SetRecord world__Systems (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", - "Store_SetRecord world__SystemRegistry (0x00000000000000000000000050418155710200d0266e683a93209aa60501b7b3)", - "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000050418155710200d0266e683a93209aa60501b7b3)", - "Store_SetRecord store__ResourceIds (0x73790000000000000000000000000000426174636843616c6c00000000000000)", - "Store_SetRecord world__Systems (0x73790000000000000000000000000000426174636843616c6c00000000000000)", - "Store_SetRecord world__SystemRegistry (0x0000000000000000000000002aac36425e74ff6c0778da582c55176394a067b0)", - "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000002aac36425e74ff6c0778da582c55176394a067b0)", - "Store_SetRecord store__ResourceIds (0x73790000000000000000000000000000526567697374726174696f6e00000000)", - "Store_SetRecord world__Systems (0x73790000000000000000000000000000526567697374726174696f6e00000000)", - "Store_SetRecord world__SystemRegistry (0x000000000000000000000000047f80b91559887ab304519858c0bce90f2a00a6)", - "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000047f80b91559887ab304519858c0bce90f2a00a6)", - "Store_SetRecord world__FunctionSelector (0x40554c3a00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x40554c3a00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x8d53b20800000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x8d53b20800000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xef5d6bbb00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xef5d6bbb00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x219adc2e00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x219adc2e00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xc9c85a6000000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xc9c85a6000000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x45afd19900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x45afd19900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xce5e8dd900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xce5e8dd900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x8fc8cf7e00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x8fc8cf7e00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x8da798da00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x8da798da00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x0ba51f4900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x0ba51f4900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x530f4b6000000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x530f4b6000000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x0560912900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x0560912900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xb29e408900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xb29e408900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xd5f8337f00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xd5f8337f00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xa92813ad00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xa92813ad00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x3350b6a900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x3350b6a900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x26d9810200000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x26d9810200000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x6548a90a00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x6548a90a00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x1d2257ba00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x1d2257ba00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xcdc938c500000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xcdc938c500000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xbfdfaff700000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xbfdfaff700000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xaa66e9c800000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xaa66e9c800000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__InstalledModules (0x0000000000000000000000009fcc45958071325949b488a784268371f17cb2d7,0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470)", - "Store_SetRecord world__NamespaceOwner (0x6e73000000000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266)", "Store_SetRecord store__Tables (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", "Store_SetRecord store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", "Store_SetRecord store__Tables (0x746200000000000000000000000000004865616c746800000000000000000000)", diff --git a/packages/store/ts/getStoreLogs.test.ts b/packages/store/ts/getStoreLogs.test.ts index d1a2617cd1..024f7caddb 100644 --- a/packages/store/ts/getStoreLogs.test.ts +++ b/packages/store/ts/getStoreLogs.test.ts @@ -144,132 +144,6 @@ describe("getStoreLogs", async () => { "Store_SpliceStaticData world__NamespaceOwner (0x6e73000000000000000000000000000000000000000000000000000000000000)", "Store_DeleteRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266)", - "Store_SpliceStaticData world__InitModuleAddres ()", - "Store_SetRecord store__Tables (0x746273746f72650000000000000000005461626c657300000000000000000000)", - "Store_SetRecord store__Tables (0x746273746f72650000000000000000005265736f757263654964730000000000)", - "Store_SpliceStaticData store__ResourceIds (0x746273746f72650000000000000000005461626c657300000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x746273746f72650000000000000000005265736f757263654964730000000000)", - "Store_SetRecord store__Tables (0x746273746f726500000000000000000053746f7265486f6f6b73000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x746273746f726500000000000000000053746f7265486f6f6b73000000000000)", - "Store_SetRecord store__Tables (0x7462776f726c640000000000000000004e616d6573706163654f776e65720000)", - "Store_SpliceStaticData store__ResourceIds (0x7462776f726c640000000000000000004e616d6573706163654f776e65720000)", - "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000042616c616e6365730000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462776f726c6400000000000000000042616c616e6365730000000000000000)", - "Store_SetRecord store__Tables (0x7462776f726c64000000000000000000496e7374616c6c65644d6f64756c6573)", - "Store_SpliceStaticData store__ResourceIds (0x7462776f726c64000000000000000000496e7374616c6c65644d6f64756c6573)", - "Store_SetRecord store__Tables (0x7462776f726c640000000000000000005573657244656c65676174696f6e436f)", - "Store_SpliceStaticData store__ResourceIds (0x7462776f726c640000000000000000005573657244656c65676174696f6e436f)", - "Store_SetRecord store__Tables (0x7462776f726c640000000000000000004e616d65737061636544656c65676174)", - "Store_SpliceStaticData store__ResourceIds (0x7462776f726c640000000000000000004e616d65737061636544656c65676174)", - "Store_SetRecord store__Tables (0x7462776f726c640000000000000000005265736f757263654163636573730000)", - "Store_SpliceStaticData store__ResourceIds (0x7462776f726c640000000000000000005265736f757263654163636573730000)", - "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000053797374656d73000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462776f726c6400000000000000000053797374656d73000000000000000000)", - "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000046756e6374696f6e53656c6563746f72)", - "Store_SpliceStaticData store__ResourceIds (0x7462776f726c6400000000000000000046756e6374696f6e53656c6563746f72)", - "Store_SetRecord store__Tables (0x6f74776f726c6400000000000000000046756e6374696f6e5369676e61747572)", - "Store_SpliceStaticData store__ResourceIds (0x6f74776f726c6400000000000000000046756e6374696f6e5369676e61747572)", - "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000053797374656d486f6f6b730000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462776f726c6400000000000000000053797374656d486f6f6b730000000000)", - "Store_SetRecord store__Tables (0x7462776f726c6400000000000000000053797374656d52656769737472790000)", - "Store_SpliceStaticData store__ResourceIds (0x7462776f726c6400000000000000000053797374656d52656769737472790000)", - "Store_SetRecord store__Tables (0x7462776f726c64000000000000000000496e69744d6f64756c65416464726573)", - "Store_SpliceStaticData store__ResourceIds (0x7462776f726c64000000000000000000496e69744d6f64756c65416464726573)", - "Store_SpliceStaticData store__ResourceIds (0x6e73000000000000000000000000000000000000000000000000000000000000)", - "Store_SpliceStaticData world__NamespaceOwner (0x6e73000000000000000000000000000000000000000000000000000000000000)", - "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", - "Store_SpliceStaticData store__ResourceIds (0x6e7373746f726500000000000000000000000000000000000000000000000000)", - "Store_SpliceStaticData world__NamespaceOwner (0x6e7373746f726500000000000000000000000000000000000000000000000000)", - "Store_SpliceStaticData world__ResourceAccess (0x6e7373746f726500000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", - "Store_SpliceStaticData store__ResourceIds (0x6e73776f726c6400000000000000000000000000000000000000000000000000)", - "Store_SpliceStaticData world__NamespaceOwner (0x6e73776f726c6400000000000000000000000000000000000000000000000000)", - "Store_SpliceStaticData world__ResourceAccess (0x6e73776f726c6400000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", - "Store_SpliceStaticData store__ResourceIds (0x737900000000000000000000000000004163636573734d616e6167656d656e74)", - "Store_SetRecord world__Systems (0x737900000000000000000000000000004163636573734d616e6167656d656e74)", - "Store_SpliceStaticData world__SystemRegistry (0x00000000000000000000000073e872dcf77241b6d2afe4169ac27f9d31767292)", - "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000073e872dcf77241b6d2afe4169ac27f9d31767292)", - "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", - "Store_SetRecord world__Systems (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", - "Store_SpliceStaticData world__SystemRegistry (0x00000000000000000000000050418155710200d0266e683a93209aa60501b7b3)", - "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x00000000000000000000000050418155710200d0266e683a93209aa60501b7b3)", - "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000426174636843616c6c00000000000000)", - "Store_SetRecord world__Systems (0x73790000000000000000000000000000426174636843616c6c00000000000000)", - "Store_SpliceStaticData world__SystemRegistry (0x0000000000000000000000002aac36425e74ff6c0778da582c55176394a067b0)", - "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000002aac36425e74ff6c0778da582c55176394a067b0)", - "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000526567697374726174696f6e00000000)", - "Store_SetRecord world__Systems (0x73790000000000000000000000000000526567697374726174696f6e00000000)", - "Store_SpliceStaticData world__SystemRegistry (0x000000000000000000000000047f80b91559887ab304519858c0bce90f2a00a6)", - "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000047f80b91559887ab304519858c0bce90f2a00a6)", - "Store_SetRecord world__FunctionSelector (0x40554c3a00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x40554c3a00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x40554c3a00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x8d53b20800000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x8d53b20800000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x8d53b20800000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xef5d6bbb00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xef5d6bbb00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xef5d6bbb00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x219adc2e00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x219adc2e00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x219adc2e00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xc9c85a6000000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xc9c85a6000000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xc9c85a6000000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x45afd19900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x45afd19900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x45afd19900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xce5e8dd900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xce5e8dd900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xce5e8dd900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x8fc8cf7e00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x8fc8cf7e00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x8fc8cf7e00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x8da798da00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x8da798da00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x8da798da00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x0ba51f4900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x0ba51f4900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x0ba51f4900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x530f4b6000000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x530f4b6000000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x530f4b6000000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x0560912900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x0560912900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x0560912900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xb29e408900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xb29e408900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xb29e408900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xd5f8337f00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xd5f8337f00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xd5f8337f00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xa92813ad00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xa92813ad00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xa92813ad00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x3350b6a900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x3350b6a900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x3350b6a900000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x26d9810200000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x26d9810200000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x26d9810200000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x6548a90a00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x6548a90a00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x6548a90a00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0x1d2257ba00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x1d2257ba00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0x1d2257ba00000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xcdc938c500000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xcdc938c500000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xcdc938c500000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xbfdfaff700000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xbfdfaff700000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xbfdfaff700000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSelector (0xaa66e9c800000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xaa66e9c800000000000000000000000000000000000000000000000000000000)", - "Store_SetRecord world__FunctionSignatur (0xaa66e9c800000000000000000000000000000000000000000000000000000000)", - "Store_SpliceStaticData world__InstalledModules (0x0000000000000000000000009fcc45958071325949b488a784268371f17cb2d7,0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470)", - "Store_SpliceStaticData world__NamespaceOwner (0x6e73000000000000000000000000000000000000000000000000000000000000)", - "Store_DeleteRecord world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x0000000000000000000000008dc4168dc8e582f0ef5adbab3c0873856682639b)", - "Store_SpliceStaticData world__ResourceAccess (0x6e73000000000000000000000000000000000000000000000000000000000000,0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266)", "Store_SetRecord store__Tables (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", "Store_SetRecord store__Tables (0x746200000000000000000000000000004865616c746800000000000000000000)", @@ -365,13 +239,17 @@ describe("getStoreLogs", async () => { "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000426174636843616c6c00000000000000)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000526567697374726174696f6e00000000)", - "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000005465727261696e000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", - "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000044656c65676174696f6e000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", - "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000044656c65676174696f6e000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x737900000000000000000000000000004d6f766553797374656d000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x6e736d6574616461746100000000000000000000000000000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x74626d657461646174610000000000005265736f757263655461670000000000)", + "Store_SpliceStaticData store__ResourceIds (0x73796d657461646174610000000000004d6574616461746153797374656d0000)", "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", ] `); }); @@ -421,18 +299,25 @@ describe("getStoreLogs", async () => { "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000426174636843616c6c00000000000000)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000526567697374726174696f6e00000000)", - "Store_SetRecord store__Tables (0x746200000000000000000000000000005465727261696e000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000005465727261696e000000000000000000)", + "Store_SetRecord store__Tables (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", + "Store_SetRecord store__Tables (0x746200000000000000000000000000004865616c746800000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", + "Store_SetRecord store__Tables (0x7462000000000000000000000000000053636f72650000000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", "Store_SetRecord store__Tables (0x7462000000000000000000000000000057696e6e657200000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", - "Store_SetRecord store__Tables (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", - "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000044656c65676174696f6e000000000000)", - "Store_SetRecord store__Tables (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", - "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000044656c65676174696f6e000000000000)", + "Store_SetRecord store__Tables (0x7462000000000000000000000000000057696e6e657200000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x737900000000000000000000000000004d6f766553797374656d000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x6e736d6574616461746100000000000000000000000000000000000000000000)", + "Store_SetRecord store__Tables (0x74626d657461646174610000000000005265736f757263655461670000000000)", + "Store_SpliceStaticData store__ResourceIds (0x74626d657461646174610000000000005265736f757263655461670000000000)", + "Store_SpliceStaticData store__ResourceIds (0x73796d657461646174610000000000004d6574616461746153797374656d0000)", "Store_SetRecord store__Tables (0x746200000000000000000000000000004865616c746800000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", + "Store_SetRecord store__Tables (0x7462000000000000000000000000000053636f72650000000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", ] `); }); From b979b804d318df35485d47f92a243072044680d0 Mon Sep 17 00:00:00 2001 From: Vicente Dragicevic <3252614+vdrg@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:35:13 +0900 Subject: [PATCH 07/10] Update store test snapshot --- packages/store/ts/getStoreLogs.test.ts | 31 ++++++++++++-------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/packages/store/ts/getStoreLogs.test.ts b/packages/store/ts/getStoreLogs.test.ts index 024f7caddb..80573c045b 100644 --- a/packages/store/ts/getStoreLogs.test.ts +++ b/packages/store/ts/getStoreLogs.test.ts @@ -217,6 +217,8 @@ describe("getStoreLogs", async () => { }); expect(summarizeLogs(logs)).toMatchInlineSnapshot(` [ + "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x746273746f72650000000000000000005461626c657300000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x746273746f72650000000000000000005265736f757263654964730000000000)", "Store_SpliceStaticData store__ResourceIds (0x746273746f726500000000000000000053746f7265486f6f6b73000000000000)", @@ -239,17 +241,14 @@ describe("getStoreLogs", async () => { "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000426174636843616c6c00000000000000)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000526567697374726174696f6e00000000)", - "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x737900000000000000000000000000004d6f766553797374656d000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", + "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000044656c65676174696f6e000000000000)", "Store_SpliceStaticData store__ResourceIds (0x6e736d6574616461746100000000000000000000000000000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x74626d657461646174610000000000005265736f757263655461670000000000)", "Store_SpliceStaticData store__ResourceIds (0x73796d657461646174610000000000004d6574616461746153797374656d0000)", "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", ] `); }); @@ -262,6 +261,10 @@ describe("getStoreLogs", async () => { }); expect(summarizeLogs(logs)).toMatchInlineSnapshot(` [ + "Store_SetRecord store__Tables (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", + "Store_SetRecord store__Tables (0x7462000000000000000000000000000057696e6e657200000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", "Store_SetRecord store__Tables (0x746273746f72650000000000000000005461626c657300000000000000000000)", "Store_SetRecord store__Tables (0x746273746f72650000000000000000005265736f757263654964730000000000)", "Store_SpliceStaticData store__ResourceIds (0x746273746f72650000000000000000005461626c657300000000000000000000)", @@ -299,17 +302,9 @@ describe("getStoreLogs", async () => { "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000426174636843616c6c00000000000000)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000526567697374726174696f6e00000000)", - "Store_SetRecord store__Tables (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", - "Store_SetRecord store__Tables (0x746200000000000000000000000000004865616c746800000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", - "Store_SetRecord store__Tables (0x7462000000000000000000000000000053636f72650000000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", - "Store_SetRecord store__Tables (0x7462000000000000000000000000000057696e6e657200000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", - "Store_SetRecord store__Tables (0x7462000000000000000000000000000057696e6e657200000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x737900000000000000000000000000004d6f766553797374656d000000000000)", + "Store_SetRecord store__Tables (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", + "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000044656c65676174696f6e000000000000)", "Store_SpliceStaticData store__ResourceIds (0x6e736d6574616461746100000000000000000000000000000000000000000000)", "Store_SetRecord store__Tables (0x74626d657461646174610000000000005265736f757263655461670000000000)", "Store_SpliceStaticData store__ResourceIds (0x74626d657461646174610000000000005265736f757263655461670000000000)", @@ -318,6 +313,8 @@ describe("getStoreLogs", async () => { "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", "Store_SetRecord store__Tables (0x7462000000000000000000000000000053636f72650000000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", + "Store_SetRecord store__Tables (0x7462000000000000000000000000000057696e6e657200000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", ] `); }); From e333e2802baa916d6b82d476e08ffc61ad9d085d Mon Sep 17 00:00:00 2001 From: Vicente Dragicevic <3252614+vdrg@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:50:31 +0900 Subject: [PATCH 08/10] Clean and update store test snapshot again --- packages/store/ts/getStoreLogs.test.ts | 35 +++++++++++++++----------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/packages/store/ts/getStoreLogs.test.ts b/packages/store/ts/getStoreLogs.test.ts index 80573c045b..c818ec33a3 100644 --- a/packages/store/ts/getStoreLogs.test.ts +++ b/packages/store/ts/getStoreLogs.test.ts @@ -217,8 +217,6 @@ describe("getStoreLogs", async () => { }); expect(summarizeLogs(logs)).toMatchInlineSnapshot(` [ - "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x746273746f72650000000000000000005461626c657300000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x746273746f72650000000000000000005265736f757263654964730000000000)", "Store_SpliceStaticData store__ResourceIds (0x746273746f726500000000000000000053746f7265486f6f6b73000000000000)", @@ -241,14 +239,18 @@ describe("getStoreLogs", async () => { "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000426174636843616c6c00000000000000)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000526567697374726174696f6e00000000)", + "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000496e76656e746f727900000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000005465727261696e000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x737900000000000000000000000000004d6f766553797374656d000000000000)", "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000044656c65676174696f6e000000000000)", "Store_SpliceStaticData store__ResourceIds (0x6e736d6574616461746100000000000000000000000000000000000000000000)", "Store_SpliceStaticData store__ResourceIds (0x74626d657461646174610000000000005265736f757263655461670000000000)", "Store_SpliceStaticData store__ResourceIds (0x73796d657461646174610000000000004d6574616461746153797374656d0000)", - "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", ] `); }); @@ -261,10 +263,6 @@ describe("getStoreLogs", async () => { }); expect(summarizeLogs(logs)).toMatchInlineSnapshot(` [ - "Store_SetRecord store__Tables (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", - "Store_SetRecord store__Tables (0x7462000000000000000000000000000057696e6e657200000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", "Store_SetRecord store__Tables (0x746273746f72650000000000000000005461626c657300000000000000000000)", "Store_SetRecord store__Tables (0x746273746f72650000000000000000005265736f757263654964730000000000)", "Store_SpliceStaticData store__ResourceIds (0x746273746f72650000000000000000005461626c657300000000000000000000)", @@ -302,6 +300,19 @@ describe("getStoreLogs", async () => { "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000042616c616e63655472616e7366657200)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000426174636843616c6c00000000000000)", "Store_SpliceStaticData store__ResourceIds (0x73790000000000000000000000000000526567697374726174696f6e00000000)", + "Store_SetRecord store__Tables (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000506f736974696f6e0000000000000000)", + "Store_SetRecord store__Tables (0x746200000000000000000000000000004865616c746800000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", + "Store_SetRecord store__Tables (0x74620000000000000000000000000000496e76656e746f727900000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x74620000000000000000000000000000496e76656e746f727900000000000000)", + "Store_SetRecord store__Tables (0x7462000000000000000000000000000053636f72650000000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", + "Store_SetRecord store__Tables (0x7462000000000000000000000000000057696e6e657200000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", + "Store_SetRecord store__Tables (0x746200000000000000000000000000005465727261696e000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000005465727261696e000000000000000000)", + "Store_SpliceStaticData store__ResourceIds (0x737900000000000000000000000000004d6f766553797374656d000000000000)", "Store_SetRecord store__Tables (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000043616c6c576974685369676e61747572)", "Store_SpliceStaticData store__ResourceIds (0x7379000000000000000000000000000044656c65676174696f6e000000000000)", @@ -309,12 +320,6 @@ describe("getStoreLogs", async () => { "Store_SetRecord store__Tables (0x74626d657461646174610000000000005265736f757263655461670000000000)", "Store_SpliceStaticData store__ResourceIds (0x74626d657461646174610000000000005265736f757263655461670000000000)", "Store_SpliceStaticData store__ResourceIds (0x73796d657461646174610000000000004d6574616461746153797374656d0000)", - "Store_SetRecord store__Tables (0x746200000000000000000000000000004865616c746800000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x746200000000000000000000000000004865616c746800000000000000000000)", - "Store_SetRecord store__Tables (0x7462000000000000000000000000000053636f72650000000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000053636f72650000000000000000000000)", - "Store_SetRecord store__Tables (0x7462000000000000000000000000000057696e6e657200000000000000000000)", - "Store_SpliceStaticData store__ResourceIds (0x7462000000000000000000000000000057696e6e657200000000000000000000)", ] `); }); From 1d0094e789dce605888ae6d3279a67d868a7f4e2 Mon Sep 17 00:00:00 2001 From: Vicente Dragicevic <3252614+vdrg@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:45:40 -0300 Subject: [PATCH 09/10] Add more context to the comment about staticcalls not supported for root systems --- packages/world/src/SystemCall.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/world/src/SystemCall.sol b/packages/world/src/SystemCall.sol index 5234aa0af1..b869838299 100644 --- a/packages/world/src/SystemCall.sol +++ b/packages/world/src/SystemCall.sol @@ -94,7 +94,8 @@ library SystemCall { // Check if the system exists if (systemAddress == address(0)) revert IWorldErrors.World_ResourceNotFound(systemId, systemId.toString()); - // Staticcalls are not supported for root systems + // Staticcalls are not supported for root systems yet, as it would require a runtime check + // that we are in the context of a staticcall if (systemId.getNamespace() == ROOT_NAMESPACE) revert IWorldErrors.World_InvalidNamespace(ROOT_NAMESPACE); // Allow access if the system is public or the caller has access to the namespace or name From d1d1ca6b3f637faeaed4cac37b5911c8de0c8e8c Mon Sep 17 00:00:00 2001 From: Vicente Dragicevic <3252614+vdrg@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:46:50 -0300 Subject: [PATCH 10/10] Improve comment --- packages/world/src/SystemCall.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/world/src/SystemCall.sol b/packages/world/src/SystemCall.sol index b869838299..02bbc9575b 100644 --- a/packages/world/src/SystemCall.sol +++ b/packages/world/src/SystemCall.sol @@ -95,7 +95,7 @@ library SystemCall { if (systemAddress == address(0)) revert IWorldErrors.World_ResourceNotFound(systemId, systemId.toString()); // Staticcalls are not supported for root systems yet, as it would require a runtime check - // that we are in the context of a staticcall + // that we are in the context of a staticcall before performing the delegatecall if (systemId.getNamespace() == ROOT_NAMESPACE) revert IWorldErrors.World_InvalidNamespace(ROOT_NAMESPACE); // Allow access if the system is public or the caller has access to the namespace or name