diff --git a/packages/cli/contracts/src/codegen/tables/Dynamics1.sol b/packages/cli/contracts/src/codegen/tables/Dynamics1.sol index d6b5ceb57d..0de38fba3c 100644 --- a/packages/cli/contracts/src/codegen/tables/Dynamics1.sol +++ b/packages/cli/contracts/src/codegen/tables/Dynamics1.sol @@ -86,7 +86,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 0); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 0, getSchema()); return toStaticArray_bytes32_1(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32()); } @@ -95,7 +95,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = _store.getField(_tableId, _keyTuple, 0); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 0, getSchema()); return toStaticArray_bytes32_1(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32()); } @@ -104,7 +104,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.setField(_tableId, _keyTuple, 0, EncodeArray.encode(fromStaticArray_bytes32_1(staticB32))); + StoreSwitch.setField(_tableId, _keyTuple, 0, EncodeArray.encode(fromStaticArray_bytes32_1(staticB32)), getSchema()); } /** Set staticB32 (using the specified store) */ @@ -112,7 +112,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.setField(_tableId, _keyTuple, 0, EncodeArray.encode(fromStaticArray_bytes32_1(staticB32))); + _store.setField(_tableId, _keyTuple, 0, EncodeArray.encode(fromStaticArray_bytes32_1(staticB32)), getSchema()); } /** Get the length of staticB32 */ @@ -156,7 +156,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.pushToField(_tableId, _keyTuple, 0, abi.encodePacked((_element))); + StoreSwitch.pushToField(_tableId, _keyTuple, 0, abi.encodePacked((_element)), getSchema()); } /** Push an element to staticB32 (using the specified store) */ @@ -164,7 +164,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.pushToField(_tableId, _keyTuple, 0, abi.encodePacked((_element))); + _store.pushToField(_tableId, _keyTuple, 0, abi.encodePacked((_element)), getSchema()); } /** Pop an element from staticB32 */ @@ -172,7 +172,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.popFromField(_tableId, _keyTuple, 0, 32); + StoreSwitch.popFromField(_tableId, _keyTuple, 0, 32, getSchema()); } /** Pop an element from staticB32 (using the specified store) */ @@ -180,7 +180,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.popFromField(_tableId, _keyTuple, 0, 32); + _store.popFromField(_tableId, _keyTuple, 0, 32, getSchema()); } /** Update an element of staticB32 at `_index` */ @@ -188,7 +188,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.updateInField(_tableId, _keyTuple, 0, _index * 32, abi.encodePacked((_element))); + StoreSwitch.updateInField(_tableId, _keyTuple, 0, _index * 32, abi.encodePacked((_element)), getSchema()); } /** Update an element of staticB32 (using the specified store) at `_index` */ @@ -196,7 +196,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.updateInField(_tableId, _keyTuple, 0, _index * 32, abi.encodePacked((_element))); + _store.updateInField(_tableId, _keyTuple, 0, _index * 32, abi.encodePacked((_element)), getSchema()); } /** Get staticI32 */ @@ -204,7 +204,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 1); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 1, getSchema()); return toStaticArray_int32_2(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_int32()); } @@ -213,7 +213,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = _store.getField(_tableId, _keyTuple, 1); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 1, getSchema()); return toStaticArray_int32_2(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_int32()); } @@ -222,7 +222,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.setField(_tableId, _keyTuple, 1, EncodeArray.encode(fromStaticArray_int32_2(staticI32))); + StoreSwitch.setField(_tableId, _keyTuple, 1, EncodeArray.encode(fromStaticArray_int32_2(staticI32)), getSchema()); } /** Set staticI32 (using the specified store) */ @@ -230,7 +230,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.setField(_tableId, _keyTuple, 1, EncodeArray.encode(fromStaticArray_int32_2(staticI32))); + _store.setField(_tableId, _keyTuple, 1, EncodeArray.encode(fromStaticArray_int32_2(staticI32)), getSchema()); } /** Get the length of staticI32 */ @@ -274,7 +274,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.pushToField(_tableId, _keyTuple, 1, abi.encodePacked((_element))); + StoreSwitch.pushToField(_tableId, _keyTuple, 1, abi.encodePacked((_element)), getSchema()); } /** Push an element to staticI32 (using the specified store) */ @@ -282,7 +282,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.pushToField(_tableId, _keyTuple, 1, abi.encodePacked((_element))); + _store.pushToField(_tableId, _keyTuple, 1, abi.encodePacked((_element)), getSchema()); } /** Pop an element from staticI32 */ @@ -290,7 +290,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.popFromField(_tableId, _keyTuple, 1, 4); + StoreSwitch.popFromField(_tableId, _keyTuple, 1, 4, getSchema()); } /** Pop an element from staticI32 (using the specified store) */ @@ -298,7 +298,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.popFromField(_tableId, _keyTuple, 1, 4); + _store.popFromField(_tableId, _keyTuple, 1, 4, getSchema()); } /** Update an element of staticI32 at `_index` */ @@ -306,7 +306,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.updateInField(_tableId, _keyTuple, 1, _index * 4, abi.encodePacked((_element))); + StoreSwitch.updateInField(_tableId, _keyTuple, 1, _index * 4, abi.encodePacked((_element)), getSchema()); } /** Update an element of staticI32 (using the specified store) at `_index` */ @@ -314,7 +314,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.updateInField(_tableId, _keyTuple, 1, _index * 4, abi.encodePacked((_element))); + _store.updateInField(_tableId, _keyTuple, 1, _index * 4, abi.encodePacked((_element)), getSchema()); } /** Get staticU128 */ @@ -322,7 +322,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 2); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 2, getSchema()); return toStaticArray_uint128_3(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_uint128()); } @@ -331,7 +331,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = _store.getField(_tableId, _keyTuple, 2); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 2, getSchema()); return toStaticArray_uint128_3(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_uint128()); } @@ -340,7 +340,13 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.setField(_tableId, _keyTuple, 2, EncodeArray.encode(fromStaticArray_uint128_3(staticU128))); + StoreSwitch.setField( + _tableId, + _keyTuple, + 2, + EncodeArray.encode(fromStaticArray_uint128_3(staticU128)), + getSchema() + ); } /** Set staticU128 (using the specified store) */ @@ -348,7 +354,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.setField(_tableId, _keyTuple, 2, EncodeArray.encode(fromStaticArray_uint128_3(staticU128))); + _store.setField(_tableId, _keyTuple, 2, EncodeArray.encode(fromStaticArray_uint128_3(staticU128)), getSchema()); } /** Get the length of staticU128 */ @@ -392,7 +398,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.pushToField(_tableId, _keyTuple, 2, abi.encodePacked((_element))); + StoreSwitch.pushToField(_tableId, _keyTuple, 2, abi.encodePacked((_element)), getSchema()); } /** Push an element to staticU128 (using the specified store) */ @@ -400,7 +406,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.pushToField(_tableId, _keyTuple, 2, abi.encodePacked((_element))); + _store.pushToField(_tableId, _keyTuple, 2, abi.encodePacked((_element)), getSchema()); } /** Pop an element from staticU128 */ @@ -408,7 +414,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.popFromField(_tableId, _keyTuple, 2, 16); + StoreSwitch.popFromField(_tableId, _keyTuple, 2, 16, getSchema()); } /** Pop an element from staticU128 (using the specified store) */ @@ -416,7 +422,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.popFromField(_tableId, _keyTuple, 2, 16); + _store.popFromField(_tableId, _keyTuple, 2, 16, getSchema()); } /** Update an element of staticU128 at `_index` */ @@ -424,7 +430,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.updateInField(_tableId, _keyTuple, 2, _index * 16, abi.encodePacked((_element))); + StoreSwitch.updateInField(_tableId, _keyTuple, 2, _index * 16, abi.encodePacked((_element)), getSchema()); } /** Update an element of staticU128 (using the specified store) at `_index` */ @@ -432,7 +438,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.updateInField(_tableId, _keyTuple, 2, _index * 16, abi.encodePacked((_element))); + _store.updateInField(_tableId, _keyTuple, 2, _index * 16, abi.encodePacked((_element)), getSchema()); } /** Get staticAddrs */ @@ -440,7 +446,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 3); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 3, getSchema()); return toStaticArray_address_4(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_address()); } @@ -449,7 +455,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = _store.getField(_tableId, _keyTuple, 3); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 3, getSchema()); return toStaticArray_address_4(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_address()); } @@ -458,7 +464,13 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.setField(_tableId, _keyTuple, 3, EncodeArray.encode(fromStaticArray_address_4(staticAddrs))); + StoreSwitch.setField( + _tableId, + _keyTuple, + 3, + EncodeArray.encode(fromStaticArray_address_4(staticAddrs)), + getSchema() + ); } /** Set staticAddrs (using the specified store) */ @@ -466,7 +478,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.setField(_tableId, _keyTuple, 3, EncodeArray.encode(fromStaticArray_address_4(staticAddrs))); + _store.setField(_tableId, _keyTuple, 3, EncodeArray.encode(fromStaticArray_address_4(staticAddrs)), getSchema()); } /** Get the length of staticAddrs */ @@ -510,7 +522,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.pushToField(_tableId, _keyTuple, 3, abi.encodePacked((_element))); + StoreSwitch.pushToField(_tableId, _keyTuple, 3, abi.encodePacked((_element)), getSchema()); } /** Push an element to staticAddrs (using the specified store) */ @@ -518,7 +530,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.pushToField(_tableId, _keyTuple, 3, abi.encodePacked((_element))); + _store.pushToField(_tableId, _keyTuple, 3, abi.encodePacked((_element)), getSchema()); } /** Pop an element from staticAddrs */ @@ -526,7 +538,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.popFromField(_tableId, _keyTuple, 3, 20); + StoreSwitch.popFromField(_tableId, _keyTuple, 3, 20, getSchema()); } /** Pop an element from staticAddrs (using the specified store) */ @@ -534,7 +546,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.popFromField(_tableId, _keyTuple, 3, 20); + _store.popFromField(_tableId, _keyTuple, 3, 20, getSchema()); } /** Update an element of staticAddrs at `_index` */ @@ -542,7 +554,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.updateInField(_tableId, _keyTuple, 3, _index * 20, abi.encodePacked((_element))); + StoreSwitch.updateInField(_tableId, _keyTuple, 3, _index * 20, abi.encodePacked((_element)), getSchema()); } /** Update an element of staticAddrs (using the specified store) at `_index` */ @@ -550,7 +562,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.updateInField(_tableId, _keyTuple, 3, _index * 20, abi.encodePacked((_element))); + _store.updateInField(_tableId, _keyTuple, 3, _index * 20, abi.encodePacked((_element)), getSchema()); } /** Get staticBools */ @@ -558,7 +570,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 4); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 4, getSchema()); return toStaticArray_bool_5(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bool()); } @@ -567,7 +579,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = _store.getField(_tableId, _keyTuple, 4); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 4, getSchema()); return toStaticArray_bool_5(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bool()); } @@ -576,7 +588,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.setField(_tableId, _keyTuple, 4, EncodeArray.encode(fromStaticArray_bool_5(staticBools))); + StoreSwitch.setField(_tableId, _keyTuple, 4, EncodeArray.encode(fromStaticArray_bool_5(staticBools)), getSchema()); } /** Set staticBools (using the specified store) */ @@ -584,7 +596,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.setField(_tableId, _keyTuple, 4, EncodeArray.encode(fromStaticArray_bool_5(staticBools))); + _store.setField(_tableId, _keyTuple, 4, EncodeArray.encode(fromStaticArray_bool_5(staticBools)), getSchema()); } /** Get the length of staticBools */ @@ -628,7 +640,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.pushToField(_tableId, _keyTuple, 4, abi.encodePacked((_element))); + StoreSwitch.pushToField(_tableId, _keyTuple, 4, abi.encodePacked((_element)), getSchema()); } /** Push an element to staticBools (using the specified store) */ @@ -636,7 +648,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.pushToField(_tableId, _keyTuple, 4, abi.encodePacked((_element))); + _store.pushToField(_tableId, _keyTuple, 4, abi.encodePacked((_element)), getSchema()); } /** Pop an element from staticBools */ @@ -644,7 +656,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.popFromField(_tableId, _keyTuple, 4, 1); + StoreSwitch.popFromField(_tableId, _keyTuple, 4, 1, getSchema()); } /** Pop an element from staticBools (using the specified store) */ @@ -652,7 +664,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.popFromField(_tableId, _keyTuple, 4, 1); + _store.popFromField(_tableId, _keyTuple, 4, 1, getSchema()); } /** Update an element of staticBools at `_index` */ @@ -660,7 +672,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.updateInField(_tableId, _keyTuple, 4, _index * 1, abi.encodePacked((_element))); + StoreSwitch.updateInField(_tableId, _keyTuple, 4, _index * 1, abi.encodePacked((_element)), getSchema()); } /** Update an element of staticBools (using the specified store) at `_index` */ @@ -668,7 +680,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.updateInField(_tableId, _keyTuple, 4, _index * 1, abi.encodePacked((_element))); + _store.updateInField(_tableId, _keyTuple, 4, _index * 1, abi.encodePacked((_element)), getSchema()); } /** Get the full data */ @@ -703,7 +715,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.setRecord(_tableId, _keyTuple, _data); + StoreSwitch.setRecord(_tableId, _keyTuple, _data, getSchema()); } /** Set the full data using individual values (using the specified store) */ @@ -721,7 +733,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.setRecord(_tableId, _keyTuple, _data); + _store.setRecord(_tableId, _keyTuple, _data, getSchema()); } /** Set the full data using the data struct */ @@ -805,7 +817,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.deleteRecord(_tableId, _keyTuple); + StoreSwitch.deleteRecord(_tableId, _keyTuple, getSchema()); } /* Delete all data for given keys (using the specified store) */ @@ -813,7 +825,7 @@ library Dynamics1 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.deleteRecord(_tableId, _keyTuple); + _store.deleteRecord(_tableId, _keyTuple, getSchema()); } } diff --git a/packages/cli/contracts/src/codegen/tables/Dynamics2.sol b/packages/cli/contracts/src/codegen/tables/Dynamics2.sol index 7ad7f58d48..67a49bd30d 100644 --- a/packages/cli/contracts/src/codegen/tables/Dynamics2.sol +++ b/packages/cli/contracts/src/codegen/tables/Dynamics2.sol @@ -80,7 +80,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 0); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 0, getSchema()); return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_uint64()); } @@ -89,7 +89,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = _store.getField(_tableId, _keyTuple, 0); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 0, getSchema()); return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_uint64()); } @@ -98,7 +98,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.setField(_tableId, _keyTuple, 0, EncodeArray.encode((u64))); + StoreSwitch.setField(_tableId, _keyTuple, 0, EncodeArray.encode((u64)), getSchema()); } /** Set u64 (using the specified store) */ @@ -106,7 +106,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.setField(_tableId, _keyTuple, 0, EncodeArray.encode((u64))); + _store.setField(_tableId, _keyTuple, 0, EncodeArray.encode((u64)), getSchema()); } /** Get the length of u64 */ @@ -150,7 +150,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.pushToField(_tableId, _keyTuple, 0, abi.encodePacked((_element))); + StoreSwitch.pushToField(_tableId, _keyTuple, 0, abi.encodePacked((_element)), getSchema()); } /** Push an element to u64 (using the specified store) */ @@ -158,7 +158,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.pushToField(_tableId, _keyTuple, 0, abi.encodePacked((_element))); + _store.pushToField(_tableId, _keyTuple, 0, abi.encodePacked((_element)), getSchema()); } /** Pop an element from u64 */ @@ -166,7 +166,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.popFromField(_tableId, _keyTuple, 0, 8); + StoreSwitch.popFromField(_tableId, _keyTuple, 0, 8, getSchema()); } /** Pop an element from u64 (using the specified store) */ @@ -174,7 +174,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.popFromField(_tableId, _keyTuple, 0, 8); + _store.popFromField(_tableId, _keyTuple, 0, 8, getSchema()); } /** Update an element of u64 at `_index` */ @@ -182,7 +182,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.updateInField(_tableId, _keyTuple, 0, _index * 8, abi.encodePacked((_element))); + StoreSwitch.updateInField(_tableId, _keyTuple, 0, _index * 8, abi.encodePacked((_element)), getSchema()); } /** Update an element of u64 (using the specified store) at `_index` */ @@ -190,7 +190,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.updateInField(_tableId, _keyTuple, 0, _index * 8, abi.encodePacked((_element))); + _store.updateInField(_tableId, _keyTuple, 0, _index * 8, abi.encodePacked((_element)), getSchema()); } /** Get str */ @@ -198,7 +198,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 1); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 1, getSchema()); return (string(_blob)); } @@ -207,7 +207,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = _store.getField(_tableId, _keyTuple, 1); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 1, getSchema()); return (string(_blob)); } @@ -216,7 +216,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.setField(_tableId, _keyTuple, 1, bytes((str))); + StoreSwitch.setField(_tableId, _keyTuple, 1, bytes((str)), getSchema()); } /** Set str (using the specified store) */ @@ -224,7 +224,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.setField(_tableId, _keyTuple, 1, bytes((str))); + _store.setField(_tableId, _keyTuple, 1, bytes((str)), getSchema()); } /** Get the length of str */ @@ -268,7 +268,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.pushToField(_tableId, _keyTuple, 1, bytes((_slice))); + StoreSwitch.pushToField(_tableId, _keyTuple, 1, bytes((_slice)), getSchema()); } /** Push a slice to str (using the specified store) */ @@ -276,7 +276,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.pushToField(_tableId, _keyTuple, 1, bytes((_slice))); + _store.pushToField(_tableId, _keyTuple, 1, bytes((_slice)), getSchema()); } /** Pop a slice from str */ @@ -284,7 +284,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.popFromField(_tableId, _keyTuple, 1, 1); + StoreSwitch.popFromField(_tableId, _keyTuple, 1, 1, getSchema()); } /** Pop a slice from str (using the specified store) */ @@ -292,7 +292,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.popFromField(_tableId, _keyTuple, 1, 1); + _store.popFromField(_tableId, _keyTuple, 1, 1, getSchema()); } /** Update a slice of str at `_index` */ @@ -300,7 +300,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.updateInField(_tableId, _keyTuple, 1, _index * 1, bytes((_slice))); + StoreSwitch.updateInField(_tableId, _keyTuple, 1, _index * 1, bytes((_slice)), getSchema()); } /** Update a slice of str (using the specified store) at `_index` */ @@ -308,7 +308,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.updateInField(_tableId, _keyTuple, 1, _index * 1, bytes((_slice))); + _store.updateInField(_tableId, _keyTuple, 1, _index * 1, bytes((_slice)), getSchema()); } /** Get b */ @@ -316,7 +316,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 2); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 2, getSchema()); return (bytes(_blob)); } @@ -325,7 +325,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - bytes memory _blob = _store.getField(_tableId, _keyTuple, 2); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 2, getSchema()); return (bytes(_blob)); } @@ -334,7 +334,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.setField(_tableId, _keyTuple, 2, bytes((b))); + StoreSwitch.setField(_tableId, _keyTuple, 2, bytes((b)), getSchema()); } /** Set b (using the specified store) */ @@ -342,7 +342,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.setField(_tableId, _keyTuple, 2, bytes((b))); + _store.setField(_tableId, _keyTuple, 2, bytes((b)), getSchema()); } /** Get the length of b */ @@ -386,7 +386,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.pushToField(_tableId, _keyTuple, 2, bytes((_slice))); + StoreSwitch.pushToField(_tableId, _keyTuple, 2, bytes((_slice)), getSchema()); } /** Push a slice to b (using the specified store) */ @@ -394,7 +394,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.pushToField(_tableId, _keyTuple, 2, bytes((_slice))); + _store.pushToField(_tableId, _keyTuple, 2, bytes((_slice)), getSchema()); } /** Pop a slice from b */ @@ -402,7 +402,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.popFromField(_tableId, _keyTuple, 2, 1); + StoreSwitch.popFromField(_tableId, _keyTuple, 2, 1, getSchema()); } /** Pop a slice from b (using the specified store) */ @@ -410,7 +410,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.popFromField(_tableId, _keyTuple, 2, 1); + _store.popFromField(_tableId, _keyTuple, 2, 1, getSchema()); } /** Update a slice of b at `_index` */ @@ -418,7 +418,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.updateInField(_tableId, _keyTuple, 2, _index * 1, bytes((_slice))); + StoreSwitch.updateInField(_tableId, _keyTuple, 2, _index * 1, bytes((_slice)), getSchema()); } /** Update a slice of b (using the specified store) at `_index` */ @@ -426,7 +426,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.updateInField(_tableId, _keyTuple, 2, _index * 1, bytes((_slice))); + _store.updateInField(_tableId, _keyTuple, 2, _index * 1, bytes((_slice)), getSchema()); } /** Get the full data */ @@ -454,7 +454,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.setRecord(_tableId, _keyTuple, _data); + StoreSwitch.setRecord(_tableId, _keyTuple, _data, getSchema()); } /** Set the full data using individual values (using the specified store) */ @@ -464,7 +464,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.setRecord(_tableId, _keyTuple, _data); + _store.setRecord(_tableId, _keyTuple, _data, getSchema()); } /** Set the full data using the data struct */ @@ -524,7 +524,7 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.deleteRecord(_tableId, _keyTuple); + StoreSwitch.deleteRecord(_tableId, _keyTuple, getSchema()); } /* Delete all data for given keys (using the specified store) */ @@ -532,6 +532,6 @@ library Dynamics2 { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.deleteRecord(_tableId, _keyTuple); + _store.deleteRecord(_tableId, _keyTuple, getSchema()); } } diff --git a/packages/cli/contracts/src/codegen/tables/Ephemeral.sol b/packages/cli/contracts/src/codegen/tables/Ephemeral.sol index 60edaa1a0d..bc044600e7 100644 --- a/packages/cli/contracts/src/codegen/tables/Ephemeral.sol +++ b/packages/cli/contracts/src/codegen/tables/Ephemeral.sol @@ -72,7 +72,7 @@ library Ephemeral { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - StoreSwitch.emitEphemeralRecord(_tableId, _keyTuple, _data); + StoreSwitch.emitEphemeralRecord(_tableId, _keyTuple, _data, getSchema()); } /** Emit the ephemeral event using individual values (using the specified store) */ @@ -82,7 +82,7 @@ library Ephemeral { bytes32[] memory _keyTuple = new bytes32[](1); _keyTuple[0] = key; - _store.emitEphemeralRecord(_tableId, _keyTuple, _data); + _store.emitEphemeralRecord(_tableId, _keyTuple, _data, getSchema()); } /** Tightly pack full data using this table's schema */ diff --git a/packages/cli/contracts/src/codegen/tables/Singleton.sol b/packages/cli/contracts/src/codegen/tables/Singleton.sol index 8939040967..99c5d60718 100644 --- a/packages/cli/contracts/src/codegen/tables/Singleton.sol +++ b/packages/cli/contracts/src/codegen/tables/Singleton.sol @@ -74,7 +74,7 @@ library Singleton { function getV1() internal view returns (int256 v1) { bytes32[] memory _keyTuple = new bytes32[](0); - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 0); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 0, getSchema()); return (int256(uint256(Bytes.slice32(_blob, 0)))); } @@ -82,7 +82,7 @@ library Singleton { function getV1(IStore _store) internal view returns (int256 v1) { bytes32[] memory _keyTuple = new bytes32[](0); - bytes memory _blob = _store.getField(_tableId, _keyTuple, 0); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 0, getSchema()); return (int256(uint256(Bytes.slice32(_blob, 0)))); } @@ -90,21 +90,21 @@ library Singleton { function setV1(int256 v1) internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.setField(_tableId, _keyTuple, 0, abi.encodePacked((v1))); + StoreSwitch.setField(_tableId, _keyTuple, 0, abi.encodePacked((v1)), getSchema()); } /** Set v1 (using the specified store) */ function setV1(IStore _store, int256 v1) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.setField(_tableId, _keyTuple, 0, abi.encodePacked((v1))); + _store.setField(_tableId, _keyTuple, 0, abi.encodePacked((v1)), getSchema()); } /** Get v2 */ function getV2() internal view returns (uint32[2] memory v2) { bytes32[] memory _keyTuple = new bytes32[](0); - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 1); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 1, getSchema()); return toStaticArray_uint32_2(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_uint32()); } @@ -112,7 +112,7 @@ library Singleton { function getV2(IStore _store) internal view returns (uint32[2] memory v2) { bytes32[] memory _keyTuple = new bytes32[](0); - bytes memory _blob = _store.getField(_tableId, _keyTuple, 1); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 1, getSchema()); return toStaticArray_uint32_2(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_uint32()); } @@ -120,14 +120,14 @@ library Singleton { function setV2(uint32[2] memory v2) internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.setField(_tableId, _keyTuple, 1, EncodeArray.encode(fromStaticArray_uint32_2(v2))); + StoreSwitch.setField(_tableId, _keyTuple, 1, EncodeArray.encode(fromStaticArray_uint32_2(v2)), getSchema()); } /** Set v2 (using the specified store) */ function setV2(IStore _store, uint32[2] memory v2) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.setField(_tableId, _keyTuple, 1, EncodeArray.encode(fromStaticArray_uint32_2(v2))); + _store.setField(_tableId, _keyTuple, 1, EncodeArray.encode(fromStaticArray_uint32_2(v2)), getSchema()); } /** Get the length of v2 */ @@ -166,49 +166,49 @@ library Singleton { function pushV2(uint32 _element) internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.pushToField(_tableId, _keyTuple, 1, abi.encodePacked((_element))); + StoreSwitch.pushToField(_tableId, _keyTuple, 1, abi.encodePacked((_element)), getSchema()); } /** Push an element to v2 (using the specified store) */ function pushV2(IStore _store, uint32 _element) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.pushToField(_tableId, _keyTuple, 1, abi.encodePacked((_element))); + _store.pushToField(_tableId, _keyTuple, 1, abi.encodePacked((_element)), getSchema()); } /** Pop an element from v2 */ function popV2() internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.popFromField(_tableId, _keyTuple, 1, 4); + StoreSwitch.popFromField(_tableId, _keyTuple, 1, 4, getSchema()); } /** Pop an element from v2 (using the specified store) */ function popV2(IStore _store) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.popFromField(_tableId, _keyTuple, 1, 4); + _store.popFromField(_tableId, _keyTuple, 1, 4, getSchema()); } /** Update an element of v2 at `_index` */ function updateV2(uint256 _index, uint32 _element) internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.updateInField(_tableId, _keyTuple, 1, _index * 4, abi.encodePacked((_element))); + StoreSwitch.updateInField(_tableId, _keyTuple, 1, _index * 4, abi.encodePacked((_element)), getSchema()); } /** Update an element of v2 (using the specified store) at `_index` */ function updateV2(IStore _store, uint256 _index, uint32 _element) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.updateInField(_tableId, _keyTuple, 1, _index * 4, abi.encodePacked((_element))); + _store.updateInField(_tableId, _keyTuple, 1, _index * 4, abi.encodePacked((_element)), getSchema()); } /** Get v3 */ function getV3() internal view returns (uint32[2] memory v3) { bytes32[] memory _keyTuple = new bytes32[](0); - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 2); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 2, getSchema()); return toStaticArray_uint32_2(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_uint32()); } @@ -216,7 +216,7 @@ library Singleton { function getV3(IStore _store) internal view returns (uint32[2] memory v3) { bytes32[] memory _keyTuple = new bytes32[](0); - bytes memory _blob = _store.getField(_tableId, _keyTuple, 2); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 2, getSchema()); return toStaticArray_uint32_2(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_uint32()); } @@ -224,14 +224,14 @@ library Singleton { function setV3(uint32[2] memory v3) internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.setField(_tableId, _keyTuple, 2, EncodeArray.encode(fromStaticArray_uint32_2(v3))); + StoreSwitch.setField(_tableId, _keyTuple, 2, EncodeArray.encode(fromStaticArray_uint32_2(v3)), getSchema()); } /** Set v3 (using the specified store) */ function setV3(IStore _store, uint32[2] memory v3) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.setField(_tableId, _keyTuple, 2, EncodeArray.encode(fromStaticArray_uint32_2(v3))); + _store.setField(_tableId, _keyTuple, 2, EncodeArray.encode(fromStaticArray_uint32_2(v3)), getSchema()); } /** Get the length of v3 */ @@ -270,49 +270,49 @@ library Singleton { function pushV3(uint32 _element) internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.pushToField(_tableId, _keyTuple, 2, abi.encodePacked((_element))); + StoreSwitch.pushToField(_tableId, _keyTuple, 2, abi.encodePacked((_element)), getSchema()); } /** Push an element to v3 (using the specified store) */ function pushV3(IStore _store, uint32 _element) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.pushToField(_tableId, _keyTuple, 2, abi.encodePacked((_element))); + _store.pushToField(_tableId, _keyTuple, 2, abi.encodePacked((_element)), getSchema()); } /** Pop an element from v3 */ function popV3() internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.popFromField(_tableId, _keyTuple, 2, 4); + StoreSwitch.popFromField(_tableId, _keyTuple, 2, 4, getSchema()); } /** Pop an element from v3 (using the specified store) */ function popV3(IStore _store) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.popFromField(_tableId, _keyTuple, 2, 4); + _store.popFromField(_tableId, _keyTuple, 2, 4, getSchema()); } /** Update an element of v3 at `_index` */ function updateV3(uint256 _index, uint32 _element) internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.updateInField(_tableId, _keyTuple, 2, _index * 4, abi.encodePacked((_element))); + StoreSwitch.updateInField(_tableId, _keyTuple, 2, _index * 4, abi.encodePacked((_element)), getSchema()); } /** Update an element of v3 (using the specified store) at `_index` */ function updateV3(IStore _store, uint256 _index, uint32 _element) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.updateInField(_tableId, _keyTuple, 2, _index * 4, abi.encodePacked((_element))); + _store.updateInField(_tableId, _keyTuple, 2, _index * 4, abi.encodePacked((_element)), getSchema()); } /** Get v4 */ function getV4() internal view returns (uint32[1] memory v4) { bytes32[] memory _keyTuple = new bytes32[](0); - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 3); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 3, getSchema()); return toStaticArray_uint32_1(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_uint32()); } @@ -320,7 +320,7 @@ library Singleton { function getV4(IStore _store) internal view returns (uint32[1] memory v4) { bytes32[] memory _keyTuple = new bytes32[](0); - bytes memory _blob = _store.getField(_tableId, _keyTuple, 3); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 3, getSchema()); return toStaticArray_uint32_1(SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_uint32()); } @@ -328,14 +328,14 @@ library Singleton { function setV4(uint32[1] memory v4) internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.setField(_tableId, _keyTuple, 3, EncodeArray.encode(fromStaticArray_uint32_1(v4))); + StoreSwitch.setField(_tableId, _keyTuple, 3, EncodeArray.encode(fromStaticArray_uint32_1(v4)), getSchema()); } /** Set v4 (using the specified store) */ function setV4(IStore _store, uint32[1] memory v4) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.setField(_tableId, _keyTuple, 3, EncodeArray.encode(fromStaticArray_uint32_1(v4))); + _store.setField(_tableId, _keyTuple, 3, EncodeArray.encode(fromStaticArray_uint32_1(v4)), getSchema()); } /** Get the length of v4 */ @@ -374,42 +374,42 @@ library Singleton { function pushV4(uint32 _element) internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.pushToField(_tableId, _keyTuple, 3, abi.encodePacked((_element))); + StoreSwitch.pushToField(_tableId, _keyTuple, 3, abi.encodePacked((_element)), getSchema()); } /** Push an element to v4 (using the specified store) */ function pushV4(IStore _store, uint32 _element) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.pushToField(_tableId, _keyTuple, 3, abi.encodePacked((_element))); + _store.pushToField(_tableId, _keyTuple, 3, abi.encodePacked((_element)), getSchema()); } /** Pop an element from v4 */ function popV4() internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.popFromField(_tableId, _keyTuple, 3, 4); + StoreSwitch.popFromField(_tableId, _keyTuple, 3, 4, getSchema()); } /** Pop an element from v4 (using the specified store) */ function popV4(IStore _store) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.popFromField(_tableId, _keyTuple, 3, 4); + _store.popFromField(_tableId, _keyTuple, 3, 4, getSchema()); } /** Update an element of v4 at `_index` */ function updateV4(uint256 _index, uint32 _element) internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.updateInField(_tableId, _keyTuple, 3, _index * 4, abi.encodePacked((_element))); + StoreSwitch.updateInField(_tableId, _keyTuple, 3, _index * 4, abi.encodePacked((_element)), getSchema()); } /** Update an element of v4 (using the specified store) at `_index` */ function updateV4(IStore _store, uint256 _index, uint32 _element) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.updateInField(_tableId, _keyTuple, 3, _index * 4, abi.encodePacked((_element))); + _store.updateInField(_tableId, _keyTuple, 3, _index * 4, abi.encodePacked((_element)), getSchema()); } /** Get the full data */ @@ -436,7 +436,7 @@ library Singleton { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.setRecord(_tableId, _keyTuple, _data); + StoreSwitch.setRecord(_tableId, _keyTuple, _data, getSchema()); } /** Set the full data using individual values (using the specified store) */ @@ -445,7 +445,7 @@ library Singleton { bytes32[] memory _keyTuple = new bytes32[](0); - _store.setRecord(_tableId, _keyTuple, _data); + _store.setRecord(_tableId, _keyTuple, _data, getSchema()); } /** Decode the tightly packed blob using this table's schema */ @@ -509,14 +509,14 @@ library Singleton { function deleteRecord() internal { bytes32[] memory _keyTuple = new bytes32[](0); - StoreSwitch.deleteRecord(_tableId, _keyTuple); + StoreSwitch.deleteRecord(_tableId, _keyTuple, getSchema()); } /* Delete all data for given keys (using the specified store) */ function deleteRecord(IStore _store) internal { bytes32[] memory _keyTuple = new bytes32[](0); - _store.deleteRecord(_tableId, _keyTuple); + _store.deleteRecord(_tableId, _keyTuple, getSchema()); } } diff --git a/packages/cli/contracts/src/codegen/tables/Statics.sol b/packages/cli/contracts/src/codegen/tables/Statics.sol index c8b3f4be8b..a4ef1b244d 100644 --- a/packages/cli/contracts/src/codegen/tables/Statics.sol +++ b/packages/cli/contracts/src/codegen/tables/Statics.sol @@ -115,7 +115,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 0); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 0, getSchema()); return (uint256(Bytes.slice32(_blob, 0))); } @@ -139,7 +139,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = _store.getField(_tableId, _keyTuple, 0); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 0, getSchema()); return (uint256(Bytes.slice32(_blob, 0))); } @@ -154,7 +154,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - StoreSwitch.setField(_tableId, _keyTuple, 0, abi.encodePacked((v1))); + StoreSwitch.setField(_tableId, _keyTuple, 0, abi.encodePacked((v1)), getSchema()); } /** Set v1 (using the specified store) */ @@ -178,7 +178,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - _store.setField(_tableId, _keyTuple, 0, abi.encodePacked((v1))); + _store.setField(_tableId, _keyTuple, 0, abi.encodePacked((v1)), getSchema()); } /** Get v2 */ @@ -200,7 +200,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 1); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 1, getSchema()); return (int32(uint32(Bytes.slice4(_blob, 0)))); } @@ -224,7 +224,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = _store.getField(_tableId, _keyTuple, 1); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 1, getSchema()); return (int32(uint32(Bytes.slice4(_blob, 0)))); } @@ -239,7 +239,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - StoreSwitch.setField(_tableId, _keyTuple, 1, abi.encodePacked((v2))); + StoreSwitch.setField(_tableId, _keyTuple, 1, abi.encodePacked((v2)), getSchema()); } /** Set v2 (using the specified store) */ @@ -263,7 +263,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - _store.setField(_tableId, _keyTuple, 1, abi.encodePacked((v2))); + _store.setField(_tableId, _keyTuple, 1, abi.encodePacked((v2)), getSchema()); } /** Get v3 */ @@ -285,7 +285,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 2); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 2, getSchema()); return (Bytes.slice16(_blob, 0)); } @@ -309,7 +309,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = _store.getField(_tableId, _keyTuple, 2); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 2, getSchema()); return (Bytes.slice16(_blob, 0)); } @@ -324,7 +324,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - StoreSwitch.setField(_tableId, _keyTuple, 2, abi.encodePacked((v3))); + StoreSwitch.setField(_tableId, _keyTuple, 2, abi.encodePacked((v3)), getSchema()); } /** Set v3 (using the specified store) */ @@ -348,7 +348,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - _store.setField(_tableId, _keyTuple, 2, abi.encodePacked((v3))); + _store.setField(_tableId, _keyTuple, 2, abi.encodePacked((v3)), getSchema()); } /** Get v4 */ @@ -370,7 +370,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 3); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 3, getSchema()); return (address(Bytes.slice20(_blob, 0))); } @@ -394,7 +394,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = _store.getField(_tableId, _keyTuple, 3); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 3, getSchema()); return (address(Bytes.slice20(_blob, 0))); } @@ -409,7 +409,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - StoreSwitch.setField(_tableId, _keyTuple, 3, abi.encodePacked((v4))); + StoreSwitch.setField(_tableId, _keyTuple, 3, abi.encodePacked((v4)), getSchema()); } /** Set v4 (using the specified store) */ @@ -433,7 +433,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - _store.setField(_tableId, _keyTuple, 3, abi.encodePacked((v4))); + _store.setField(_tableId, _keyTuple, 3, abi.encodePacked((v4)), getSchema()); } /** Get v5 */ @@ -455,7 +455,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 4); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 4, getSchema()); return (_toBool(uint8(Bytes.slice1(_blob, 0)))); } @@ -479,7 +479,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = _store.getField(_tableId, _keyTuple, 4); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 4, getSchema()); return (_toBool(uint8(Bytes.slice1(_blob, 0)))); } @@ -494,7 +494,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - StoreSwitch.setField(_tableId, _keyTuple, 4, abi.encodePacked((v5))); + StoreSwitch.setField(_tableId, _keyTuple, 4, abi.encodePacked((v5)), getSchema()); } /** Set v5 (using the specified store) */ @@ -518,7 +518,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - _store.setField(_tableId, _keyTuple, 4, abi.encodePacked((v5))); + _store.setField(_tableId, _keyTuple, 4, abi.encodePacked((v5)), getSchema()); } /** Get v6 */ @@ -540,7 +540,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 5); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 5, getSchema()); return Enum1(uint8(Bytes.slice1(_blob, 0))); } @@ -564,7 +564,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = _store.getField(_tableId, _keyTuple, 5); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 5, getSchema()); return Enum1(uint8(Bytes.slice1(_blob, 0))); } @@ -579,7 +579,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - StoreSwitch.setField(_tableId, _keyTuple, 5, abi.encodePacked(uint8(v6))); + StoreSwitch.setField(_tableId, _keyTuple, 5, abi.encodePacked(uint8(v6)), getSchema()); } /** Set v6 (using the specified store) */ @@ -603,7 +603,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - _store.setField(_tableId, _keyTuple, 5, abi.encodePacked(uint8(v6))); + _store.setField(_tableId, _keyTuple, 5, abi.encodePacked(uint8(v6)), getSchema()); } /** Get v7 */ @@ -625,7 +625,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 6); + bytes memory _blob = StoreSwitch.getField(_tableId, _keyTuple, 6, getSchema()); return Enum2(uint8(Bytes.slice1(_blob, 0))); } @@ -649,7 +649,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - bytes memory _blob = _store.getField(_tableId, _keyTuple, 6); + bytes memory _blob = _store.getField(_tableId, _keyTuple, 6, getSchema()); return Enum2(uint8(Bytes.slice1(_blob, 0))); } @@ -664,7 +664,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - StoreSwitch.setField(_tableId, _keyTuple, 6, abi.encodePacked(uint8(v7))); + StoreSwitch.setField(_tableId, _keyTuple, 6, abi.encodePacked(uint8(v7)), getSchema()); } /** Set v7 (using the specified store) */ @@ -688,7 +688,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - _store.setField(_tableId, _keyTuple, 6, abi.encodePacked(uint8(v7))); + _store.setField(_tableId, _keyTuple, 6, abi.encodePacked(uint8(v7)), getSchema()); } /** Get the full data */ @@ -766,7 +766,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - StoreSwitch.setRecord(_tableId, _keyTuple, _data); + StoreSwitch.setRecord(_tableId, _keyTuple, _data, getSchema()); } /** Set the full data using individual values (using the specified store) */ @@ -798,7 +798,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - _store.setRecord(_tableId, _keyTuple, _data); + _store.setRecord(_tableId, _keyTuple, _data, getSchema()); } /** Set the full data using the data struct */ @@ -907,7 +907,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - StoreSwitch.deleteRecord(_tableId, _keyTuple); + StoreSwitch.deleteRecord(_tableId, _keyTuple, getSchema()); } /* Delete all data for given keys (using the specified store) */ @@ -930,7 +930,7 @@ library Statics { _keyTuple[5] = bytes32(uint256(uint8(k6))); _keyTuple[6] = bytes32(uint256(uint8(k7))); - _store.deleteRecord(_tableId, _keyTuple); + _store.deleteRecord(_tableId, _keyTuple, getSchema()); } } diff --git a/packages/store/abi/IStore.sol/IStore.abi.json b/packages/store/abi/IStore.sol/IStore.abi.json index 4d3403a378..3dc7bc3b3a 100644 --- a/packages/store/abi/IStore.sol/IStore.abi.json +++ b/packages/store/abi/IStore.sol/IStore.abi.json @@ -293,7 +293,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -327,7 +327,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" }, { @@ -400,30 +400,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/packages/store/abi/IStore.sol/IStoreData.abi.json b/packages/store/abi/IStore.sol/IStoreData.abi.json index 6f7bd6ef6e..8bdc4379fa 100644 --- a/packages/store/abi/IStore.sol/IStoreData.abi.json +++ b/packages/store/abi/IStore.sol/IStoreData.abi.json @@ -150,7 +150,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -184,7 +184,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" }, { @@ -257,30 +257,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/packages/store/abi/IStore.sol/IStoreRead.abi.json b/packages/store/abi/IStore.sol/IStoreRead.abi.json index 8b6ae6348c..ca89eb4ba5 100644 --- a/packages/store/abi/IStore.sol/IStoreRead.abi.json +++ b/packages/store/abi/IStore.sol/IStoreRead.abi.json @@ -52,7 +52,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -86,7 +86,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" }, { @@ -159,30 +159,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/packages/store/abi/StoreMock.sol/StoreMock.abi.json b/packages/store/abi/StoreMock.sol/StoreMock.abi.json index 1caff9dff7..b0bd44ca92 100644 --- a/packages/store/abi/StoreMock.sol/StoreMock.abi.json +++ b/packages/store/abi/StoreMock.sol/StoreMock.abi.json @@ -437,30 +437,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/packages/store/abi/StoreRead.sol/StoreRead.abi.json b/packages/store/abi/StoreRead.sol/StoreRead.abi.json index 14b0ca174f..b05f278530 100644 --- a/packages/store/abi/StoreRead.sol/StoreRead.abi.json +++ b/packages/store/abi/StoreRead.sol/StoreRead.abi.json @@ -270,30 +270,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/packages/store/abi/StoreReadWithStubs.sol/StoreReadWithStubs.abi.json b/packages/store/abi/StoreReadWithStubs.sol/StoreReadWithStubs.abi.json index 9d45890796..e2c74d7f0c 100644 --- a/packages/store/abi/StoreReadWithStubs.sol/StoreReadWithStubs.abi.json +++ b/packages/store/abi/StoreReadWithStubs.sol/StoreReadWithStubs.abi.json @@ -442,30 +442,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/packages/store/gas-report.json b/packages/store/gas-report.json deleted file mode 100644 index b67b11fd95..0000000000 --- a/packages/store/gas-report.json +++ /dev/null @@ -1,956 +0,0 @@ -[ - { - "file": "test/Bytes.t.sol", - "test": "testEquals", - "name": "compare equal bytes", - "gasUsed": 196 - }, - { - "file": "test/Bytes.t.sol", - "test": "testEqualsFalse", - "name": "compare unequal bytes", - "gasUsed": 196 - }, - { - "file": "test/Bytes.t.sol", - "test": "testSetBytes1", - "name": "set bytes1 in bytes32", - "gasUsed": 16 - }, - { - "file": "test/Bytes.t.sol", - "test": "testSetBytes2", - "name": "set bytes2 in bytes32", - "gasUsed": 16 - }, - { - "file": "test/Bytes.t.sol", - "test": "testSetBytes4", - "name": "set bytes4 in bytes32", - "gasUsed": 16 - }, - { - "file": "test/Bytes.t.sol", - "test": "testSetBytes4Memory", - "name": "set bytes4 in bytes memory", - "gasUsed": 37 - }, - { - "file": "test/Bytes.t.sol", - "test": "testSlice3", - "name": "slice bytes3 with offset 1", - "gasUsed": 68 - }, - { - "file": "test/Bytes.t.sol", - "test": "testSlice32", - "name": "slice bytes32 with offset 10", - "gasUsed": 68 - }, - { - "file": "test/Bytes.t.sol", - "test": "testToBytes32", - "name": "create bytes32 from bytes memory with offset 0", - "gasUsed": 25 - }, - { - "file": "test/Bytes.t.sol", - "test": "testToBytes32CrossWord", - "name": "create bytes32 from bytes memory with offset 16", - "gasUsed": 36 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareAbiEncodeVsCustom", - "name": "abi encode", - "gasUsed": 949 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareAbiEncodeVsCustom", - "name": "abi decode", - "gasUsed": 1738 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareAbiEncodeVsCustom", - "name": "custom encode", - "gasUsed": 2806 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareAbiEncodeVsCustom", - "name": "custom decode", - "gasUsed": 2707 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareAbiEncodeVsCustom", - "name": "pass abi encoded bytes to external contract", - "gasUsed": 6551 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareAbiEncodeVsCustom", - "name": "pass custom encoded bytes to external contract", - "gasUsed": 1445 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareStorageWriteMUD", - "name": "MUD storage write (cold, 1 word)", - "gasUsed": 22339 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareStorageWriteMUD", - "name": "MUD storage write (cold, 1 word, partial)", - "gasUsed": 22406 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareStorageWriteMUD", - "name": "MUD storage write (cold, 10 words)", - "gasUsed": 199795 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareStorageWriteMUD", - "name": "MUD storage write (warm, 1 word)", - "gasUsed": 339 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareStorageWriteMUD", - "name": "MUD storage write (warm, 1 word, partial)", - "gasUsed": 506 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareStorageWriteMUD", - "name": "MUD storage write (warm, 10 words)", - "gasUsed": 1795 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareStorageWriteSolidity", - "name": "solidity storage write (cold, 1 word)", - "gasUsed": 22107 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareStorageWriteSolidity", - "name": "solidity storage write (cold, 1 word, partial)", - "gasUsed": 22136 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareStorageWriteSolidity", - "name": "solidity storage write (cold, 10 words)", - "gasUsed": 199902 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareStorageWriteSolidity", - "name": "solidity storage write (warm, 1 word)", - "gasUsed": 107 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareStorageWriteSolidity", - "name": "solidity storage write (warm, 1 word, partial)", - "gasUsed": 236 - }, - { - "file": "test/Gas.t.sol", - "test": "testCompareStorageWriteSolidity", - "name": "solidity storage write (warm, 10 words)", - "gasUsed": 1988 - }, - { - "file": "test/GasStorageLoad.t.sol", - "test": "testCompareStorageLoadMUD", - "name": "MUD storage load (cold, 1 word)", - "gasUsed": 2411 - }, - { - "file": "test/GasStorageLoad.t.sol", - "test": "testCompareStorageLoadMUD", - "name": "MUD storage load (cold, 1 word, partial)", - "gasUsed": 2460 - }, - { - "file": "test/GasStorageLoad.t.sol", - "test": "testCompareStorageLoadMUD", - "name": "MUD storage load (cold, 10 words)", - "gasUsed": 19911 - }, - { - "file": "test/GasStorageLoad.t.sol", - "test": "testCompareStorageLoadMUD", - "name": "MUD storage load (warm, 1 word)", - "gasUsed": 412 - }, - { - "file": "test/GasStorageLoad.t.sol", - "test": "testCompareStorageLoadMUD", - "name": "MUD storage load (warm, 1 word, partial)", - "gasUsed": 460 - }, - { - "file": "test/GasStorageLoad.t.sol", - "test": "testCompareStorageLoadMUD", - "name": "MUD storage load (warm, 10 words)", - "gasUsed": 1914 - }, - { - "file": "test/GasStorageLoad.t.sol", - "test": "testCompareStorageLoadSolidity", - "name": "solidity storage load (cold, 1 word)", - "gasUsed": 2109 - }, - { - "file": "test/GasStorageLoad.t.sol", - "test": "testCompareStorageLoadSolidity", - "name": "solidity storage load (cold, 1 word, partial)", - "gasUsed": 2126 - }, - { - "file": "test/GasStorageLoad.t.sol", - "test": "testCompareStorageLoadSolidity", - "name": "solidity storage load (cold, 10 words)", - "gasUsed": 19894 - }, - { - "file": "test/GasStorageLoad.t.sol", - "test": "testCompareStorageLoadSolidity", - "name": "solidity storage load (warm, 1 word)", - "gasUsed": 109 - }, - { - "file": "test/GasStorageLoad.t.sol", - "test": "testCompareStorageLoadSolidity", - "name": "solidity storage load (warm, 1 word, partial)", - "gasUsed": 126 - }, - { - "file": "test/GasStorageLoad.t.sol", - "test": "testCompareStorageLoadSolidity", - "name": "solidity storage load (warm, 10 words)", - "gasUsed": 1897 - }, - { - "file": "test/KeyEncoding.t.sol", - "test": "testRegisterAndGetSchema", - "name": "register KeyEncoding schema", - "gasUsed": 65010 - }, - { - "file": "test/Mixed.t.sol", - "test": "testCompareSolidity", - "name": "store Mixed struct in storage (native solidity)", - "gasUsed": 92038 - }, - { - "file": "test/Mixed.t.sol", - "test": "testRegisterAndGetSchema", - "name": "register Mixed schema", - "gasUsed": 61992 - }, - { - "file": "test/Mixed.t.sol", - "test": "testSetAndGet", - "name": "set record in Mixed", - "gasUsed": 110065 - }, - { - "file": "test/Mixed.t.sol", - "test": "testSetAndGet", - "name": "get record from Mixed", - "gasUsed": 12408 - }, - { - "file": "test/PackedCounter.t.sol", - "test": "testAtIndex", - "name": "get value at index of PackedCounter", - "gasUsed": 255 - }, - { - "file": "test/PackedCounter.t.sol", - "test": "testSetAtIndex", - "name": "set value at index of PackedCounter", - "gasUsed": 793 - }, - { - "file": "test/PackedCounter.t.sol", - "test": "testTotal", - "name": "pack uint40 array into PackedCounter", - "gasUsed": 2146 - }, - { - "file": "test/PackedCounter.t.sol", - "test": "testTotal", - "name": "get total of PackedCounter", - "gasUsed": 27 - }, - { - "file": "test/Schema.t.sol", - "test": "testEncodeDecodeSchema", - "name": "encode schema with 6 entries", - "gasUsed": 5639 - }, - { - "file": "test/Schema.t.sol", - "test": "testEncodeDecodeSchema", - "name": "get schema type at index", - "gasUsed": 185 - }, - { - "file": "test/Schema.t.sol", - "test": "testGetNumDynamicFields", - "name": "get number of dynamic fields from schema", - "gasUsed": 74 - }, - { - "file": "test/Schema.t.sol", - "test": "testGetNumStaticFields", - "name": "get number of static fields from schema", - "gasUsed": 85 - }, - { - "file": "test/Schema.t.sol", - "test": "testGetStaticSchemaLength", - "name": "get static data length from schema", - "gasUsed": 33 - }, - { - "file": "test/Schema.t.sol", - "test": "testIsEmptyFalse", - "name": "check if schema is empty (non-empty schema)", - "gasUsed": 7 - }, - { - "file": "test/Schema.t.sol", - "test": "testIsEmptyTrue", - "name": "check if schema is empty (empty schema)", - "gasUsed": 7 - }, - { - "file": "test/Schema.t.sol", - "test": "testValidate", - "name": "validate schema", - "gasUsed": 16381 - }, - { - "file": "test/Slice.t.sol", - "test": "testFromBytes", - "name": "make Slice from bytes", - "gasUsed": 31 - }, - { - "file": "test/Slice.t.sol", - "test": "testFromBytes", - "name": "get Slice length", - "gasUsed": 10 - }, - { - "file": "test/Slice.t.sol", - "test": "testFromBytes", - "name": "get Slice pointer", - "gasUsed": 33 - }, - { - "file": "test/Slice.t.sol", - "test": "testSubslice", - "name": "subslice bytes (no copy) [1:4]", - "gasUsed": 311 - }, - { - "file": "test/Slice.t.sol", - "test": "testSubslice", - "name": "subslice bytes (no copy) [4:37]", - "gasUsed": 311 - }, - { - "file": "test/Slice.t.sol", - "test": "testToBytes", - "name": "Slice (0 bytes) to bytes memory", - "gasUsed": 298 - }, - { - "file": "test/Slice.t.sol", - "test": "testToBytes", - "name": "Slice (2 bytes) to bytes memory", - "gasUsed": 534 - }, - { - "file": "test/Slice.t.sol", - "test": "testToBytes", - "name": "Slice (32 bytes) to bytes memory", - "gasUsed": 545 - }, - { - "file": "test/Slice.t.sol", - "test": "testToBytes", - "name": "Slice (34 bytes) to bytes memory", - "gasUsed": 750 - }, - { - "file": "test/Slice.t.sol", - "test": "testToBytes", - "name": "Slice (1024 bytes) to bytes memory", - "gasUsed": 7264 - }, - { - "file": "test/Slice.t.sol", - "test": "testToBytes", - "name": "Slice (1024x1024 bytes) to bytes memory", - "gasUsed": 9205065 - }, - { - "file": "test/Slice.t.sol", - "test": "testToBytes32", - "name": "Slice to bytes32", - "gasUsed": 81 - }, - { - "file": "test/Storage.t.sol", - "test": "testStoreLoad", - "name": "store 1 storage slot", - "gasUsed": 22339 - }, - { - "file": "test/Storage.t.sol", - "test": "testStoreLoad", - "name": "store 34 bytes over 3 storage slots (with offset and safeTrail))", - "gasUsed": 23009 - }, - { - "file": "test/Storage.t.sol", - "test": "testStoreLoad", - "name": "load 34 bytes over 3 storage slots (with offset and safeTrail))", - "gasUsed": 865 - }, - { - "file": "test/StoreCoreDynamic.t.sol", - "test": "testGetFieldSlice", - "name": "get field slice (cold, 1 slot)", - "gasUsed": 7996 - }, - { - "file": "test/StoreCoreDynamic.t.sol", - "test": "testGetFieldSlice", - "name": "get field slice (warm, 1 slot)", - "gasUsed": 2065 - }, - { - "file": "test/StoreCoreDynamic.t.sol", - "test": "testGetFieldSlice", - "name": "get field slice (semi-cold, 1 slot)", - "gasUsed": 4070 - }, - { - "file": "test/StoreCoreDynamic.t.sol", - "test": "testGetFieldSlice", - "name": "get field slice (warm, 2 slots)", - "gasUsed": 4296 - }, - { - "file": "test/StoreCoreDynamic.t.sol", - "test": "testGetSecondFieldLength", - "name": "get field length (cold, 1 slot)", - "gasUsed": 7959 - }, - { - "file": "test/StoreCoreDynamic.t.sol", - "test": "testGetSecondFieldLength", - "name": "get field length (warm, 1 slot)", - "gasUsed": 1956 - }, - { - "file": "test/StoreCoreDynamic.t.sol", - "test": "testGetThirdFieldLength", - "name": "get field length (warm due to , 2 slots)", - "gasUsed": 7959 - }, - { - "file": "test/StoreCoreDynamic.t.sol", - "test": "testGetThirdFieldLength", - "name": "get field length (warm, 2 slots)", - "gasUsed": 1955 - }, - { - "file": "test/StoreCoreDynamic.t.sol", - "test": "testPopFromSecondField", - "name": "pop from field (cold, 1 slot, 1 uint32 item)", - "gasUsed": 30283 - }, - { - "file": "test/StoreCoreDynamic.t.sol", - "test": "testPopFromSecondField", - "name": "pop from field (warm, 1 slot, 1 uint32 item)", - "gasUsed": 18338 - }, - { - "file": "test/StoreCoreDynamic.t.sol", - "test": "testPopFromThirdField", - "name": "pop from field (cold, 2 slots, 10 uint32 items)", - "gasUsed": 32033 - }, - { - "file": "test/StoreCoreDynamic.t.sol", - "test": "testPopFromThirdField", - "name": "pop from field (warm, 2 slots, 10 uint32 items)", - "gasUsed": 18088 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testAccessEmptyData", - "name": "access non-existing record", - "gasUsed": 7267 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testAccessEmptyData", - "name": "access static field of non-existing record", - "gasUsed": 2758 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testAccessEmptyData", - "name": "access dynamic field of non-existing record", - "gasUsed": 3420 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testAccessEmptyData", - "name": "access length of dynamic field of non-existing record", - "gasUsed": 1328 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testAccessEmptyData", - "name": "access slice of dynamic field of non-existing record", - "gasUsed": 1202 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testDeleteData", - "name": "delete record (complex data, 3 slots)", - "gasUsed": 10039 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testHasSchema", - "name": "Check for existence of table (existent)", - "gasUsed": 1127 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testHasSchema", - "name": "check for existence of table (non-existent)", - "gasUsed": 3129 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testHooks", - "name": "register subscriber", - "gasUsed": 65901 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testHooks", - "name": "set record on table with subscriber", - "gasUsed": 73613 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testHooks", - "name": "set static field on table with subscriber", - "gasUsed": 29530 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testHooks", - "name": "delete record on table with subscriber", - "gasUsed": 22156 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testHooksDynamicData", - "name": "register subscriber", - "gasUsed": 65901 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testHooksDynamicData", - "name": "set (dynamic) record on table with subscriber", - "gasUsed": 166918 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testHooksDynamicData", - "name": "set (dynamic) field on table with subscriber", - "gasUsed": 32608 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testHooksDynamicData", - "name": "delete (dynamic) record on table with subscriber", - "gasUsed": 23622 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testPushToField", - "name": "push to field (1 slot, 1 uint32 item)", - "gasUsed": 15960 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testPushToField", - "name": "push to field (2 slots, 10 uint32 items)", - "gasUsed": 38621 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testRegisterAndGetSchema", - "name": "StoreCore: register schema", - "gasUsed": 54509 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testRegisterAndGetSchema", - "name": "StoreCore: get schema (warm)", - "gasUsed": 1128 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testRegisterAndGetSchema", - "name": "StoreCore: get key schema (warm)", - "gasUsed": 2324 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetDynamicData", - "name": "set complex record with dynamic data (4 slots)", - "gasUsed": 108662 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetDynamicData", - "name": "get complex record with dynamic data (4 slots)", - "gasUsed": 6280 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetDynamicData", - "name": "compare: Set complex record with dynamic data using native solidity", - "gasUsed": 116842 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetDynamicData", - "name": "compare: Set complex record with dynamic data using abi.encode", - "gasUsed": 267369 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetDynamicDataLength", - "name": "set dynamic length of dynamic index 0", - "gasUsed": 23610 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetDynamicDataLength", - "name": "set dynamic length of dynamic index 1", - "gasUsed": 1711 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetDynamicDataLength", - "name": "reduce dynamic length of dynamic index 0", - "gasUsed": 1699 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetField", - "name": "set static field (1 slot)", - "gasUsed": 38980 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetField", - "name": "get static field (1 slot)", - "gasUsed": 2759 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetField", - "name": "set static field (overlap 2 slot)", - "gasUsed": 33927 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetField", - "name": "get static field (overlap 2 slot)", - "gasUsed": 3580 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetField", - "name": "set dynamic field (1 slot, first dynamic field)", - "gasUsed": 56407 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetField", - "name": "get dynamic field (1 slot, first dynamic field)", - "gasUsed": 3609 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetField", - "name": "set dynamic field (1 slot, second dynamic field)", - "gasUsed": 34540 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetField", - "name": "get dynamic field (1 slot, second dynamic field)", - "gasUsed": 3625 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetStaticData", - "name": "set static record (1 slot)", - "gasUsed": 38449 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetStaticData", - "name": "get static record (1 slot)", - "gasUsed": 1266 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetStaticDataSpanningWords", - "name": "set static record (2 slots)", - "gasUsed": 60954 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetAndGetStaticDataSpanningWords", - "name": "get static record (2 slots)", - "gasUsed": 1455 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testSetMetadata", - "name": "StoreCore: set table metadata", - "gasUsed": 251782 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testUpdateInField", - "name": "update in field (1 slot, 1 uint32 item)", - "gasUsed": 15487 - }, - { - "file": "test/StoreCoreGas.t.sol", - "test": "testUpdateInField", - "name": "push to field (2 slots, 6 uint64 items)", - "gasUsed": 16528 - }, - { - "file": "test/StoreMetadata.t.sol", - "test": "testSetAndGet", - "name": "set record in StoreMetadataTable", - "gasUsed": 250255 - }, - { - "file": "test/StoreMetadata.t.sol", - "test": "testSetAndGet", - "name": "get record from StoreMetadataTable", - "gasUsed": 11548 - }, - { - "file": "test/StoreSwitch.t.sol", - "test": "testDelegatecall", - "name": "get Store address", - "gasUsed": 2170 - }, - { - "file": "test/StoreSwitch.t.sol", - "test": "testNoDelegatecall", - "name": "get Store address", - "gasUsed": 2173 - }, - { - "file": "test/tables/Callbacks.t.sol", - "test": "testSetAndGet", - "name": "Callbacks: set field", - "gasUsed": 61432 - }, - { - "file": "test/tables/Callbacks.t.sol", - "test": "testSetAndGet", - "name": "Callbacks: get field (warm)", - "gasUsed": 5051 - }, - { - "file": "test/tables/Callbacks.t.sol", - "test": "testSetAndGet", - "name": "Callbacks: push 1 element", - "gasUsed": 39317 - }, - { - "file": "test/tables/Hooks.t.sol", - "test": "testTable", - "name": "Hooks: set field (cold)", - "gasUsed": 63423 - }, - { - "file": "test/tables/Hooks.t.sol", - "test": "testTable", - "name": "Hooks: get field (warm)", - "gasUsed": 5035 - }, - { - "file": "test/tables/Hooks.t.sol", - "test": "testTable", - "name": "Hooks: push 1 element (cold)", - "gasUsed": 39311 - }, - { - "file": "test/tables/Hooks.t.sol", - "test": "testTable", - "name": "Hooks: pop 1 element (warm)", - "gasUsed": 15790 - }, - { - "file": "test/tables/Hooks.t.sol", - "test": "testTable", - "name": "Hooks: push 1 element (warm)", - "gasUsed": 17498 - }, - { - "file": "test/tables/Hooks.t.sol", - "test": "testTable", - "name": "Hooks: update 1 element (warm)", - "gasUsed": 17296 - }, - { - "file": "test/tables/Hooks.t.sol", - "test": "testTable", - "name": "Hooks: delete record (warm)", - "gasUsed": 10540 - }, - { - "file": "test/tables/Hooks.t.sol", - "test": "testTable", - "name": "Hooks: set field (warm)", - "gasUsed": 33726 - }, - { - "file": "test/tables/HooksColdLoad.t.sol", - "test": "testDelete", - "name": "Hooks: delete record (cold)", - "gasUsed": 21269 - }, - { - "file": "test/tables/HooksColdLoad.t.sol", - "test": "testGet", - "name": "Hooks: get field (cold)", - "gasUsed": 13020 - }, - { - "file": "test/tables/HooksColdLoad.t.sol", - "test": "testGetItem", - "name": "Hooks: get 1 element (cold)", - "gasUsed": 7786 - }, - { - "file": "test/tables/HooksColdLoad.t.sol", - "test": "testLength", - "name": "Hooks: get length (cold)", - "gasUsed": 7536 - }, - { - "file": "test/tables/HooksColdLoad.t.sol", - "test": "testPop", - "name": "Hooks: pop 1 element (cold)", - "gasUsed": 27882 - }, - { - "file": "test/tables/HooksColdLoad.t.sol", - "test": "testUpdate", - "name": "Hooks: update 1 element (cold)", - "gasUsed": 28809 - }, - { - "file": "test/tightcoder/DecodeSlice.t.sol", - "test": "testToArrayUint32", - "name": "decode packed uint32[]", - "gasUsed": 563 - }, - { - "file": "test/tightcoder/DecodeSlice.t.sol", - "test": "testToBytes32Array", - "name": "decode packed bytes32[]", - "gasUsed": 552 - }, - { - "file": "test/tightcoder/EncodeArray.t.sol", - "test": "testEncodeUint16Array", - "name": "encode packed uint16[]", - "gasUsed": 595 - }, - { - "file": "test/tightcoder/EncodeArray.t.sol", - "test": "testEncodeUint32Array", - "name": "encode packed uint32[]", - "gasUsed": 504 - }, - { - "file": "test/tightcoder/EncodeArray.t.sol", - "test": "testEncodeUint8Array", - "name": "encode packed uint8[]", - "gasUsed": 493 - }, - { - "file": "test/tightcoder/TightCoder.t.sol", - "test": "testFromAndToUint32Array", - "name": "decode packed uint32[]", - "gasUsed": 563 - }, - { - "file": "test/tightcoder/TightCoder.t.sol", - "test": "testToAndFromBytes24Array", - "name": "encode packed bytes24[]", - "gasUsed": 501 - }, - { - "file": "test/tightcoder/TightCoder.t.sol", - "test": "testToAndFromBytes24Array", - "name": "decode packed bytes24[]", - "gasUsed": 563 - }, - { - "file": "test/Vector2.t.sol", - "test": "testRegisterAndGetSchema", - "name": "register Vector2 schema", - "gasUsed": 59169 - }, - { - "file": "test/Vector2.t.sol", - "test": "testSetAndGet", - "name": "set Vector2 record", - "gasUsed": 37268 - }, - { - "file": "test/Vector2.t.sol", - "test": "testSetAndGet", - "name": "get Vector2 record", - "gasUsed": 4549 - } -] diff --git a/packages/world/abi/AccessManagementSystem.sol/AccessManagementSystem.abi.json b/packages/world/abi/AccessManagementSystem.sol/AccessManagementSystem.abi.json index 7801e6816e..e4a2d6f65b 100644 --- a/packages/world/abi/AccessManagementSystem.sol/AccessManagementSystem.abi.json +++ b/packages/world/abi/AccessManagementSystem.sol/AccessManagementSystem.abi.json @@ -15,6 +15,22 @@ "name": "AccessDenied", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "SchemaLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SchemaLib_StaticTypeAfterDynamicType", + "type": "error" + }, { "inputs": [ { @@ -52,22 +68,6 @@ "name": "StoreCore_InvalidDataLength", "type": "error" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, { "inputs": [ { diff --git a/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json b/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json index 8c58fee71b..a887a2245e 100644 --- a/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json +++ b/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json @@ -244,6 +244,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "emitEphemeralRecord", @@ -267,6 +272,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "emitEphemeralRecord", diff --git a/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json b/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json index 3e51350f67..8ff8f51443 100644 --- a/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json +++ b/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json @@ -15,6 +15,22 @@ "name": "AccessDenied", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "SchemaLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SchemaLib_StaticTypeAfterDynamicType", + "type": "error" + }, { "inputs": [ { @@ -52,22 +68,6 @@ "name": "StoreCore_InvalidDataLength", "type": "error" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, { "anonymous": false, "inputs": [ @@ -114,6 +114,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "emitEphemeralRecord", @@ -137,6 +142,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "emitEphemeralRecord", diff --git a/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json b/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json index 64e76c27d5..29c6d35666 100644 --- a/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json +++ b/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json @@ -328,6 +328,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "deleteRecord", @@ -351,6 +356,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "deleteRecord", @@ -379,6 +389,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "emitEphemeralRecord", @@ -402,6 +417,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "emitEphemeralRecord", @@ -425,6 +445,11 @@ "internalType": "uint8", "name": "schemaIndex", "type": "uint8" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "getField", @@ -457,7 +482,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -491,7 +516,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" }, { @@ -549,32 +574,8 @@ }, { "internalType": "Schema", - "name": "schema", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", + "name": "valueSchema", "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" } ], "name": "getRecord", @@ -669,14 +670,9 @@ { "inputs": [ { - "internalType": "bytes16", - "name": "namespace", - "type": "bytes16" - }, - { - "internalType": "bytes16", - "name": "name", - "type": "bytes16" + "internalType": "bytes32", + "name": "table", + "type": "bytes32" }, { "internalType": "bytes32[]", @@ -692,6 +688,11 @@ "internalType": "uint256", "name": "byteLengthToPop", "type": "uint256" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "popFromField", @@ -702,9 +703,14 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" + "internalType": "bytes16", + "name": "namespace", + "type": "bytes16" + }, + { + "internalType": "bytes16", + "name": "name", + "type": "bytes16" }, { "internalType": "bytes32[]", @@ -720,6 +726,11 @@ "internalType": "uint256", "name": "byteLengthToPop", "type": "uint256" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "popFromField", @@ -748,6 +759,11 @@ "internalType": "bytes", "name": "dataToPush", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "pushToField", @@ -781,6 +797,11 @@ "internalType": "bytes", "name": "dataToPush", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "pushToField", @@ -1073,9 +1094,14 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" + "internalType": "bytes16", + "name": "namespace", + "type": "bytes16" + }, + { + "internalType": "bytes16", + "name": "name", + "type": "bytes16" }, { "internalType": "bytes32[]", @@ -1091,6 +1117,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setField", @@ -1101,14 +1132,9 @@ { "inputs": [ { - "internalType": "bytes16", - "name": "namespace", - "type": "bytes16" - }, - { - "internalType": "bytes16", - "name": "name", - "type": "bytes16" + "internalType": "bytes32", + "name": "table", + "type": "bytes32" }, { "internalType": "bytes32[]", @@ -1124,6 +1150,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setField", @@ -1185,14 +1216,9 @@ { "inputs": [ { - "internalType": "bytes16", - "name": "namespace", - "type": "bytes16" - }, - { - "internalType": "bytes16", - "name": "name", - "type": "bytes16" + "internalType": "bytes32", + "name": "table", + "type": "bytes32" }, { "internalType": "bytes32[]", @@ -1203,6 +1229,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setRecord", @@ -1213,9 +1244,14 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" + "internalType": "bytes16", + "name": "namespace", + "type": "bytes16" + }, + { + "internalType": "bytes16", + "name": "name", + "type": "bytes16" }, { "internalType": "bytes32[]", @@ -1226,6 +1262,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setRecord", @@ -1259,6 +1300,11 @@ "internalType": "bytes", "name": "dataToSet", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "updateInField", @@ -1297,6 +1343,11 @@ "internalType": "bytes", "name": "dataToSet", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "updateInField", diff --git a/packages/world/abi/IStore.sol/IStore.abi.json b/packages/world/abi/IStore.sol/IStore.abi.json index 9af8379342..3dc7bc3b3a 100644 --- a/packages/world/abi/IStore.sol/IStore.abi.json +++ b/packages/world/abi/IStore.sol/IStore.abi.json @@ -200,6 +200,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "deleteRecord", @@ -223,6 +228,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "emitEphemeralRecord", @@ -246,6 +256,11 @@ "internalType": "uint8", "name": "schemaIndex", "type": "uint8" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "getField", @@ -278,7 +293,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -312,7 +327,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" }, { @@ -370,7 +385,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -385,30 +400,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -449,6 +440,11 @@ "internalType": "uint256", "name": "byteLengthToPop", "type": "uint256" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "popFromField", @@ -477,6 +473,11 @@ "internalType": "bytes", "name": "dataToPush", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "pushToField", @@ -546,6 +547,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setField", @@ -592,6 +598,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setRecord", @@ -625,6 +636,11 @@ "internalType": "bytes", "name": "dataToSet", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "updateInField", diff --git a/packages/world/abi/IStore.sol/IStoreData.abi.json b/packages/world/abi/IStore.sol/IStoreData.abi.json index 3d3e52c5c6..8bdc4379fa 100644 --- a/packages/world/abi/IStore.sol/IStoreData.abi.json +++ b/packages/world/abi/IStore.sol/IStoreData.abi.json @@ -85,6 +85,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "deleteRecord", @@ -108,6 +113,11 @@ "internalType": "uint8", "name": "schemaIndex", "type": "uint8" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "getField", @@ -140,7 +150,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -174,7 +184,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" }, { @@ -232,7 +242,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -247,30 +257,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -311,6 +297,11 @@ "internalType": "uint256", "name": "byteLengthToPop", "type": "uint256" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "popFromField", @@ -339,6 +330,11 @@ "internalType": "bytes", "name": "dataToPush", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "pushToField", @@ -367,6 +363,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setField", @@ -390,6 +391,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setRecord", @@ -423,6 +429,11 @@ "internalType": "bytes", "name": "dataToSet", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "updateInField", diff --git a/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json b/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json index eb2bb27255..c9cbd9770c 100644 --- a/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json +++ b/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json @@ -40,6 +40,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "emitEphemeralRecord", diff --git a/packages/world/abi/IStore.sol/IStoreHook.abi.json b/packages/world/abi/IStore.sol/IStoreHook.abi.json index f192f8efc5..171784fcb2 100644 --- a/packages/world/abi/IStore.sol/IStoreHook.abi.json +++ b/packages/world/abi/IStore.sol/IStoreHook.abi.json @@ -20,6 +20,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "onAfterSetField", @@ -48,6 +53,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "onBeforeSetField", @@ -66,6 +76,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "onDeleteRecord", @@ -89,6 +104,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "onSetRecord", diff --git a/packages/world/abi/IStore.sol/IStoreRead.abi.json b/packages/world/abi/IStore.sol/IStoreRead.abi.json index e6955707bb..ca89eb4ba5 100644 --- a/packages/world/abi/IStore.sol/IStoreRead.abi.json +++ b/packages/world/abi/IStore.sol/IStoreRead.abi.json @@ -15,6 +15,11 @@ "internalType": "uint8", "name": "schemaIndex", "type": "uint8" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "getField", @@ -47,7 +52,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -81,7 +86,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" }, { @@ -139,7 +144,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -154,30 +159,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/packages/world/abi/IStore.sol/IStoreWrite.abi.json b/packages/world/abi/IStore.sol/IStoreWrite.abi.json index b15b6bd473..e5a35719c0 100644 --- a/packages/world/abi/IStore.sol/IStoreWrite.abi.json +++ b/packages/world/abi/IStore.sol/IStoreWrite.abi.json @@ -85,6 +85,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "deleteRecord", @@ -113,6 +118,11 @@ "internalType": "uint256", "name": "byteLengthToPop", "type": "uint256" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "popFromField", @@ -141,6 +151,11 @@ "internalType": "bytes", "name": "dataToPush", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "pushToField", @@ -169,6 +184,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setField", @@ -192,6 +212,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setRecord", @@ -225,6 +250,11 @@ "internalType": "bytes", "name": "dataToSet", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "updateInField", diff --git a/packages/world/abi/IWorldEphemeral.sol/IWorldEphemeral.abi.json b/packages/world/abi/IWorldEphemeral.sol/IWorldEphemeral.abi.json index 83659ac983..c4d7e548b0 100644 --- a/packages/world/abi/IWorldEphemeral.sol/IWorldEphemeral.abi.json +++ b/packages/world/abi/IWorldEphemeral.sol/IWorldEphemeral.abi.json @@ -20,6 +20,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "emitEphemeralRecord", diff --git a/packages/world/abi/IWorldKernel.sol/IWorldData.abi.json b/packages/world/abi/IWorldKernel.sol/IWorldData.abi.json index 40f9b2b0cd..9be0c880bd 100644 --- a/packages/world/abi/IWorldKernel.sol/IWorldData.abi.json +++ b/packages/world/abi/IWorldKernel.sol/IWorldData.abi.json @@ -15,6 +15,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "deleteRecord", @@ -48,6 +53,11 @@ "internalType": "uint256", "name": "byteLengthToPop", "type": "uint256" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "popFromField", @@ -81,6 +91,11 @@ "internalType": "bytes", "name": "dataToPush", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "pushToField", @@ -114,6 +129,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setField", @@ -142,6 +162,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setRecord", @@ -180,6 +205,11 @@ "internalType": "bytes", "name": "dataToSet", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "updateInField", diff --git a/packages/world/abi/IWorldKernel.sol/IWorldKernel.abi.json b/packages/world/abi/IWorldKernel.sol/IWorldKernel.abi.json index 3b495bbca8..860b7a890e 100644 --- a/packages/world/abi/IWorldKernel.sol/IWorldKernel.abi.json +++ b/packages/world/abi/IWorldKernel.sol/IWorldKernel.abi.json @@ -143,6 +143,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "deleteRecord", @@ -194,6 +199,11 @@ "internalType": "uint256", "name": "byteLengthToPop", "type": "uint256" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "popFromField", @@ -227,6 +237,11 @@ "internalType": "bytes", "name": "dataToPush", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "pushToField", @@ -260,6 +275,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setField", @@ -288,6 +308,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setRecord", @@ -326,6 +351,11 @@ "internalType": "bytes", "name": "dataToSet", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "updateInField", diff --git a/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json b/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json index aff14f41e8..223ef6484f 100644 --- a/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json +++ b/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json @@ -73,22 +73,6 @@ "name": "StoreCore_NotDynamicField", "type": "error" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, { "inputs": [ { @@ -110,6 +94,11 @@ "internalType": "bytes", "name": "", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "", + "type": "bytes32" } ], "name": "onAfterSetField", @@ -138,6 +127,11 @@ "internalType": "bytes", "name": "", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "", + "type": "bytes32" } ], "name": "onBeforeSetField", @@ -156,6 +150,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "", + "type": "bytes32" } ], "name": "onDeleteRecord", @@ -179,6 +178,11 @@ "internalType": "bytes", "name": "", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "", + "type": "bytes32" } ], "name": "onSetRecord", diff --git a/packages/world/abi/KeysInTableModule.sol/KeysInTableModule.abi.json b/packages/world/abi/KeysInTableModule.sol/KeysInTableModule.abi.json index b281783ba3..64373ae108 100644 --- a/packages/world/abi/KeysInTableModule.sol/KeysInTableModule.abi.json +++ b/packages/world/abi/KeysInTableModule.sol/KeysInTableModule.abi.json @@ -26,22 +26,6 @@ "name": "SchemaLib_StaticTypeAfterDynamicType", "type": "error" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, { "inputs": [], "name": "getName", diff --git a/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json b/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json index d26dcd0e71..a4a456e299 100644 --- a/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json +++ b/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json @@ -1,4 +1,20 @@ [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "SchemaLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SchemaLib_StaticTypeAfterDynamicType", + "type": "error" + }, { "inputs": [ { @@ -41,22 +57,6 @@ "name": "StoreCore_NotDynamicField", "type": "error" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, { "inputs": [ { @@ -78,6 +78,11 @@ "internalType": "bytes", "name": "", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "onAfterSetField", @@ -106,6 +111,11 @@ "internalType": "bytes", "name": "", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "onBeforeSetField", @@ -124,6 +134,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "onDeleteRecord", @@ -147,6 +162,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "onSetRecord", diff --git a/packages/world/abi/KeysWithValueModule.sol/KeysWithValueModule.abi.json b/packages/world/abi/KeysWithValueModule.sol/KeysWithValueModule.abi.json index d616cf972b..b23c956332 100644 --- a/packages/world/abi/KeysWithValueModule.sol/KeysWithValueModule.abi.json +++ b/packages/world/abi/KeysWithValueModule.sol/KeysWithValueModule.abi.json @@ -52,22 +52,6 @@ "name": "StoreCore_NotDynamicField", "type": "error" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, { "inputs": [], "name": "getName", diff --git a/packages/world/abi/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json b/packages/world/abi/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json index ac5d10ea5d..3ba41db3c5 100644 --- a/packages/world/abi/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json +++ b/packages/world/abi/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json @@ -1,4 +1,20 @@ [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "SchemaLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SchemaLib_StaticTypeAfterDynamicType", + "type": "error" + }, { "inputs": [ { @@ -36,22 +52,6 @@ "name": "StoreCore_InvalidDataLength", "type": "error" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, { "inputs": [ { diff --git a/packages/world/abi/StoreRead.sol/StoreRead.abi.json b/packages/world/abi/StoreRead.sol/StoreRead.abi.json index 3e8785719d..b05f278530 100644 --- a/packages/world/abi/StoreRead.sol/StoreRead.abi.json +++ b/packages/world/abi/StoreRead.sol/StoreRead.abi.json @@ -126,6 +126,11 @@ "internalType": "uint8", "name": "schemaIndex", "type": "uint8" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "getField", @@ -250,7 +255,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -265,30 +270,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/packages/world/abi/UniqueEntitySystem.sol/UniqueEntitySystem.abi.json b/packages/world/abi/UniqueEntitySystem.sol/UniqueEntitySystem.abi.json index 51b519610a..e4f117c782 100644 --- a/packages/world/abi/UniqueEntitySystem.sol/UniqueEntitySystem.abi.json +++ b/packages/world/abi/UniqueEntitySystem.sol/UniqueEntitySystem.abi.json @@ -1,4 +1,20 @@ [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "SchemaLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SchemaLib_StaticTypeAfterDynamicType", + "type": "error" + }, { "inputs": [ { @@ -36,22 +52,6 @@ "name": "StoreCore_InvalidDataLength", "type": "error" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, { "inputs": [], "name": "getUniqueEntity", diff --git a/packages/world/abi/World.sol/World.abi.json b/packages/world/abi/World.sol/World.abi.json index 013356766d..aad1a60dad 100644 --- a/packages/world/abi/World.sol/World.abi.json +++ b/packages/world/abi/World.sol/World.abi.json @@ -344,6 +344,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "deleteRecord", @@ -367,6 +372,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "deleteRecord", @@ -390,6 +400,11 @@ "internalType": "uint8", "name": "schemaIndex", "type": "uint8" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "getField", @@ -514,32 +529,8 @@ }, { "internalType": "Schema", - "name": "schema", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", + "name": "valueSchema", "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" } ], "name": "getRecord", @@ -593,14 +584,9 @@ { "inputs": [ { - "internalType": "bytes16", - "name": "namespace", - "type": "bytes16" - }, - { - "internalType": "bytes16", - "name": "name", - "type": "bytes16" + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" }, { "internalType": "bytes32[]", @@ -616,6 +602,11 @@ "internalType": "uint256", "name": "byteLengthToPop", "type": "uint256" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "popFromField", @@ -626,9 +617,14 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" + "internalType": "bytes16", + "name": "namespace", + "type": "bytes16" + }, + { + "internalType": "bytes16", + "name": "name", + "type": "bytes16" }, { "internalType": "bytes32[]", @@ -644,6 +640,11 @@ "internalType": "uint256", "name": "byteLengthToPop", "type": "uint256" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "popFromField", @@ -672,6 +673,11 @@ "internalType": "bytes", "name": "dataToPush", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "pushToField", @@ -705,6 +711,11 @@ "internalType": "bytes", "name": "dataToPush", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "pushToField", @@ -715,9 +726,14 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" + "internalType": "bytes16", + "name": "namespace", + "type": "bytes16" + }, + { + "internalType": "bytes16", + "name": "name", + "type": "bytes16" }, { "internalType": "bytes32[]", @@ -733,6 +749,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setField", @@ -743,14 +764,9 @@ { "inputs": [ { - "internalType": "bytes16", - "name": "namespace", - "type": "bytes16" - }, - { - "internalType": "bytes16", - "name": "name", - "type": "bytes16" + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" }, { "internalType": "bytes32[]", @@ -766,6 +782,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setField", @@ -776,14 +797,9 @@ { "inputs": [ { - "internalType": "bytes16", - "name": "namespace", - "type": "bytes16" - }, - { - "internalType": "bytes16", - "name": "name", - "type": "bytes16" + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" }, { "internalType": "bytes32[]", @@ -794,6 +810,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setRecord", @@ -804,9 +825,14 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" + "internalType": "bytes16", + "name": "namespace", + "type": "bytes16" + }, + { + "internalType": "bytes16", + "name": "name", + "type": "bytes16" }, { "internalType": "bytes32[]", @@ -817,6 +843,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setRecord", @@ -850,6 +881,11 @@ "internalType": "bytes", "name": "dataToSet", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "updateInField", @@ -888,6 +924,11 @@ "internalType": "bytes", "name": "dataToSet", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "updateInField", diff --git a/packages/world/abi/src/IStore.sol/IStore.abi.json b/packages/world/abi/src/IStore.sol/IStore.abi.json index 9af8379342..3dc7bc3b3a 100644 --- a/packages/world/abi/src/IStore.sol/IStore.abi.json +++ b/packages/world/abi/src/IStore.sol/IStore.abi.json @@ -200,6 +200,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "deleteRecord", @@ -223,6 +228,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "emitEphemeralRecord", @@ -246,6 +256,11 @@ "internalType": "uint8", "name": "schemaIndex", "type": "uint8" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "getField", @@ -278,7 +293,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -312,7 +327,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" }, { @@ -370,7 +385,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -385,30 +400,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -449,6 +440,11 @@ "internalType": "uint256", "name": "byteLengthToPop", "type": "uint256" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "popFromField", @@ -477,6 +473,11 @@ "internalType": "bytes", "name": "dataToPush", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "pushToField", @@ -546,6 +547,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setField", @@ -592,6 +598,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setRecord", @@ -625,6 +636,11 @@ "internalType": "bytes", "name": "dataToSet", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "updateInField", diff --git a/packages/world/abi/src/IStore.sol/IStoreData.abi.json b/packages/world/abi/src/IStore.sol/IStoreData.abi.json index 3d3e52c5c6..8bdc4379fa 100644 --- a/packages/world/abi/src/IStore.sol/IStoreData.abi.json +++ b/packages/world/abi/src/IStore.sol/IStoreData.abi.json @@ -85,6 +85,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "deleteRecord", @@ -108,6 +113,11 @@ "internalType": "uint8", "name": "schemaIndex", "type": "uint8" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "getField", @@ -140,7 +150,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -174,7 +184,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" }, { @@ -232,7 +242,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -247,30 +257,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -311,6 +297,11 @@ "internalType": "uint256", "name": "byteLengthToPop", "type": "uint256" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "popFromField", @@ -339,6 +330,11 @@ "internalType": "bytes", "name": "dataToPush", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "pushToField", @@ -367,6 +363,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setField", @@ -390,6 +391,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setRecord", @@ -423,6 +429,11 @@ "internalType": "bytes", "name": "dataToSet", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "updateInField", diff --git a/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json b/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json index eb2bb27255..c9cbd9770c 100644 --- a/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json +++ b/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json @@ -40,6 +40,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "emitEphemeralRecord", diff --git a/packages/world/abi/src/IStore.sol/IStoreHook.abi.json b/packages/world/abi/src/IStore.sol/IStoreHook.abi.json index f192f8efc5..171784fcb2 100644 --- a/packages/world/abi/src/IStore.sol/IStoreHook.abi.json +++ b/packages/world/abi/src/IStore.sol/IStoreHook.abi.json @@ -20,6 +20,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "onAfterSetField", @@ -48,6 +53,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "onBeforeSetField", @@ -66,6 +76,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "onDeleteRecord", @@ -89,6 +104,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "onSetRecord", diff --git a/packages/world/abi/src/IStore.sol/IStoreRead.abi.json b/packages/world/abi/src/IStore.sol/IStoreRead.abi.json index e6955707bb..ca89eb4ba5 100644 --- a/packages/world/abi/src/IStore.sol/IStoreRead.abi.json +++ b/packages/world/abi/src/IStore.sol/IStoreRead.abi.json @@ -15,6 +15,11 @@ "internalType": "uint8", "name": "schemaIndex", "type": "uint8" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "getField", @@ -47,7 +52,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -81,7 +86,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" }, { @@ -139,7 +144,7 @@ }, { "internalType": "Schema", - "name": "schema", + "name": "valueSchema", "type": "bytes32" } ], @@ -154,30 +159,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "table", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "key", - "type": "bytes32[]" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json b/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json index b15b6bd473..e5a35719c0 100644 --- a/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json +++ b/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json @@ -85,6 +85,11 @@ "internalType": "bytes32[]", "name": "key", "type": "bytes32[]" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "deleteRecord", @@ -113,6 +118,11 @@ "internalType": "uint256", "name": "byteLengthToPop", "type": "uint256" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "popFromField", @@ -141,6 +151,11 @@ "internalType": "bytes", "name": "dataToPush", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "pushToField", @@ -169,6 +184,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setField", @@ -192,6 +212,11 @@ "internalType": "bytes", "name": "data", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "setRecord", @@ -225,6 +250,11 @@ "internalType": "bytes", "name": "dataToSet", "type": "bytes" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" } ], "name": "updateInField", diff --git a/packages/world/gas-report.json b/packages/world/gas-report.json deleted file mode 100644 index 1f2d74883e..0000000000 --- a/packages/world/gas-report.json +++ /dev/null @@ -1,320 +0,0 @@ -[ - { - "file": "test/KeysInTableModule.t.sol", - "test": "testInstallComposite", - "name": "install keys in table module", - "gasUsed": 1245828 - }, - { - "file": "test/KeysInTableModule.t.sol", - "test": "testInstallGas", - "name": "install keys in table module", - "gasUsed": 1245828 - }, - { - "file": "test/KeysInTableModule.t.sol", - "test": "testInstallGas", - "name": "set a record on a table with keysInTableModule installed", - "gasUsed": 186537 - }, - { - "file": "test/KeysInTableModule.t.sol", - "test": "testInstallSingleton", - "name": "install keys in table module", - "gasUsed": 1245828 - }, - { - "file": "test/KeysInTableModule.t.sol", - "test": "testSetAndDeleteRecordHookCompositeGas", - "name": "install keys in table module", - "gasUsed": 1245828 - }, - { - "file": "test/KeysInTableModule.t.sol", - "test": "testSetAndDeleteRecordHookCompositeGas", - "name": "change a composite record on a table with keysInTableModule installed", - "gasUsed": 27638 - }, - { - "file": "test/KeysInTableModule.t.sol", - "test": "testSetAndDeleteRecordHookCompositeGas", - "name": "delete a composite record on a table with keysInTableModule installed", - "gasUsed": 260739 - }, - { - "file": "test/KeysInTableModule.t.sol", - "test": "testSetAndDeleteRecordHookGas", - "name": "install keys in table module", - "gasUsed": 1245828 - }, - { - "file": "test/KeysInTableModule.t.sol", - "test": "testSetAndDeleteRecordHookGas", - "name": "change a record on a table with keysInTableModule installed", - "gasUsed": 26252 - }, - { - "file": "test/KeysInTableModule.t.sol", - "test": "testSetAndDeleteRecordHookGas", - "name": "delete a record on a table with keysInTableModule installed", - "gasUsed": 136749 - }, - { - "file": "test/KeysWithValueModule.t.sol", - "test": "testGetKeysWithValueGas", - "name": "install keys with value module", - "gasUsed": 600458 - }, - { - "file": "test/KeysWithValueModule.t.sol", - "test": "testGetKeysWithValueGas", - "name": "Get list of keys with a given value", - "gasUsed": 7391 - }, - { - "file": "test/KeysWithValueModule.t.sol", - "test": "testGetTargetTableSelector", - "name": "compute the target table selector", - "gasUsed": 2234 - }, - { - "file": "test/KeysWithValueModule.t.sol", - "test": "testInstall", - "name": "install keys with value module", - "gasUsed": 600458 - }, - { - "file": "test/KeysWithValueModule.t.sol", - "test": "testInstall", - "name": "set a record on a table with KeysWithValueModule installed", - "gasUsed": 159379 - }, - { - "file": "test/KeysWithValueModule.t.sol", - "test": "testSetAndDeleteRecordHook", - "name": "install keys with value module", - "gasUsed": 600458 - }, - { - "file": "test/KeysWithValueModule.t.sol", - "test": "testSetAndDeleteRecordHook", - "name": "change a record on a table with KeysWithValueModule installed", - "gasUsed": 126400 - }, - { - "file": "test/KeysWithValueModule.t.sol", - "test": "testSetAndDeleteRecordHook", - "name": "delete a record on a table with KeysWithValueModule installed", - "gasUsed": 49011 - }, - { - "file": "test/KeysWithValueModule.t.sol", - "test": "testSetField", - "name": "install keys with value module", - "gasUsed": 600458 - }, - { - "file": "test/KeysWithValueModule.t.sol", - "test": "testSetField", - "name": "set a field on a table with KeysWithValueModule installed", - "gasUsed": 167520 - }, - { - "file": "test/KeysWithValueModule.t.sol", - "test": "testSetField", - "name": "change a field on a table with KeysWithValueModule installed", - "gasUsed": 129778 - }, - { - "file": "test/query.t.sol", - "test": "testCombinedHasHasValueNotQuery", - "name": "CombinedHasHasValueNotQuery", - "gasUsed": 160409 - }, - { - "file": "test/query.t.sol", - "test": "testCombinedHasHasValueQuery", - "name": "CombinedHasHasValueQuery", - "gasUsed": 75186 - }, - { - "file": "test/query.t.sol", - "test": "testCombinedHasNotQuery", - "name": "CombinedHasNotQuery", - "gasUsed": 220085 - }, - { - "file": "test/query.t.sol", - "test": "testCombinedHasQuery", - "name": "CombinedHasQuery", - "gasUsed": 138370 - }, - { - "file": "test/query.t.sol", - "test": "testCombinedHasValueNotQuery", - "name": "CombinedHasValueNotQuery", - "gasUsed": 137230 - }, - { - "file": "test/query.t.sol", - "test": "testCombinedHasValueQuery", - "name": "CombinedHasValueQuery", - "gasUsed": 18902 - }, - { - "file": "test/query.t.sol", - "test": "testHasQuery", - "name": "HasQuery", - "gasUsed": 31224 - }, - { - "file": "test/query.t.sol", - "test": "testHasQuery1000Keys", - "name": "HasQuery with 1000 keys", - "gasUsed": 10687510 - }, - { - "file": "test/query.t.sol", - "test": "testHasQuery100Keys", - "name": "HasQuery with 100 keys", - "gasUsed": 997013 - }, - { - "file": "test/query.t.sol", - "test": "testHasValueQuery", - "name": "HasValueQuery", - "gasUsed": 9128 - }, - { - "file": "test/query.t.sol", - "test": "testNotValueQuery", - "name": "NotValueQuery", - "gasUsed": 68780 - }, - { - "file": "test/SnapSyncModule.t.sol", - "test": "testSnapSyncGas", - "name": "Call snap sync on a table with 1 record", - "gasUsed": 38930 - }, - { - "file": "test/SnapSyncModule.t.sol", - "test": "testSnapSyncGas", - "name": "Call snap sync on a table with 2 records", - "gasUsed": 56007 - }, - { - "file": "test/UniqueEntityModule.t.sol", - "test": "testInstall", - "name": "install unique entity module", - "gasUsed": 788332 - }, - { - "file": "test/UniqueEntityModule.t.sol", - "test": "testInstall", - "name": "get a unique entity nonce (non-root module)", - "gasUsed": 69696 - }, - { - "file": "test/UniqueEntityModule.t.sol", - "test": "testInstallRoot", - "name": "installRoot unique entity module", - "gasUsed": 760637 - }, - { - "file": "test/UniqueEntityModule.t.sol", - "test": "testInstallRoot", - "name": "get a unique entity nonce (root module)", - "gasUsed": 69696 - }, - { - "file": "test/World.t.sol", - "test": "testDeleteRecord", - "name": "Delete record", - "gasUsed": 14485 - }, - { - "file": "test/World.t.sol", - "test": "testPushToField", - "name": "Push data to the table", - "gasUsed": 94613 - }, - { - "file": "test/World.t.sol", - "test": "testRegisterFallbackSystem", - "name": "Register a fallback system", - "gasUsed": 80221 - }, - { - "file": "test/World.t.sol", - "test": "testRegisterFallbackSystem", - "name": "Register a root fallback system", - "gasUsed": 71401 - }, - { - "file": "test/World.t.sol", - "test": "testRegisterFunctionSelector", - "name": "Register a function selector", - "gasUsed": 100812 - }, - { - "file": "test/World.t.sol", - "test": "testRegisterNamespace", - "name": "Register a new namespace", - "gasUsed": 155721 - }, - { - "file": "test/World.t.sol", - "test": "testRegisterRootFunctionSelector", - "name": "Register a root function selector", - "gasUsed": 87316 - }, - { - "file": "test/World.t.sol", - "test": "testRegisterTable", - "name": "Register a new table in the namespace", - "gasUsed": 253123 - }, - { - "file": "test/World.t.sol", - "test": "testSetField", - "name": "Write data to a table field", - "gasUsed": 43084 - }, - { - "file": "test/World.t.sol", - "test": "testSetMetadata", - "name": "Set metadata", - "gasUsed": 277843 - }, - { - "file": "test/World.t.sol", - "test": "testSetRecord", - "name": "Write data to the table", - "gasUsed": 40939 - }, - { - "file": "test/WorldDynamicUpdate.t.sol", - "test": "testPopFromField", - "name": "pop 1 address (cold)", - "gasUsed": 38156 - }, - { - "file": "test/WorldDynamicUpdate.t.sol", - "test": "testPopFromField", - "name": "pop 1 address (warm)", - "gasUsed": 20946 - }, - { - "file": "test/WorldDynamicUpdate.t.sol", - "test": "testUpdateInField", - "name": "updateInField 1 item (cold)", - "gasUsed": 39870 - }, - { - "file": "test/WorldDynamicUpdate.t.sol", - "test": "testUpdateInField", - "name": "updateInField 1 item (warm)", - "gasUsed": 23075 - } -]