@latticexyz/world-modules 2.0.0-main-212aeea9 → 2.0.0-main-3042f86e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/AccessControl.sol/AccessControl.json +1 -1
- package/out/AccessControlLib.sol/AccessControlLib.json +1 -1
- package/out/AccessManagementSystem.sol/AccessManagementSystem.json +1 -1
- package/out/AddressArray.sol/AddressArray.json +1 -1
- package/out/Allowances.sol/Allowances.json +1 -1
- package/out/BalanceTransferSystem.sol/BalanceTransferSystem.json +1 -1
- package/out/Balances.sol/Balances.json +1 -1
- package/out/BatchCallSystem.sol/BatchCallSystem.json +1 -1
- package/out/Bool.sol/Bool.json +1 -1
- package/out/CallboundDelegationControl.sol/CallboundDelegationControl.json +1 -1
- package/out/CallboundDelegations.sol/CallboundDelegations.json +1 -1
- package/out/Delegation.sol/Delegation.json +1 -1
- package/out/DelegationControl.sol/DelegationControl.json +1 -1
- package/out/DelegationControlMock.sol/DelegationControlMock.json +1 -1
- package/out/ERC20.t.sol/ERC20Test.json +1 -1
- package/out/ERC20Metadata.sol/ERC20Metadata.json +1 -1
- package/out/ERC20Module.sol/ERC20Module.json +1 -1
- package/out/ERC20Module.sol/ERC20ModuleRegistrationLibrary.json +1 -1
- package/out/ERC20Registry.sol/ERC20Registry.json +1 -1
- package/out/ERC20System.sol/ERC20System.json +1 -1
- package/out/ERC721.t.sol/ERC721Recipient.json +1 -1
- package/out/ERC721.t.sol/ERC721Test.json +1 -1
- package/out/ERC721.t.sol/ERC721TokenReceiver.json +1 -1
- package/out/ERC721.t.sol/NonERC721Recipient.json +1 -1
- package/out/ERC721.t.sol/RevertingERC721Recipient.json +1 -1
- package/out/ERC721.t.sol/WrongReturnDataERC721Recipient.json +1 -1
- package/out/ERC721Metadata.sol/ERC721Metadata.json +1 -1
- package/out/ERC721Module.sol/ERC721Module.json +1 -1
- package/out/ERC721Module.sol/ERC721ModuleRegistrationLibrary.json +1 -1
- package/out/ERC721Registry.sol/ERC721Registry.json +1 -1
- package/out/ERC721System.sol/ERC721System.json +1 -1
- package/out/FunctionSelectors.sol/FunctionSelectors.json +1 -1
- package/out/FunctionSignatures.sol/FunctionSignatures.json +1 -1
- package/out/Hook.sol/HookInstance.json +1 -1
- package/out/Hook.sol/HookLib.json +1 -1
- package/out/Hooks.sol/Hooks.json +1 -1
- package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.json +1 -1
- package/out/InitModule.sol/InitModule.json +1 -1
- package/out/InitModuleAddress.sol/InitModuleAddress.json +1 -1
- package/out/InstalledModules.sol/InstalledModules.json +1 -1
- package/out/KeysInTable.sol/KeysInTable.json +1 -1
- package/out/KeysInTableHook.sol/KeysInTableHook.json +1 -1
- package/out/KeysInTableModule.sol/KeysInTableModule.abi.json +0 -16
- package/out/KeysInTableModule.sol/KeysInTableModule.abi.json.d.ts +0 -16
- package/out/KeysInTableModule.sol/KeysInTableModule.json +1 -1
- package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.json +1 -1
- package/out/KeysWithValue.sol/KeysWithValue.json +1 -1
- package/out/KeysWithValueHook.sol/KeysWithValueHook.json +1 -1
- package/out/KeysWithValueModule.sol/KeysWithValueModule.abi.json +0 -16
- package/out/KeysWithValueModule.sol/KeysWithValueModule.abi.json.d.ts +0 -16
- package/out/KeysWithValueModule.sol/KeysWithValueModule.json +1 -1
- package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.json +1 -1
- package/out/Module.sol/Module.json +1 -1
- package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.json +1 -1
- package/out/NamespaceDelegationControl.sol/NamespaceDelegationControl.json +1 -1
- package/out/NamespaceOwner.sol/NamespaceOwner.json +1 -1
- package/out/OperatorApproval.sol/OperatorApproval.json +1 -1
- package/out/Owners.sol/Owners.json +1 -1
- package/out/Puppet.sol/Puppet.json +1 -1
- package/out/PuppetDelegationControl.sol/PuppetDelegationControl.json +1 -1
- package/out/PuppetFactorySystem.sol/PuppetFactorySystem.json +1 -1
- package/out/PuppetMaster.sol/PuppetMaster.json +1 -1
- package/out/PuppetModule.sol/PuppetModule.json +1 -1
- package/out/PuppetModule.t.sol/PuppetModuleTest.json +1 -1
- package/out/PuppetModule.t.sol/PuppetTestSystem.json +1 -1
- package/out/PuppetRegistry.sol/PuppetRegistry.json +1 -1
- package/out/RegistrationSystem.sol/RegistrationSystem.json +1 -1
- package/out/ResourceAccess.sol/ResourceAccess.json +1 -1
- package/out/ResourceIds.sol/ResourceIds.json +1 -1
- package/out/StandardDelegationsModule.sol/StandardDelegationsModule.json +1 -1
- package/out/StandardDelegationsModule.t.sol/StandardDelegationsModuleTest.json +1 -1
- package/out/StoreCore.sol/StoreCore.json +1 -1
- package/out/StoreCore.sol/StoreCoreInternal.json +1 -1
- package/out/StoreData.sol/StoreData.json +1 -1
- package/out/StoreHooks.sol/StoreHooks.json +1 -1
- package/out/StoreRead.sol/StoreRead.json +1 -1
- package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.json +1 -1
- package/out/StoreSwitch.sol/StoreSwitch.json +1 -1
- package/out/System.sol/System.json +1 -1
- package/out/SystemCall.sol/SystemCall.json +1 -1
- package/out/SystemHooks.sol/SystemHooks.json +1 -1
- package/out/SystemRegistry.sol/SystemRegistry.json +1 -1
- package/out/SystemSwitch.sol/SystemSwitch.json +1 -1
- package/out/SystemSwitch.t.sol/EchoSystem.json +1 -1
- package/out/SystemSwitch.t.sol/SystemSwitchTest.abi.json +0 -16
- package/out/SystemSwitch.t.sol/SystemSwitchTest.abi.json.d.ts +0 -16
- package/out/SystemSwitch.t.sol/SystemSwitchTest.json +1 -1
- package/out/SystemboundDelegationControl.sol/SystemboundDelegationControl.json +1 -1
- package/out/SystemboundDelegations.sol/SystemboundDelegations.json +1 -1
- package/out/Systems.sol/Systems.json +1 -1
- package/out/Tables.sol/Tables.json +1 -1
- package/out/TimeboundDelegationControl.sol/TimeboundDelegationControl.json +1 -1
- package/out/TimeboundDelegations.sol/TimeboundDelegations.json +1 -1
- package/out/TokenApproval.sol/TokenApproval.json +1 -1
- package/out/TokenURI.sol/TokenURI.json +1 -1
- package/out/TotalSupply.sol/TotalSupply.json +1 -1
- package/out/TwoFields.sol/TwoFields.json +1 -1
- package/out/UniqueEntity.sol/UniqueEntity.json +1 -1
- package/out/UniqueEntityModule.sol/UniqueEntityModule.json +1 -1
- package/out/UniqueEntityModule.t.sol/UniqueEntityModuleTest.json +1 -1
- package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.json +1 -1
- package/out/UniqueEntitySystem.sol/UniqueEntitySystem.json +1 -1
- package/out/UsedKeysIndex.sol/UsedKeysIndex.json +1 -1
- package/out/UserDelegationControl.sol/UserDelegationControl.json +1 -1
- package/out/World.sol/World.json +1 -1
- package/out/World.t.sol/EchoSystemHook.json +1 -1
- package/out/World.t.sol/IWorldTestSystem.json +1 -1
- package/out/World.t.sol/PayableFallbackSystem.json +1 -1
- package/out/World.t.sol/RevertSystemHook.json +1 -1
- package/out/World.t.sol/WorldTest.json +1 -1
- package/out/World.t.sol/WorldTestSystem.json +1 -1
- package/out/WorldContext.sol/WorldContextConsumer.json +1 -1
- package/out/WorldContext.sol/WorldContextConsumerLib.json +1 -1
- package/out/WorldContext.sol/WorldContextProviderLib.json +1 -1
- package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.json +1 -1
- package/out/interfaces/IBaseWorld.sol/IBaseWorld.json +1 -1
- package/out/query.t.sol/QueryTest.json +1 -1
- package/out/tables/Balances.sol/Balances.json +1 -1
- package/package.json +8 -8
- package/src/modules/erc20-puppet/tables/Allowances.sol +8 -29
- package/src/modules/erc20-puppet/tables/ERC20Metadata.sol +8 -29
- package/src/modules/erc20-puppet/tables/ERC20Registry.sol +8 -28
- package/src/modules/erc20-puppet/tables/TotalSupply.sol +8 -27
- package/src/modules/erc721-puppet/tables/ERC721Metadata.sol +8 -29
- package/src/modules/erc721-puppet/tables/ERC721Registry.sol +8 -28
- package/src/modules/erc721-puppet/tables/OperatorApproval.sol +8 -29
- package/src/modules/erc721-puppet/tables/Owners.sol +8 -28
- package/src/modules/erc721-puppet/tables/TokenApproval.sol +8 -28
- package/src/modules/erc721-puppet/tables/TokenURI.sol +8 -28
- package/src/modules/keysintable/KeysInTableModule.sol +4 -4
- package/src/modules/keysintable/tables/KeysInTable.sol +9 -33
- package/src/modules/keysintable/tables/UsedKeysIndex.sol +9 -31
- package/src/modules/keyswithvalue/KeysWithValueModule.sol +2 -2
- package/src/modules/keyswithvalue/tables/KeysWithValue.sol +9 -29
- package/src/modules/puppet/tables/PuppetRegistry.sol +8 -28
- package/src/modules/std-delegations/tables/CallboundDelegations.sol +8 -31
- package/src/modules/std-delegations/tables/SystemboundDelegations.sol +8 -30
- package/src/modules/std-delegations/tables/TimeboundDelegations.sol +8 -29
- package/src/modules/tokens/tables/Balances.sol +8 -28
- package/src/modules/uniqueentity/tables/UniqueEntity.sol +9 -28
@@ -3,9 +3,6 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
// Import schema type
|
7
|
-
import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
|
8
|
-
|
9
6
|
// Import store internals
|
10
7
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
11
8
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
@@ -14,8 +11,8 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
14
11
|
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
15
12
|
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
16
13
|
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
17
|
-
import { FieldLayout
|
18
|
-
import { Schema
|
14
|
+
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
15
|
+
import { Schema } from "@latticexyz/store/src/Schema.sol";
|
19
16
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
17
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
18
|
|
@@ -23,28 +20,10 @@ library OperatorApproval {
|
|
23
20
|
FieldLayout constant _fieldLayout =
|
24
21
|
FieldLayout.wrap(0x0001010001000000000000000000000000000000000000000000000000000000);
|
25
22
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
function getKeySchema() internal pure returns (Schema) {
|
31
|
-
SchemaType[] memory _keySchema = new SchemaType[](2);
|
32
|
-
_keySchema[0] = SchemaType.ADDRESS;
|
33
|
-
_keySchema[1] = SchemaType.ADDRESS;
|
34
|
-
|
35
|
-
return SchemaLib.encode(_keySchema);
|
36
|
-
}
|
37
|
-
|
38
|
-
/**
|
39
|
-
* @notice Get the table's value schema.
|
40
|
-
* @return _valueSchema The value schema for the table.
|
41
|
-
*/
|
42
|
-
function getValueSchema() internal pure returns (Schema) {
|
43
|
-
SchemaType[] memory _valueSchema = new SchemaType[](1);
|
44
|
-
_valueSchema[0] = SchemaType.BOOL;
|
45
|
-
|
46
|
-
return SchemaLib.encode(_valueSchema);
|
47
|
-
}
|
23
|
+
// Hex-encoded key schema of (address, address)
|
24
|
+
Schema constant _keySchema = Schema.wrap(0x0028020061610000000000000000000000000000000000000000000000000000);
|
25
|
+
// Hex-encoded value schema of (bool)
|
26
|
+
Schema constant _valueSchema = Schema.wrap(0x0001010060000000000000000000000000000000000000000000000000000000);
|
48
27
|
|
49
28
|
/**
|
50
29
|
* @notice Get the table's key field names.
|
@@ -69,14 +48,14 @@ library OperatorApproval {
|
|
69
48
|
* @notice Register the table with its config.
|
70
49
|
*/
|
71
50
|
function register(ResourceId _tableId) internal {
|
72
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
51
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
73
52
|
}
|
74
53
|
|
75
54
|
/**
|
76
55
|
* @notice Register the table with its config.
|
77
56
|
*/
|
78
57
|
function _register(ResourceId _tableId) internal {
|
79
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
58
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
80
59
|
}
|
81
60
|
|
82
61
|
/**
|
@@ -3,9 +3,6 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
// Import schema type
|
7
|
-
import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
|
8
|
-
|
9
6
|
// Import store internals
|
10
7
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
11
8
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
@@ -14,8 +11,8 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
14
11
|
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
15
12
|
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
16
13
|
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
17
|
-
import { FieldLayout
|
18
|
-
import { Schema
|
14
|
+
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
15
|
+
import { Schema } from "@latticexyz/store/src/Schema.sol";
|
19
16
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
17
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
18
|
|
@@ -23,27 +20,10 @@ library Owners {
|
|
23
20
|
FieldLayout constant _fieldLayout =
|
24
21
|
FieldLayout.wrap(0x0014010014000000000000000000000000000000000000000000000000000000);
|
25
22
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
function getKeySchema() internal pure returns (Schema) {
|
31
|
-
SchemaType[] memory _keySchema = new SchemaType[](1);
|
32
|
-
_keySchema[0] = SchemaType.UINT256;
|
33
|
-
|
34
|
-
return SchemaLib.encode(_keySchema);
|
35
|
-
}
|
36
|
-
|
37
|
-
/**
|
38
|
-
* @notice Get the table's value schema.
|
39
|
-
* @return _valueSchema The value schema for the table.
|
40
|
-
*/
|
41
|
-
function getValueSchema() internal pure returns (Schema) {
|
42
|
-
SchemaType[] memory _valueSchema = new SchemaType[](1);
|
43
|
-
_valueSchema[0] = SchemaType.ADDRESS;
|
44
|
-
|
45
|
-
return SchemaLib.encode(_valueSchema);
|
46
|
-
}
|
23
|
+
// Hex-encoded key schema of (uint256)
|
24
|
+
Schema constant _keySchema = Schema.wrap(0x002001001f000000000000000000000000000000000000000000000000000000);
|
25
|
+
// Hex-encoded value schema of (address)
|
26
|
+
Schema constant _valueSchema = Schema.wrap(0x0014010061000000000000000000000000000000000000000000000000000000);
|
47
27
|
|
48
28
|
/**
|
49
29
|
* @notice Get the table's key field names.
|
@@ -67,14 +47,14 @@ library Owners {
|
|
67
47
|
* @notice Register the table with its config.
|
68
48
|
*/
|
69
49
|
function register(ResourceId _tableId) internal {
|
70
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
50
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
71
51
|
}
|
72
52
|
|
73
53
|
/**
|
74
54
|
* @notice Register the table with its config.
|
75
55
|
*/
|
76
56
|
function _register(ResourceId _tableId) internal {
|
77
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
57
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
78
58
|
}
|
79
59
|
|
80
60
|
/**
|
@@ -3,9 +3,6 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
// Import schema type
|
7
|
-
import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
|
8
|
-
|
9
6
|
// Import store internals
|
10
7
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
11
8
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
@@ -14,8 +11,8 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
14
11
|
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
15
12
|
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
16
13
|
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
17
|
-
import { FieldLayout
|
18
|
-
import { Schema
|
14
|
+
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
15
|
+
import { Schema } from "@latticexyz/store/src/Schema.sol";
|
19
16
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
17
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
18
|
|
@@ -23,27 +20,10 @@ library TokenApproval {
|
|
23
20
|
FieldLayout constant _fieldLayout =
|
24
21
|
FieldLayout.wrap(0x0014010014000000000000000000000000000000000000000000000000000000);
|
25
22
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
function getKeySchema() internal pure returns (Schema) {
|
31
|
-
SchemaType[] memory _keySchema = new SchemaType[](1);
|
32
|
-
_keySchema[0] = SchemaType.UINT256;
|
33
|
-
|
34
|
-
return SchemaLib.encode(_keySchema);
|
35
|
-
}
|
36
|
-
|
37
|
-
/**
|
38
|
-
* @notice Get the table's value schema.
|
39
|
-
* @return _valueSchema The value schema for the table.
|
40
|
-
*/
|
41
|
-
function getValueSchema() internal pure returns (Schema) {
|
42
|
-
SchemaType[] memory _valueSchema = new SchemaType[](1);
|
43
|
-
_valueSchema[0] = SchemaType.ADDRESS;
|
44
|
-
|
45
|
-
return SchemaLib.encode(_valueSchema);
|
46
|
-
}
|
23
|
+
// Hex-encoded key schema of (uint256)
|
24
|
+
Schema constant _keySchema = Schema.wrap(0x002001001f000000000000000000000000000000000000000000000000000000);
|
25
|
+
// Hex-encoded value schema of (address)
|
26
|
+
Schema constant _valueSchema = Schema.wrap(0x0014010061000000000000000000000000000000000000000000000000000000);
|
47
27
|
|
48
28
|
/**
|
49
29
|
* @notice Get the table's key field names.
|
@@ -67,14 +47,14 @@ library TokenApproval {
|
|
67
47
|
* @notice Register the table with its config.
|
68
48
|
*/
|
69
49
|
function register(ResourceId _tableId) internal {
|
70
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
50
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
71
51
|
}
|
72
52
|
|
73
53
|
/**
|
74
54
|
* @notice Register the table with its config.
|
75
55
|
*/
|
76
56
|
function _register(ResourceId _tableId) internal {
|
77
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
57
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
78
58
|
}
|
79
59
|
|
80
60
|
/**
|
@@ -3,9 +3,6 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
// Import schema type
|
7
|
-
import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
|
8
|
-
|
9
6
|
// Import store internals
|
10
7
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
11
8
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
@@ -14,8 +11,8 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
14
11
|
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
15
12
|
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
16
13
|
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
17
|
-
import { FieldLayout
|
18
|
-
import { Schema
|
14
|
+
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
15
|
+
import { Schema } from "@latticexyz/store/src/Schema.sol";
|
19
16
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
17
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
18
|
|
@@ -23,27 +20,10 @@ library TokenURI {
|
|
23
20
|
FieldLayout constant _fieldLayout =
|
24
21
|
FieldLayout.wrap(0x0000000100000000000000000000000000000000000000000000000000000000);
|
25
22
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
function getKeySchema() internal pure returns (Schema) {
|
31
|
-
SchemaType[] memory _keySchema = new SchemaType[](1);
|
32
|
-
_keySchema[0] = SchemaType.UINT256;
|
33
|
-
|
34
|
-
return SchemaLib.encode(_keySchema);
|
35
|
-
}
|
36
|
-
|
37
|
-
/**
|
38
|
-
* @notice Get the table's value schema.
|
39
|
-
* @return _valueSchema The value schema for the table.
|
40
|
-
*/
|
41
|
-
function getValueSchema() internal pure returns (Schema) {
|
42
|
-
SchemaType[] memory _valueSchema = new SchemaType[](1);
|
43
|
-
_valueSchema[0] = SchemaType.STRING;
|
44
|
-
|
45
|
-
return SchemaLib.encode(_valueSchema);
|
46
|
-
}
|
23
|
+
// Hex-encoded key schema of (uint256)
|
24
|
+
Schema constant _keySchema = Schema.wrap(0x002001001f000000000000000000000000000000000000000000000000000000);
|
25
|
+
// Hex-encoded value schema of (string)
|
26
|
+
Schema constant _valueSchema = Schema.wrap(0x00000001c5000000000000000000000000000000000000000000000000000000);
|
47
27
|
|
48
28
|
/**
|
49
29
|
* @notice Get the table's key field names.
|
@@ -67,14 +47,14 @@ library TokenURI {
|
|
67
47
|
* @notice Register the table with its config.
|
68
48
|
*/
|
69
49
|
function register(ResourceId _tableId) internal {
|
70
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
50
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
71
51
|
}
|
72
52
|
|
73
53
|
/**
|
74
54
|
* @notice Register the table with its config.
|
75
55
|
*/
|
76
56
|
function _register(ResourceId _tableId) internal {
|
77
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
57
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
78
58
|
}
|
79
59
|
|
80
60
|
/**
|
@@ -55,8 +55,8 @@ contract KeysInTableModule is Module {
|
|
55
55
|
(
|
56
56
|
KeysInTable._tableId,
|
57
57
|
KeysInTable._fieldLayout,
|
58
|
-
KeysInTable.
|
59
|
-
KeysInTable.
|
58
|
+
KeysInTable._keySchema,
|
59
|
+
KeysInTable._valueSchema,
|
60
60
|
KeysInTable.getKeyNames(),
|
61
61
|
KeysInTable.getFieldNames()
|
62
62
|
)
|
@@ -70,8 +70,8 @@ contract KeysInTableModule is Module {
|
|
70
70
|
(
|
71
71
|
UsedKeysIndex._tableId,
|
72
72
|
UsedKeysIndex._fieldLayout,
|
73
|
-
UsedKeysIndex.
|
74
|
-
UsedKeysIndex.
|
73
|
+
UsedKeysIndex._keySchema,
|
74
|
+
UsedKeysIndex._valueSchema,
|
75
75
|
UsedKeysIndex.getKeyNames(),
|
76
76
|
UsedKeysIndex.getFieldNames()
|
77
77
|
)
|
@@ -3,9 +3,6 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
// Import schema type
|
7
|
-
import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
|
8
|
-
|
9
6
|
// Import store internals
|
10
7
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
11
8
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
@@ -14,8 +11,8 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
14
11
|
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
15
12
|
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
16
13
|
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
17
|
-
import { FieldLayout
|
18
|
-
import { Schema
|
14
|
+
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
15
|
+
import { Schema } from "@latticexyz/store/src/Schema.sol";
|
19
16
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
17
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
18
|
|
@@ -37,31 +34,10 @@ library KeysInTable {
|
|
37
34
|
FieldLayout constant _fieldLayout =
|
38
35
|
FieldLayout.wrap(0x0000000500000000000000000000000000000000000000000000000000000000);
|
39
36
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
function getKeySchema() internal pure returns (Schema) {
|
45
|
-
SchemaType[] memory _keySchema = new SchemaType[](1);
|
46
|
-
_keySchema[0] = SchemaType.BYTES32;
|
47
|
-
|
48
|
-
return SchemaLib.encode(_keySchema);
|
49
|
-
}
|
50
|
-
|
51
|
-
/**
|
52
|
-
* @notice Get the table's value schema.
|
53
|
-
* @return _valueSchema The value schema for the table.
|
54
|
-
*/
|
55
|
-
function getValueSchema() internal pure returns (Schema) {
|
56
|
-
SchemaType[] memory _valueSchema = new SchemaType[](5);
|
57
|
-
_valueSchema[0] = SchemaType.BYTES32_ARRAY;
|
58
|
-
_valueSchema[1] = SchemaType.BYTES32_ARRAY;
|
59
|
-
_valueSchema[2] = SchemaType.BYTES32_ARRAY;
|
60
|
-
_valueSchema[3] = SchemaType.BYTES32_ARRAY;
|
61
|
-
_valueSchema[4] = SchemaType.BYTES32_ARRAY;
|
62
|
-
|
63
|
-
return SchemaLib.encode(_valueSchema);
|
64
|
-
}
|
37
|
+
// Hex-encoded key schema of (bytes32)
|
38
|
+
Schema constant _keySchema = Schema.wrap(0x002001005f000000000000000000000000000000000000000000000000000000);
|
39
|
+
// Hex-encoded value schema of (bytes32[], bytes32[], bytes32[], bytes32[], bytes32[])
|
40
|
+
Schema constant _valueSchema = Schema.wrap(0x00000005c1c1c1c1c10000000000000000000000000000000000000000000000);
|
65
41
|
|
66
42
|
/**
|
67
43
|
* @notice Get the table's key field names.
|
@@ -89,21 +65,21 @@ library KeysInTable {
|
|
89
65
|
* @notice Register the table with its config.
|
90
66
|
*/
|
91
67
|
function register() internal {
|
92
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
68
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
93
69
|
}
|
94
70
|
|
95
71
|
/**
|
96
72
|
* @notice Register the table with its config.
|
97
73
|
*/
|
98
74
|
function _register() internal {
|
99
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
75
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
100
76
|
}
|
101
77
|
|
102
78
|
/**
|
103
79
|
* @notice Register the table with its config (using the specified store).
|
104
80
|
*/
|
105
81
|
function register(IStore _store) internal {
|
106
|
-
_store.registerTable(_tableId, _fieldLayout,
|
82
|
+
_store.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
107
83
|
}
|
108
84
|
|
109
85
|
/**
|
@@ -3,9 +3,6 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
// Import schema type
|
7
|
-
import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
|
8
|
-
|
9
6
|
// Import store internals
|
10
7
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
11
8
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
@@ -14,8 +11,8 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
14
11
|
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
15
12
|
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
16
13
|
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
17
|
-
import { FieldLayout
|
18
|
-
import { Schema
|
14
|
+
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
15
|
+
import { Schema } from "@latticexyz/store/src/Schema.sol";
|
19
16
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
17
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
18
|
|
@@ -29,29 +26,10 @@ library UsedKeysIndex {
|
|
29
26
|
FieldLayout constant _fieldLayout =
|
30
27
|
FieldLayout.wrap(0x0006020001050000000000000000000000000000000000000000000000000000);
|
31
28
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
function getKeySchema() internal pure returns (Schema) {
|
37
|
-
SchemaType[] memory _keySchema = new SchemaType[](2);
|
38
|
-
_keySchema[0] = SchemaType.BYTES32;
|
39
|
-
_keySchema[1] = SchemaType.BYTES32;
|
40
|
-
|
41
|
-
return SchemaLib.encode(_keySchema);
|
42
|
-
}
|
43
|
-
|
44
|
-
/**
|
45
|
-
* @notice Get the table's value schema.
|
46
|
-
* @return _valueSchema The value schema for the table.
|
47
|
-
*/
|
48
|
-
function getValueSchema() internal pure returns (Schema) {
|
49
|
-
SchemaType[] memory _valueSchema = new SchemaType[](2);
|
50
|
-
_valueSchema[0] = SchemaType.BOOL;
|
51
|
-
_valueSchema[1] = SchemaType.UINT40;
|
52
|
-
|
53
|
-
return SchemaLib.encode(_valueSchema);
|
54
|
-
}
|
29
|
+
// Hex-encoded key schema of (bytes32, bytes32)
|
30
|
+
Schema constant _keySchema = Schema.wrap(0x004002005f5f0000000000000000000000000000000000000000000000000000);
|
31
|
+
// Hex-encoded value schema of (bool, uint40)
|
32
|
+
Schema constant _valueSchema = Schema.wrap(0x0006020060040000000000000000000000000000000000000000000000000000);
|
55
33
|
|
56
34
|
/**
|
57
35
|
* @notice Get the table's key field names.
|
@@ -77,21 +55,21 @@ library UsedKeysIndex {
|
|
77
55
|
* @notice Register the table with its config.
|
78
56
|
*/
|
79
57
|
function register() internal {
|
80
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
58
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
81
59
|
}
|
82
60
|
|
83
61
|
/**
|
84
62
|
* @notice Register the table with its config.
|
85
63
|
*/
|
86
64
|
function _register() internal {
|
87
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
65
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
88
66
|
}
|
89
67
|
|
90
68
|
/**
|
91
69
|
* @notice Register the table with its config (using the specified store).
|
92
70
|
*/
|
93
71
|
function register(IStore _store) internal {
|
94
|
-
_store.registerTable(_tableId, _fieldLayout,
|
72
|
+
_store.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
95
73
|
}
|
96
74
|
|
97
75
|
/**
|
@@ -61,8 +61,8 @@ contract KeysWithValueModule is Module {
|
|
61
61
|
(
|
62
62
|
targetTableId,
|
63
63
|
KeysWithValue._fieldLayout,
|
64
|
-
KeysWithValue.
|
65
|
-
KeysWithValue.
|
64
|
+
KeysWithValue._keySchema,
|
65
|
+
KeysWithValue._valueSchema,
|
66
66
|
KeysWithValue.getKeyNames(),
|
67
67
|
KeysWithValue.getFieldNames()
|
68
68
|
)
|
@@ -3,9 +3,6 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
// Import schema type
|
7
|
-
import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
|
8
|
-
|
9
6
|
// Import store internals
|
10
7
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
11
8
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
@@ -14,8 +11,8 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
14
11
|
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
15
12
|
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
16
13
|
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
17
|
-
import { FieldLayout
|
18
|
-
import { Schema
|
14
|
+
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
15
|
+
import { Schema } from "@latticexyz/store/src/Schema.sol";
|
19
16
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
17
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
18
|
|
@@ -23,27 +20,10 @@ library KeysWithValue {
|
|
23
20
|
FieldLayout constant _fieldLayout =
|
24
21
|
FieldLayout.wrap(0x0000000100000000000000000000000000000000000000000000000000000000);
|
25
22
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
function getKeySchema() internal pure returns (Schema) {
|
31
|
-
SchemaType[] memory _keySchema = new SchemaType[](1);
|
32
|
-
_keySchema[0] = SchemaType.BYTES32;
|
33
|
-
|
34
|
-
return SchemaLib.encode(_keySchema);
|
35
|
-
}
|
36
|
-
|
37
|
-
/**
|
38
|
-
* @notice Get the table's value schema.
|
39
|
-
* @return _valueSchema The value schema for the table.
|
40
|
-
*/
|
41
|
-
function getValueSchema() internal pure returns (Schema) {
|
42
|
-
SchemaType[] memory _valueSchema = new SchemaType[](1);
|
43
|
-
_valueSchema[0] = SchemaType.BYTES32_ARRAY;
|
44
|
-
|
45
|
-
return SchemaLib.encode(_valueSchema);
|
46
|
-
}
|
23
|
+
// Hex-encoded key schema of (bytes32)
|
24
|
+
Schema constant _keySchema = Schema.wrap(0x002001005f000000000000000000000000000000000000000000000000000000);
|
25
|
+
// Hex-encoded value schema of (bytes32[])
|
26
|
+
Schema constant _valueSchema = Schema.wrap(0x00000001c1000000000000000000000000000000000000000000000000000000);
|
47
27
|
|
48
28
|
/**
|
49
29
|
* @notice Get the table's key field names.
|
@@ -67,21 +47,21 @@ library KeysWithValue {
|
|
67
47
|
* @notice Register the table with its config.
|
68
48
|
*/
|
69
49
|
function register(ResourceId _tableId) internal {
|
70
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
50
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
71
51
|
}
|
72
52
|
|
73
53
|
/**
|
74
54
|
* @notice Register the table with its config.
|
75
55
|
*/
|
76
56
|
function _register(ResourceId _tableId) internal {
|
77
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
57
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
78
58
|
}
|
79
59
|
|
80
60
|
/**
|
81
61
|
* @notice Register the table with its config (using the specified store).
|
82
62
|
*/
|
83
63
|
function register(IStore _store, ResourceId _tableId) internal {
|
84
|
-
_store.registerTable(_tableId, _fieldLayout,
|
64
|
+
_store.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
85
65
|
}
|
86
66
|
|
87
67
|
/**
|
@@ -3,9 +3,6 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
// Import schema type
|
7
|
-
import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
|
8
|
-
|
9
6
|
// Import store internals
|
10
7
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
11
8
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
@@ -14,8 +11,8 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
14
11
|
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
15
12
|
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
16
13
|
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
17
|
-
import { FieldLayout
|
18
|
-
import { Schema
|
14
|
+
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
15
|
+
import { Schema } from "@latticexyz/store/src/Schema.sol";
|
19
16
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
17
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
18
|
|
@@ -26,27 +23,10 @@ library PuppetRegistry {
|
|
26
23
|
FieldLayout constant _fieldLayout =
|
27
24
|
FieldLayout.wrap(0x0014010014000000000000000000000000000000000000000000000000000000);
|
28
25
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
function getKeySchema() internal pure returns (Schema) {
|
34
|
-
SchemaType[] memory _keySchema = new SchemaType[](1);
|
35
|
-
_keySchema[0] = SchemaType.BYTES32;
|
36
|
-
|
37
|
-
return SchemaLib.encode(_keySchema);
|
38
|
-
}
|
39
|
-
|
40
|
-
/**
|
41
|
-
* @notice Get the table's value schema.
|
42
|
-
* @return _valueSchema The value schema for the table.
|
43
|
-
*/
|
44
|
-
function getValueSchema() internal pure returns (Schema) {
|
45
|
-
SchemaType[] memory _valueSchema = new SchemaType[](1);
|
46
|
-
_valueSchema[0] = SchemaType.ADDRESS;
|
47
|
-
|
48
|
-
return SchemaLib.encode(_valueSchema);
|
49
|
-
}
|
26
|
+
// Hex-encoded key schema of (bytes32)
|
27
|
+
Schema constant _keySchema = Schema.wrap(0x002001005f000000000000000000000000000000000000000000000000000000);
|
28
|
+
// Hex-encoded value schema of (address)
|
29
|
+
Schema constant _valueSchema = Schema.wrap(0x0014010061000000000000000000000000000000000000000000000000000000);
|
50
30
|
|
51
31
|
/**
|
52
32
|
* @notice Get the table's key field names.
|
@@ -70,14 +50,14 @@ library PuppetRegistry {
|
|
70
50
|
* @notice Register the table with its config.
|
71
51
|
*/
|
72
52
|
function register(ResourceId _tableId) internal {
|
73
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
53
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
74
54
|
}
|
75
55
|
|
76
56
|
/**
|
77
57
|
* @notice Register the table with its config.
|
78
58
|
*/
|
79
59
|
function _register(ResourceId _tableId) internal {
|
80
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
60
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
81
61
|
}
|
82
62
|
|
83
63
|
/**
|