Major Changes
-
#1482
07dd6f32
Thanks @alvrs! - Renamed all occurrences ofschema
where it is used as "value schema" tovalueSchema
to clearly distinguish it from "key schema".
The only breaking change for users is the change fromschema
tovalueSchema
inmud.config.ts
.// mud.config.ts export default mudConfig({ tables: { CounterTable: { keySchema: {}, - schema: { + valueSchema: { value: "uint32", }, }, } }
-
#1354
331dbfdc
Thanks @dk1a! - We've updated Store events to be "schemaless", meaning there is enough information in each event to only need to operate on the bytes of each record to make an update to that record without having to first decode the record by its schema. This enables new kinds of indexers and sync strategies.If you've written your own sync logic or are interacting with Store calls directly, this is a breaking change. We have a few more breaking protocol changes upcoming, so you may hold off on upgrading until those land.
If you are using MUD's built-in tooling (table codegen, indexer, store sync, etc.), you don't have to make any changes except upgrading to the latest versions and deploying a fresh World.
-
The
data
field in eachStoreSetRecord
andStoreEphemeralRecord
has been replaced with three new fields:staticData
,encodedLengths
, anddynamicData
. This better reflects the on-chain state and makes it easier to perform modifications to the raw bytes. We recommend storing each of these fields individually in your off-chain storage of choice (indexer, client, etc.).- event StoreSetRecord(bytes32 tableId, bytes32[] keyTuple, bytes data); + event StoreSetRecord(bytes32 tableId, bytes32[] keyTuple, bytes staticData, bytes32 encodedLengths, bytes dynamicData); - event StoreEphemeralRecord(bytes32 tableId, bytes32[] keyTuple, bytes data); + event StoreEphemeralRecord(bytes32 tableId, bytes32[] keyTuple, bytes staticData, bytes32 encodedLengths, bytes dynamicData);
-
The
StoreSetField
event is now replaced by two new events:StoreSpliceStaticData
andStoreSpliceDynamicData
. Splicing allows us to perform efficient operations like push and pop, in addition to replacing a field value. We use two events because updating a dynamic-length field also requires updating the record'sencodedLengths
(aka PackedCounter).- event StoreSetField(bytes32 tableId, bytes32[] keyTuple, uint8 fieldIndex, bytes data); + event StoreSpliceStaticData(bytes32 tableId, bytes32[] keyTuple, uint48 start, uint40 deleteCount, bytes data); + event StoreSpliceDynamicData(bytes32 tableId, bytes32[] keyTuple, uint48 start, uint40 deleteCount, bytes data, bytes32 encodedLengths);
Similarly, Store setter methods (e.g.
setRecord
) have been updated to reflect thedata
tostaticData
,encodedLengths
, anddynamicData
changes. We'll be following up shortly with Store getter method changes for more gas efficient storage reads. -
-
#1589
f9f9609e
Thanks @alvrs! - The argument order onStore_SpliceDynamicData
,onBeforeSpliceDynamicData
andonAfterSpliceDynamicData
has been changed to match the argument order onStore_SetRecord
,
where thePackedCounter encodedLength
field comes before thebytes dynamicData
field.IStore { event Store_SpliceDynamicData( ResourceId indexed tableId, bytes32[] keyTuple, uint48 start, uint40 deleteCount, + PackedCounter encodedLengths, bytes data, - PackedCounter encodedLengths ); } IStoreHook { function onBeforeSpliceDynamicData( ResourceId tableId, bytes32[] memory keyTuple, uint8 dynamicFieldIndex, uint40 startWithinField, uint40 deleteCount, + PackedCounter encodedLengths, bytes memory data, - PackedCounter encodedLengths ) external; function onAfterSpliceDynamicData( ResourceId tableId, bytes32[] memory keyTuple, uint8 dynamicFieldIndex, uint40 startWithinField, uint40 deleteCount, + PackedCounter encodedLengths, bytes memory data, - PackedCounter encodedLengths ) external; }
-
#1527
759514d8
Thanks @holic! - Moved the registration of store hooks and systems hooks to bitmaps with bitwise operator instead of a struct.- import { StoreHookLib } from "@latticexyz/src/StoreHook.sol"; + import { + BEFORE_SET_RECORD, + BEFORE_SET_FIELD, + BEFORE_DELETE_RECORD + } from "@latticexyz/store/storeHookTypes.sol"; StoreCore.registerStoreHook( tableId, subscriber, - StoreHookLib.encodeBitmap({ - onBeforeSetRecord: true, - onAfterSetRecord: false, - onBeforeSetField: true, - onAfterSetField: false, - onBeforeDeleteRecord: true, - onAfterDeleteRecord: false - }) + BEFORE_SET_RECORD | BEFORE_SET_FIELD | BEFORE_DELETE_RECORD );
- import { SystemHookLib } from "../src/SystemHook.sol"; + import { BEFORE_CALL_SYSTEM, AFTER_CALL_SYSTEM } from "../src/systemHookTypes.sol"; world.registerSystemHook( systemId, subscriber, - SystemHookLib.encodeBitmap({ onBeforeCallSystem: true, onAfterCallSystem: true }) + BEFORE_CALL_SYSTEM | AFTER_CALL_SYSTEM );
-
#1531
d5094a24
Thanks @alvrs! - - TheIStoreHook
interface was changed to replaceonBeforeSetField
andonAfterSetField
withonBeforeSpliceStaticData
,onAfterSpliceStaticData
,onBeforeSpliceDynamicData
andonAfterSpliceDynamicData
.This new interface matches the new
StoreSpliceStaticData
andStoreSpliceDynamicData
events, and avoids having to read the entire field from storage when only a subset of the field was updated
(e.g. when pushing elements to a field).interface IStoreHook { - function onBeforeSetField( - bytes32 tableId, - bytes32[] memory keyTuple, - uint8 fieldIndex, - bytes memory data, - FieldLayout fieldLayout - ) external; - function onAfterSetField( - bytes32 tableId, - bytes32[] memory keyTuple, - uint8 fieldIndex, - bytes memory data, - FieldLayout fieldLayout - ) external; + function onBeforeSpliceStaticData( + bytes32 tableId, + bytes32[] memory keyTuple, + uint48 start, + uint40 deleteCount, + bytes memory data + ) external; + function onAfterSpliceStaticData( + bytes32 tableId, + bytes32[] memory keyTuple, + uint48 start, + uint40 deleteCount, + bytes memory data + ) external; + function onBeforeSpliceDynamicData( + bytes32 tableId, + bytes32[] memory keyTuple, + uint8 dynamicFieldIndex, + uint40 startWithinField, + uint40 deleteCount, + bytes memory data, + PackedCounter encodedLengths + ) external; + function onAfterSpliceDynamicData( + bytes32 tableId, + bytes32[] memory keyTuple, + uint8 dynamicFieldIndex, + uint40 startWithinField, + uint40 deleteCount, + bytes memory data, + PackedCounter encodedLengths + ) external; }
-
All
calldata
parameters on theIStoreHook
interface were changed tomemory
, since the functions are called withmemory
from theWorld
. -
IStore
exposes two new functions:spliceStaticData
andspliceDynamicData
.These functions provide lower level access to the operations happening under the hood in
setField
,pushToField
,popFromField
andupdateInField
and simplify handling
the new splice hooks.StoreCore
's internal logic was simplified to use thespliceStaticData
andspliceDynamicData
functions instead of duplicating similar logic in different functions.interface IStore { // Splice data in the static part of the record function spliceStaticData( bytes32 tableId, bytes32[] calldata keyTuple, uint48 start, uint40 deleteCount, bytes calldata data ) external; // Splice data in the dynamic part of the record function spliceDynamicData( bytes32 tableId, bytes32[] calldata keyTuple, uint8 dynamicFieldIndex, uint40 startWithinField, uint40 deleteCount, bytes calldata data ) external; }
-
-
#1336
de151fec
Thanks @dk1a! - - AddFieldLayout
, which is abytes32
user-type similar toSchema
.Both
FieldLayout
andSchema
have the same kind of data in the first 4 bytes.- 2 bytes for total length of all static fields
- 1 byte for number of static size fields
- 1 byte for number of dynamic size fields
But whereas
Schema
hasSchemaType
enum in each of the other 28 bytes,FieldLayout
has static byte lengths in each of the other 28 bytes.-
Replace
Schema valueSchema
withFieldLayout fieldLayout
in Store and World contracts.FieldLayout
is more gas-efficient because it already has lengths, andSchema
has types which need to be converted to lengths. -
Add
getFieldLayout
toIStore
interface.There is no
FieldLayout
for keys, only for values, because key byte lengths aren't usually relevant on-chain. You can still usegetKeySchema
if you need key types. -
Add
fieldLayoutToHex
utility toprotocol-parser
package. -
Add
constants.sol
for constants shared betweenFieldLayout
,Schema
andPackedCounter
.
-
#1532
ae340b2b
Thanks @dk1a! - Store'sgetRecord
has been updated to returnstaticData
,encodedLengths
, anddynamicData
instead of a singledata
blob, to match the new behaviour of Store setter methods.If you use codegenerated libraries, you will only need to update
encode
calls.- bytes memory data = Position.encode(x, y); + (bytes memory staticData, PackedCounter encodedLengths, bytes memory dynamicData) = Position.encode(x, y);
-
#1483
83583a50
Thanks @holic! - Store and World contract ABIs are now exported from theout
directory. You'll need to update your imports like:- import IBaseWorldAbi from "@latticexyz/world/abi/IBaseWorld.sol/IBaseWorldAbi.json"; + import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorldAbi.json";
MudTest.sol
was also moved to the World package. You can update your import like:- import { MudTest } from "@latticexyz/store/src/MudTest.sol"; + import { MudTest } from "@latticexyz/world/test/MudTest.t.sol";
-
#1566
44a5432a
Thanks @dk1a! - These breaking changes only affect store utilities, you aren't affected if you use@latticexyz/cli
codegen scripts.- Add
remappings
argument to thetablegen
codegen function, so that it can read user-provided files. - In
RenderTableOptions
change the type ofimports
fromRelativeImportDatum
toImportDatum
, to allow passing absolute imports to the table renderer. - Add
solidityUserTypes
argument to several functions that need to resolve user or abi types:resolveAbiOrUserType
,importForAbiOrUserType
,getUserTypeInfo
. - Add
userTypes
config option to MUD config, which takes user types mapped to file paths from which to import them.
- Add
-
#1550
65c9546c
Thanks @dk1a! - - Always render field methods with a suffix in tablegen (they used to not be rendered if field methods without a suffix were rendered).- Add
withSuffixlessFieldMethods
toRenderTableOptions
, which indicates that field methods without a suffix should be rendered.
- Add
-
#1602
672d05ca
Thanks @holic! - - Moves Store events into its ownIStoreEvents
interface- Moves Store interfaces to their own files
- Adds a
StoreData
abstract contract to initialize a Store and expose the Store version
If you're using MUD out of the box, you won't have to make any changes. You will only need to update if you're using any of the base Store interfaces.
-
#1473
92de5998
Thanks @holic! - Bump Solidity version to 0.8.21 -
#1318
ac508bf1
Thanks @holic! - Renamed the default filename of generated user types fromTypes.sol
tocommon.sol
and the default filename of the generated table index file fromTables.sol
toindex.sol
.Both can be overridden via the MUD config:
export default mudConfig({ /** Filename where common user types will be generated and imported from. */ userTypesFilename: "common.sol", /** Filename where codegen index will be generated. */ codegenIndexFilename: "index.sol", });
Note:
userTypesFilename
was renamed fromuserTypesPath
and.sol
is not appended automatically anymore but needs to be part of the provided filename.To update your existing project, update all imports from
Tables.sol
toindex.sol
and all imports fromTypes.sol
tocommon.sol
, or override the defaults in your MUD config to the previous values.- import { Counter } from "../src/codegen/Tables.sol"; + import { Counter } from "../src/codegen/index.sol"; - import { ExampleEnum } from "../src/codegen/Types.sol"; + import { ExampleEnum } from "../src/codegen/common.sol";
-
#1558
bfcb293d
Thanks @alvrs! - What used to be known asephemeral
table is now calledoffchain
table.
The previousephemeral
tables only supported anemitEphemeral
method, which emitted aStoreSetEphemeralRecord
event.Now
offchain
tables support all regular table methods, except partial operations on dynamic fields (push
,pop
,update
).
Unlike regular tables they don't store data on-chain but emit the same events as regular tables (StoreSetRecord
,StoreSpliceStaticData
,StoreDeleteRecord
), so their data can be indexed by offchain indexers/clients.- EphemeralTable.emitEphemeral(value); + OffchainTable.set(value);
-
#1601
1890f1a0
Thanks @alvrs! - Movedstore
tables to the"store"
namespace (previously "mudstore") andworld
tables to the"world"
namespace (previously root namespace). -
#1577
af639a26
Thanks @alvrs! -Store
events have been renamed for consistency and readability.
If you're parsingStore
events manually, you need to update your ABI.
If you're using the MUD sync stack, the new events are already integrated and no further changes are necessary.- event StoreSetRecord( + event Store_SetRecord( ResourceId indexed tableId, bytes32[] keyTuple, bytes staticData, bytes32 encodedLengths, bytes dynamicData ); - event StoreSpliceStaticData( + event Store_SpliceStaticData( ResourceId indexed tableId, bytes32[] keyTuple, uint48 start, uint40 deleteCount, bytes data ); - event StoreSpliceDynamicData( + event Store_SpliceDynamicData( ResourceId indexed tableId, bytes32[] keyTuple, uint48 start, uint40 deleteCount, bytes data, bytes32 encodedLengths ); - event StoreDeleteRecord( + event Store_DeleteRecord( ResourceId indexed tableId, bytes32[] keyTuple );
-
#1544
5e723b90
Thanks @alvrs! - -ResourceSelector
is replaced withResourceId
,ResourceIdLib
,ResourceIdInstance
,WorldResourceIdLib
andWorldResourceIdInstance
.Previously a "resource selector" was a
bytes32
value with the first 16 bytes reserved for the resource's namespace, and the last 16 bytes reserved for the resource's name.
Now a "resource ID" is abytes32
value with the first 2 bytes reserved for the resource type, the next 14 bytes reserved for the resource's namespace, and the last 16 bytes reserved for the resource's name.Previously
ResouceSelector
was a library and the resource selector type was a plainbytes32
.
NowResourceId
is a user type, and the functionality is implemented in theResourceIdInstance
(for type) andWorldResourceIdInstance
(for namespace and name) libraries.
We split the logic into two libraries, becauseStore
now also usesResourceId
and needs to be aware of resource types, but not of namespaces/names.- import { ResourceSelector } from "@latticexyz/world/src/ResourceSelector.sol"; + import { ResourceId, ResourceIdInstance } from "@latticexyz/store/src/ResourceId.sol"; + import { WorldResourceIdLib, WorldResourceIdInstance } from "@latticexyz/world/src/WorldResourceId.sol"; + import { RESOURCE_SYSTEM } from "@latticexyz/world/src/worldResourceTypes.sol"; - bytes32 systemId = ResourceSelector.from("namespace", "name"); + ResourceId systemId = WorldResourceIdLib.encode(RESOURCE_SYSTEM, "namespace", "name"); - using ResourceSelector for bytes32; + using WorldResourceIdInstance for ResourceId; + using ResourceIdInstance for ResourceId; systemId.getName(); systemId.getNamespace(); + systemId.getType();
-
All
Store
andWorld
methods now use theResourceId
type fortableId
,systemId
,moduleId
andnamespaceId
.
All mentions ofresourceSelector
were renamed toresourceId
or the more specific type (e.g.tableId
,systemId
)import { ResourceId } from "@latticexyz/store/src/ResourceId.sol"; IStore { function setRecord( - bytes32 tableId, + ResourceId tableId, bytes32[] calldata keyTuple, bytes calldata staticData, PackedCounter encodedLengths, bytes calldata dynamicData, FieldLayout fieldLayout ) external; // Same for all other methods }
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol"; IBaseWorld { function callFrom( address delegator, - bytes32 resourceSelector, + ResourceId systemId, bytes memory callData ) external payable returns (bytes memory); // Same for all other methods }
-
-
#1520
99ab9cd6
Thanks @holic! - Store events now use anindexed
tableId
. This adds ~100 gas per write, but means we our sync stack can filter events by table. -
#1472
c049c23f
Thanks @alvrs! - -StoreCore
'sinitialize
function is split intoinitialize
(to set theStoreSwitch
'sstoreAddress
) andregisterCoreTables
(to register theTables
andStoreHooks
tables).
The purpose of this is to give consumers more granular control over the setup flow.- The
StoreRead
contract no longer callsStoreCore.initialize
in its constructor.
StoreCore
consumers are expected to callStoreCore.initialize
andStoreCore.registerCoreTable
in their own setup logic.
- The
-
#1587
24a6cd53
Thanks @alvrs! - Changed theuserTypes
property to accept{ filePath: string, internalType: SchemaAbiType }
to enable strong type inference from the config. -
#1581
cea754dd
Thanks @alvrs! - - The externalsetRecord
anddeleteRecord
methods ofIStore
no longer accept aFieldLayout
as input, but load it from storage instead.
This is to prevent invalidFieldLayout
values being passed, which could cause the onchain state to diverge from the indexer state.
However, the internalStoreCore
library still exposes asetRecord
anddeleteRecord
method that allows aFieldLayout
to be passed.
This is becauseStoreCore
can only be used internally, so theFieldLayout
value can be trusted and we can save the gas for accessing storage.interface IStore { function setRecord( ResourceId tableId, bytes32[] calldata keyTuple, bytes calldata staticData, PackedCounter encodedLengths, bytes calldata dynamicData, - FieldLayout fieldLayout ) external; function deleteRecord( ResourceId tableId, bytes32[] memory keyTuple, - FieldLayout fieldLayout ) external; }
-
The
spliceStaticData
method andStore_SpliceStaticData
event ofIStore
andStoreCore
no longer includedeleteCount
in their signature.
This is because when splicing static data, the data afterstart
is always overwritten withdata
instead of being shifted, sodeleteCount
is always the length of the data to be written.event Store_SpliceStaticData( ResourceId indexed tableId, bytes32[] keyTuple, uint48 start, - uint40 deleteCount, bytes data ); interface IStore { function spliceStaticData( ResourceId tableId, bytes32[] calldata keyTuple, uint48 start, - uint40 deleteCount, bytes calldata data ) external; }
-
The
updateInField
method has been removed fromIStore
, as it's almost identical to the more generalspliceDynamicData
.
If you're manually callingupdateInField
, here is how to upgrade tospliceDynamicData
:- store.updateInField(tableId, keyTuple, fieldIndex, startByteIndex, dataToSet, fieldLayout); + uint8 dynamicFieldIndex = fieldIndex - fieldLayout.numStaticFields(); + store.spliceDynamicData(tableId, keyTuple, dynamicFieldIndex, uint40(startByteIndex), uint40(dataToSet.length), dataToSet);
-
All other methods that are only valid for dynamic fields (
pushToField
,popFromField
,getFieldSlice
)
have been renamed to make this more explicit (pushToDynamicField
,popFromDynamicField
,getDynamicFieldSlice
).Their
fieldIndex
parameter has been replaced by adynamicFieldIndex
parameter, which is the index relative to the first dynamic field (i.e.dynamicFieldIndex
=fieldIndex
-numStaticFields
).
TheFieldLayout
parameter has been removed, as it was only used to calculate thedynamicFieldIndex
in the method.interface IStore { - function pushToField( + function pushToDynamicField( ResourceId tableId, bytes32[] calldata keyTuple, - uint8 fieldIndex, + uint8 dynamicFieldIndex, bytes calldata dataToPush, - FieldLayout fieldLayout ) external; - function popFromField( + function popFromDynamicField( ResourceId tableId, bytes32[] calldata keyTuple, - uint8 fieldIndex, + uint8 dynamicFieldIndex, uint256 byteLengthToPop, - FieldLayout fieldLayout ) external; - function getFieldSlice( + function getDynamicFieldSlice( ResourceId tableId, bytes32[] memory keyTuple, - uint8 fieldIndex, + uint8 dynamicFieldIndex, - FieldLayout fieldLayout, uint256 start, uint256 end ) external view returns (bytes memory data); }
-
IStore
has a newgetDynamicFieldLength
length method, which returns the byte length of the given dynamic field and doesn't require theFieldLayout
.IStore { + function getDynamicFieldLength( + ResourceId tableId, + bytes32[] memory keyTuple, + uint8 dynamicFieldIndex + ) external view returns (uint256); }
-
IStore
now has additional overloads forgetRecord
,getField
,getFieldLength
andsetField
that don't require aFieldLength
to be passed, but instead load it from storage. -
IStore
now exposessetStaticField
andsetDynamicField
to save gas by avoiding the dynamic inference of whether the field is static or dynamic. -
The
getDynamicFieldSlice
method no longer accepts reading outside the bounds of the dynamic field.
This is to avoid returning invalid data, as the data of a dynamic field is not deleted when the record is deleted, but only its length is set to zero.
-
Minor Changes
-
#1511
9b43029c
Thanks @holic! - Add protocol version with corresponding getter and event on deployworld.worldVersion(); world.storeVersion(); // a World is also a Store
event HelloWorld(bytes32 indexed worldVersion); event HelloStore(bytes32 indexed storeVersion);
-
#1521
55ab88a6
Thanks @alvrs! -StoreCore
andIStore
now expose specific functions forgetStaticField
andgetDynamicField
in addition to the generalgetField
.
Using the specific functions reduces gas overhead because more optimized logic can be executed.interface IStore { /** * Get a single static field from the given tableId and key tuple, with the given value field layout. * Note: the field value is left-aligned in the returned bytes32, the rest of the word is not zeroed out. * Consumers are expected to truncate the returned value as needed. */ function getStaticField( bytes32 tableId, bytes32[] calldata keyTuple, uint8 fieldIndex, FieldLayout fieldLayout ) external view returns (bytes32); /** * Get a single dynamic field from the given tableId and key tuple at the given dynamic field index. * (Dynamic field index = field index - number of static fields) */ function getDynamicField( bytes32 tableId, bytes32[] memory keyTuple, uint8 dynamicFieldIndex ) external view returns (bytes memory); }
-
#1542
80dd6992
Thanks @dk1a! - Add an optionalnamePrefix
argument torenderRecordData
, to support inlined logic in codegennedset
method which uses a struct. -
#1513
708b49c5
Thanks @Boffee! - Generated table libraries now have a set of functions prefixed with_
that always use their own storage for read/write.
This saves gas for use cases where the functionality to dynamically determine whichStore
to use for read/write is not needed, e.g. root systems in aWorld
, or when usingStore
withoutWorld
.We decided to continue to always generate a set of functions that dynamically decide which
Store
to use, so that the generated table libraries can still be imported by non-root systems.library Counter { // Dynamically determine which store to write to based on the context function set(uint32 value) internal; // Always write to own storage function _set(uint32 value) internal; // ... equivalent functions for all other Store methods }
Patch Changes
-
#1490
aea67c58
Thanks @alvrs! - Include bytecode forWorld
andStore
in npm packages. -
#1600
90e4161b
Thanks @alvrs! - Moved the test tables out of the main config inworld
andstore
and into their own separate config. -
#1508
211be2a1
Thanks @Boffee! - TheFieldLayout
in table libraries is now generated at compile time instead of dynamically in a table library function.
This significantly reduces gas cost in all table library functions. -
#1512
0f3e2e02
Thanks @Boffee! - AddedStorage.loadField
to optimize loading 32 bytes or less from storage (which is always the case when loading data for static fields). -
#1568
d0878928
Thanks @alvrs! - Prefixed all errors with their respective library/contract for improved debugging. -
#1544
5e723b90
Thanks @alvrs! - TheResourceType
table is removed.
It was previously used to store the resource type for each resource ID in aWorld
. This is no longer necessary as the resource type is now encoded in the resource ID.To still be able to determine whether a given resource ID exists, a
ResourceIds
table has been added.
The previousResourceType
table was part ofWorld
and missed tables that were registered directly viaStoreCore.registerTable
instead of viaWorld.registerTable
(e.g. when a table was registered as part of a root module).
This problem is solved by the new tableResourceIds
being part ofStore
.StoreCore
'shasTable
function was removed in favor of usingResourceIds.getExists(tableId)
directly.- import { ResourceType } from "@latticexyz/world/src/tables/ResourceType.sol"; - import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; + import { ResourceIds } from "@latticexyz/store/src/codegen/tables/ResourceIds.sol"; - bool tableExists = StoreCore.hasTable(tableId); + bool tableExists = ResourceIds.getExists(tableId); - bool systemExists = ResourceType.get(systemId) != Resource.NONE; + bool systemExists = ResourceIds.getExists(systemId);
-
#1484
6573e38e
Thanks @alvrs! - Renamed all occurrences oftable
where it is used as "table ID" totableId
.
This is only a breaking change for consumers who manually decodeStore
events, but not for consumers who use the MUD libraries.event StoreSetRecord( - bytes32 table, + bytes32 tableId, bytes32[] key, bytes data ); event StoreSetField( - bytes32 table, + bytes32 tableId, bytes32[] key, uint8 fieldIndex, bytes data ); event StoreDeleteRecord( - bytes32 table, + bytes32 tableId, bytes32[] key ); event StoreEphemeralRecord( - bytes32 table, + bytes32 tableId, bytes32[] key, bytes data );
-
#1492
6e66c5b7
Thanks @alvrs! - Renamed all occurrences ofkey
where it is used as "key tuple" tokeyTuple
.
This is only a breaking change for consumers who manually decodeStore
events, but not for consumers who use the MUD libraries.event StoreSetRecord( bytes32 tableId, - bytes32[] key, + bytes32[] keyTuple, bytes data ); event StoreSetField( bytes32 tableId, - bytes32[] key, + bytes32[] keyTuple, uint8 fieldIndex, bytes data ); event StoreDeleteRecord( bytes32 tableId, - bytes32[] key, + bytes32[] keyTuple, ); event StoreEphemeralRecord( bytes32 tableId, - bytes32[] key, + bytes32[] keyTuple, bytes data );
-
#1599
63831a26
Thanks @alvrs! - MinorStore
cleanups: renamedUtils.sol
toleftMask.sol
since it only contains a single free function, and removed a leftover sanity check. -
#1586
22ee4470
Thanks @alvrs! - AllStore
andWorld
tables now use the appropriate user-types forResourceId
,FieldLayout
andSchema
to avoid manualwrap
/unwrap
. -
#1509
be313068
Thanks @Boffee! - Optimized theStoreCore
hash function determining the data location to use less gas. -
#1569
22ba7b67
Thanks @alvrs! - Simplified a couple internal constants used for bitshifting. -
Updated dependencies [
65c9546c
,331dbfdc
,0b8ce3f2
,44a5432a
,331dbfdc
,92de5998
,bfcb293d
,5e723b90
,24a6cd53
,708b49c5
,c4f49240
,cea754dd
]:- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]