diff --git a/.changeset/metal-hounds-drum.md b/.changeset/metal-hounds-drum.md new file mode 100644 index 0000000000..f041da2353 --- /dev/null +++ b/.changeset/metal-hounds-drum.md @@ -0,0 +1,38 @@ +--- +"@latticexyz/block-logs-stream": patch +"@latticexyz/store-sync": patch +"@latticexyz/store": patch +--- + +Renamed all occurrences of `table` where it is used as "table ID" to `tableId`. +This is only a breaking change for consumers who manually decode `Store` events, but not for consumers who use the MUD libraries. + +```diff +event StoreSetRecord( +- bytes32 table, ++ bytes32 tableId, + bytes32[] key, + bytes data +); + +event StoreSetField( +- bytes32 table, ++ bytes32 tableId, + bytes32[] key, + uint8 fieldIndex, + bytes data +); + +event StoreDeleteRecord( +- bytes32 table, ++ bytes32 tableId, + bytes32[] key +); + +event StoreEphemeralRecord( +- bytes32 table, ++ bytes32 tableId, + bytes32[] key, + bytes data +); +``` diff --git a/docs/pages/store/advanced-features.mdx b/docs/pages/store/advanced-features.mdx index 1a859967df..6784d64b7b 100644 --- a/docs/pages/store/advanced-features.mdx +++ b/docs/pages/store/advanced-features.mdx @@ -79,28 +79,28 @@ It is possible to register hooks on tables, allowing additional logic to be exec This is an example of a Mirror hook which mirrors a table into another one: ```solidity -uint256 constant indexerTableId = uint256(keccak256("indexer.table")); +bytes32 constant indexerTableId = bytes32("indexer.table"); contract MirrorSubscriber is IStoreHook { - uint256 _table; + bytes32 _tableId; - constructor(uint256 table, Schema keySchema, Schema valueSchema) { + constructor(bytes32 tableId, Schema keySchema, Schema valueSchema) { IStore(msg.sender).registerSchema(indexerTableId, valueSchema, keySchema); - _table = table; + _tableId = tableId; } - function onSetRecord(uint256 table, bytes32[] memory key, bytes memory data) public { - if (_table != table) revert("invalid table"); + function onSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory data) public { + if (_tableId != tableId) revert("invalid tableId"); StoreSwitch.setRecord(indexerTableId, key, data); } - function onSetField(uint256 table, bytes32[] memory key, uint8 schemaIndex, bytes memory data) public { - if (_table != table) revert("invalid table"); + function onSetField(bytes32 tableId, bytes32[] memory key, uint8 schemaIndex, bytes memory data) public { + if (_tableId != tableId) revert("invalid tableId"); StoreSwitch.setField(indexerTableId, key, schemaIndex, data); } - function onDeleteRecord(uint256 table, bytes32[] memory key) public { - if (_table != table) revert("invalid table"); + function onDeleteRecord(bytes32 tableId, bytes32[] memory key) public { + if (_tableId != tableId) revert("invalid tableId"); StoreSwitch.deleteRecord(indexerTableId, key); } } @@ -109,11 +109,11 @@ contract MirrorSubscriber is IStoreHook { Registering the hook can be done using the low-level Store API: ```solidity -uint256 table = keccak256("table"); +bytes32 tableId = bytes32("table"); Schema valueSchema = SchemaLib.encode(SchemaType.UINT256, SchemaType.UINT256); Schema keySchema = SchemaLib.encode(SchemaType.UINT256); -MirrorSubscriber subscriber = new MirrorSubscriber(table, keySchema, valueSchema); -StoreCore.registerStoreHook(table, subscriber); +MirrorSubscriber subscriber = new MirrorSubscriber(tableId, keySchema, valueSchema); +StoreCore.registerStoreHook(tableId, subscriber); ``` ### Accessing Store from a `CALL` or `DELEGATECALL` transparently diff --git a/packages/block-logs-stream/README.md b/packages/block-logs-stream/README.md index 06ff3e3624..692c02423f 100644 --- a/packages/block-logs-stream/README.md +++ b/packages/block-logs-stream/README.md @@ -26,10 +26,10 @@ latestBlockNumber$ publicClient, address, events: parseAbi([ - "event StoreDeleteRecord(bytes32 table, bytes32[] key)", - "event StoreSetField(bytes32 table, bytes32[] key, uint8 schemaIndex, bytes data)", - "event StoreSetRecord(bytes32 table, bytes32[] key, bytes data)", - "event StoreEphemeralRecord(bytes32 table, bytes32[] key, bytes data)", + "event StoreDeleteRecord(bytes32 tableId, bytes32[] key)", + "event StoreSetField(bytes32 tableId, bytes32[] key, uint8 schemaIndex, bytes data)", + "event StoreSetRecord(bytes32 tableId, bytes32[] key, bytes data)", + "event StoreEphemeralRecord(bytes32 tableId, bytes32[] key, bytes data)", ]), }), mergeMap(({ logs }) => from(groupLogsByBlockNumber(logs))) diff --git a/packages/store-sync/src/blockLogsToStorage.test.ts b/packages/store-sync/src/blockLogsToStorage.test.ts index 3e256adfb2..d1adbaa602 100644 --- a/packages/store-sync/src/blockLogsToStorage.test.ts +++ b/packages/store-sync/src/blockLogsToStorage.test.ts @@ -59,7 +59,7 @@ describe("blockLogsToStorage", () => { logIndex: 53, removed: false, args: { - table: "0x6d756473746f726500000000000000005461626c657300000000000000000000", + tableId: "0x6d756473746f726500000000000000005461626c657300000000000000000000", key: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], data: "0x0004010004000000000000000000000000000000000000000000000000000000001c030061030300000000000000000000000000000000000000000000000000000401000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000001600000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000056f776e657200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046974656d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b6974656d56617269616e740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006616d6f756e740000000000000000000000000000000000000000000000000000", }, @@ -76,7 +76,7 @@ describe("blockLogsToStorage", () => { logIndex: 88, removed: false, args: { - table: "0x00000000000000000000000000000000496e76656e746f727900000000000000", + tableId: "0x00000000000000000000000000000000496e76656e746f727900000000000000", key: [ "0x000000000000000000000000796eb990a3f9c431c69149c7a168b91596d87f60", "0x0000000000000000000000000000000000000000000000000000000000000001", @@ -116,7 +116,7 @@ describe("blockLogsToStorage", () => { "0x0000000000000000000000000000000000000000000000000000000000000001", ], "schemaIndex": 0, - "table": "0x00000000000000000000000000000000496e76656e746f727900000000000000", + "tableId": "0x00000000000000000000000000000000496e76656e746f727900000000000000", }, "blockHash": "0x03e962e7402b2ab295b92feac342a132111dd14b0d1fd4d4a0456fdc77981577", "blockNumber": 5448n, @@ -170,7 +170,7 @@ describe("blockLogsToStorage", () => { "0x0000000000000000000000000000000000000000000000000000000000000001", ], "schemaIndex": 0, - "table": "0x00000000000000000000000000000000496e76656e746f727900000000000000", + "tableId": "0x00000000000000000000000000000000496e76656e746f727900000000000000", }, "blockHash": "0x03e962e7402b2ab295b92feac342a132111dd14b0d1fd4d4a0456fdc77981577", "blockNumber": 5448n, diff --git a/packages/store-sync/src/blockLogsToStorage.ts b/packages/store-sync/src/blockLogsToStorage.ts index f4af902b71..645db04c3f 100644 --- a/packages/store-sync/src/blockLogsToStorage.ts +++ b/packages/store-sync/src/blockLogsToStorage.ts @@ -36,7 +36,7 @@ export function blockLogsToStorage({ .map((log) => { try { if (log.eventName !== "StoreSetRecord") return; - if (log.args.table !== schemasTableId) return; + if (log.args.tableId !== schemasTableId) return; // TODO: refactor encode/decode to use Record schemas // TODO: refactor to decode key with protocol-parser utils @@ -87,8 +87,8 @@ export function blockLogsToStorage({ block.logs.map((log) => JSON.stringify({ address: getAddress(log.address), - tableId: log.args.table, - ...hexToTableId(log.args.table), + tableId: log.args.tableId, + ...hexToTableId(log.args.tableId), }) ) ) @@ -106,9 +106,9 @@ export function blockLogsToStorage({ const operations = block.logs .map((log): StorageOperation | undefined => { try { - const table = tables[`${getAddress(log.address)}:${log.args.table}`]; + const table = tables[`${getAddress(log.address)}:${log.args.tableId}`]; if (!table) { - debug("no table found for event, skipping", hexToTableId(log.args.table), log); + debug("no table found for event, skipping", hexToTableId(log.args.tableId), log); return; } diff --git a/packages/store-sync/src/postgres/postgresStorage.test.ts b/packages/store-sync/src/postgres/postgresStorage.test.ts index 171823647a..710ba387fc 100644 --- a/packages/store-sync/src/postgres/postgresStorage.test.ts +++ b/packages/store-sync/src/postgres/postgresStorage.test.ts @@ -46,7 +46,7 @@ describe("postgresStorage", async () => { logIndex: 54, removed: false, args: { - table: "0x000000000000000000000000000000005265736f757263655479706500000000", + tableId: "0x000000000000000000000000000000005265736f757263655479706500000000", key: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], schemaIndex: 0, data: "0x02", @@ -64,7 +64,7 @@ describe("postgresStorage", async () => { logIndex: 55, removed: false, args: { - table: "0x6d756473746f726500000000000000005461626c657300000000000000000000", + tableId: "0x6d756473746f726500000000000000005461626c657300000000000000000000", key: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], data: "0x0004010004000000000000000000000000000000000000000000000000000000001c030061030300000000000000000000000000000000000000000000000000000401000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000001600000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000056f776e657200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046974656d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b6974656d56617269616e740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006616d6f756e740000000000000000000000000000000000000000000000000000", }, diff --git a/packages/store-sync/src/sqlite/sqliteStorage.test.ts b/packages/store-sync/src/sqlite/sqliteStorage.test.ts index 2377d45176..1047ff4262 100644 --- a/packages/store-sync/src/sqlite/sqliteStorage.test.ts +++ b/packages/store-sync/src/sqlite/sqliteStorage.test.ts @@ -52,7 +52,7 @@ describe("sqliteStorage", async () => { logIndex: 54, removed: false, args: { - table: "0x000000000000000000000000000000005265736f757263655479706500000000", + tableId: "0x000000000000000000000000000000005265736f757263655479706500000000", key: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], schemaIndex: 0, data: "0x02", @@ -70,7 +70,7 @@ describe("sqliteStorage", async () => { logIndex: 55, removed: false, args: { - table: "0x6d756473746f726500000000000000005461626c657300000000000000000000", + tableId: "0x6d756473746f726500000000000000005461626c657300000000000000000000", key: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], data: "0x0004010004000000000000000000000000000000000000000000000000000000001c030061030300000000000000000000000000000000000000000000000000000401000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000001600000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000056f776e657200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046974656d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b6974656d56617269616e740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006616d6f756e740000000000000000000000000000000000000000000000000000", }, diff --git a/packages/store/src/IStore.sol b/packages/store/src/IStore.sol index c2e48c9fb4..86031f0c32 100644 --- a/packages/store/src/IStore.sol +++ b/packages/store/src/IStore.sol @@ -7,22 +7,22 @@ import { Schema } from "./Schema.sol"; import { IStoreHook } from "./IStoreHook.sol"; interface IStoreRead { - function getFieldLayout(bytes32 table) external view returns (FieldLayout fieldLayout); + function getFieldLayout(bytes32 tableId) external view returns (FieldLayout fieldLayout); - function getValueSchema(bytes32 table) external view returns (Schema valueSchema); + function getValueSchema(bytes32 tableId) external view returns (Schema valueSchema); - function getKeySchema(bytes32 table) external view returns (Schema keySchema); + function getKeySchema(bytes32 tableId) external view returns (Schema keySchema); // Get full record (including full array) function getRecord( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, FieldLayout fieldLayout ) external view returns (bytes memory data); // Get partial data at schema index function getField( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, uint8 schemaIndex, FieldLayout fieldLayout @@ -30,7 +30,7 @@ interface IStoreRead { // Get field length at schema index function getFieldLength( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 schemaIndex, FieldLayout fieldLayout @@ -38,7 +38,7 @@ interface IStoreRead { // Get start:end slice of the field at schema index function getFieldSlice( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 schemaIndex, FieldLayout fieldLayout, @@ -48,16 +48,16 @@ interface IStoreRead { } interface IStoreWrite { - event StoreSetRecord(bytes32 table, bytes32[] key, bytes data); - event StoreSetField(bytes32 table, bytes32[] key, uint8 schemaIndex, bytes data); - event StoreDeleteRecord(bytes32 table, bytes32[] key); + event StoreSetRecord(bytes32 tableId, bytes32[] key, bytes data); + event StoreSetField(bytes32 tableId, bytes32[] key, uint8 schemaIndex, bytes data); + event StoreDeleteRecord(bytes32 tableId, bytes32[] key); // Set full record (including full dynamic data) - function setRecord(bytes32 table, bytes32[] calldata key, bytes calldata data, FieldLayout fieldLayout) external; + function setRecord(bytes32 tableId, bytes32[] calldata key, bytes calldata data, FieldLayout fieldLayout) external; // Set partial data at schema index function setField( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, uint8 schemaIndex, bytes calldata data, @@ -66,7 +66,7 @@ interface IStoreWrite { // Push encoded items to the dynamic field at schema index function pushToField( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, uint8 schemaIndex, bytes calldata dataToPush, @@ -75,7 +75,7 @@ interface IStoreWrite { // Pop byte length from the dynamic field at schema index function popFromField( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, uint8 schemaIndex, uint256 byteLengthToPop, @@ -84,7 +84,7 @@ interface IStoreWrite { // Change encoded items within the dynamic field at schema index function updateInField( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, uint8 schemaIndex, uint256 startByteIndex, @@ -93,15 +93,15 @@ interface IStoreWrite { ) external; // Set full record (including full dynamic data) - function deleteRecord(bytes32 table, bytes32[] memory key, FieldLayout fieldLayout) external; + function deleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) external; } interface IStoreEphemeral { - event StoreEphemeralRecord(bytes32 table, bytes32[] key, bytes data); + event StoreEphemeralRecord(bytes32 tableId, bytes32[] key, bytes data); // Emit the ephemeral event without modifying storage function emitEphemeralRecord( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, bytes calldata data, FieldLayout fieldLayout @@ -124,7 +124,7 @@ interface IStoreData is IStoreRead, IStoreWrite { */ interface IStoreRegistration { function registerTable( - bytes32 table, + bytes32 tableId, FieldLayout fieldLayout, Schema keySchema, Schema valueSchema, @@ -133,10 +133,10 @@ interface IStoreRegistration { ) external; // Register hook to be called when a record or field is set or deleted - function registerStoreHook(bytes32 table, IStoreHook hookAddress, uint8 enabledHooksBitmap) external; + function registerStoreHook(bytes32 tableId, IStoreHook hookAddress, uint8 enabledHooksBitmap) external; // Unregister a hook for the given tableId - function unregisterStoreHook(bytes32 table, IStoreHook hookAddress) external; + function unregisterStoreHook(bytes32 tableId, IStoreHook hookAddress) external; } interface IStore is IStoreData, IStoreRegistration, IStoreEphemeral, IStoreErrors {} diff --git a/packages/store/src/IStoreHook.sol b/packages/store/src/IStoreHook.sol index ec967976c5..dd75547967 100644 --- a/packages/store/src/IStoreHook.sol +++ b/packages/store/src/IStoreHook.sol @@ -14,12 +14,17 @@ bytes4 constant STORE_HOOK_INTERFACE_ID = IStoreHook.onBeforeSetRecord.selector ERC165_INTERFACE_ID; interface IStoreHook is IERC165 { - function onBeforeSetRecord(bytes32 table, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) external; + function onBeforeSetRecord( + bytes32 tableId, + bytes32[] memory key, + bytes memory data, + FieldLayout fieldLayout + ) external; - function onAfterSetRecord(bytes32 table, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) external; + function onAfterSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) external; function onBeforeSetField( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 schemaIndex, bytes memory data, @@ -27,14 +32,14 @@ interface IStoreHook is IERC165 { ) external; function onAfterSetField( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 schemaIndex, bytes memory data, FieldLayout fieldLayout ) external; - function onBeforeDeleteRecord(bytes32 table, bytes32[] memory key, FieldLayout fieldLayout) external; + function onBeforeDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) external; - function onAfterDeleteRecord(bytes32 table, bytes32[] memory key, FieldLayout fieldLayout) external; + function onAfterDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) external; } diff --git a/packages/store/src/StoreCore.sol b/packages/store/src/StoreCore.sol index a9f2540143..46f010e9e8 100644 --- a/packages/store/src/StoreCore.sol +++ b/packages/store/src/StoreCore.sol @@ -17,10 +17,10 @@ import { StoreHookLib, StoreHookType } from "./StoreHook.sol"; library StoreCore { // note: the preimage of the tuple of keys used to index is part of the event, so it can be used by indexers - event StoreSetRecord(bytes32 table, bytes32[] key, bytes data); - event StoreSetField(bytes32 table, bytes32[] key, uint8 fieldIndex, bytes data); - event StoreDeleteRecord(bytes32 table, bytes32[] key); - event StoreEphemeralRecord(bytes32 table, bytes32[] key, bytes data); + event StoreSetRecord(bytes32 tableId, bytes32[] key, bytes data); + event StoreSetField(bytes32 tableId, bytes32[] key, uint8 fieldIndex, bytes data); + event StoreDeleteRecord(bytes32 tableId, bytes32[] key); + event StoreEphemeralRecord(bytes32 tableId, bytes32[] key, bytes data); /** * Intialize the store address to use in StoreSwitch. @@ -165,7 +165,7 @@ library StoreCore { * Set full data record for the given tableId and key tuple and field layout */ function setRecord(bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) internal { - // verify the value has the correct length for the tableId (based on the tableId's field layout) + // verify the value has the correct length for the table (based on the table's field layout) // to prevent invalid data from being stored // Verify static data length + dynamic data length matches the given data diff --git a/packages/store/src/StoreRead.sol b/packages/store/src/StoreRead.sol index 425d66aee0..a4c35672b9 100644 --- a/packages/store/src/StoreRead.sol +++ b/packages/store/src/StoreRead.sol @@ -7,35 +7,35 @@ import { FieldLayout } from "./FieldLayout.sol"; import { Schema } from "./Schema.sol"; contract StoreRead is IStoreRead { - function getFieldLayout(bytes32 table) public view virtual returns (FieldLayout fieldLayout) { - fieldLayout = StoreCore.getFieldLayout(table); + function getFieldLayout(bytes32 tableId) public view virtual returns (FieldLayout fieldLayout) { + fieldLayout = StoreCore.getFieldLayout(tableId); } - function getValueSchema(bytes32 table) public view virtual returns (Schema valueSchema) { - valueSchema = StoreCore.getValueSchema(table); + function getValueSchema(bytes32 tableId) public view virtual returns (Schema valueSchema) { + valueSchema = StoreCore.getValueSchema(tableId); } - function getKeySchema(bytes32 table) public view virtual returns (Schema keySchema) { - keySchema = StoreCore.getKeySchema(table); + function getKeySchema(bytes32 tableId) public view virtual returns (Schema keySchema) { + keySchema = StoreCore.getKeySchema(tableId); } // Get full record (static and dynamic data) function getRecord( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, FieldLayout fieldLayout ) public view virtual returns (bytes memory data) { - data = StoreCore.getRecord(table, key, fieldLayout); + data = StoreCore.getRecord(tableId, key, fieldLayout); } // Get partial data at schema index function getField( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, uint8 schemaIndex, FieldLayout fieldLayout ) public view virtual returns (bytes memory data) { - data = StoreCore.getField(table, key, schemaIndex, fieldLayout); + data = StoreCore.getField(tableId, key, schemaIndex, fieldLayout); } function getFieldLength( diff --git a/packages/store/src/StoreSwitch.sol b/packages/store/src/StoreSwitch.sol index 4182568096..86ddb3b22e 100644 --- a/packages/store/src/StoreSwitch.sol +++ b/packages/store/src/StoreSwitch.sol @@ -46,53 +46,53 @@ library StoreSwitch { _layout().storeAddress = _storeAddress; } - function registerStoreHook(bytes32 table, IStoreHook hookAddress, uint8 enabledHooksBitmap) internal { + function registerStoreHook(bytes32 tableId, IStoreHook hookAddress, uint8 enabledHooksBitmap) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.registerStoreHook(table, hookAddress, enabledHooksBitmap); + StoreCore.registerStoreHook(tableId, hookAddress, enabledHooksBitmap); } else { - IStore(_storeAddress).registerStoreHook(table, hookAddress, enabledHooksBitmap); + IStore(_storeAddress).registerStoreHook(tableId, hookAddress, enabledHooksBitmap); } } - function unregisterStoreHook(bytes32 table, IStoreHook hookAddress) internal { + function unregisterStoreHook(bytes32 tableId, IStoreHook hookAddress) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.unregisterStoreHook(table, hookAddress); + StoreCore.unregisterStoreHook(tableId, hookAddress); } else { - IStore(_storeAddress).unregisterStoreHook(table, hookAddress); + IStore(_storeAddress).unregisterStoreHook(tableId, hookAddress); } } - function getFieldLayout(bytes32 table) internal view returns (FieldLayout fieldLayout) { + function getFieldLayout(bytes32 tableId) internal view returns (FieldLayout fieldLayout) { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - fieldLayout = StoreCore.getFieldLayout(table); + fieldLayout = StoreCore.getFieldLayout(tableId); } else { - fieldLayout = IStore(_storeAddress).getFieldLayout(table); + fieldLayout = IStore(_storeAddress).getFieldLayout(tableId); } } - function getValueSchema(bytes32 table) internal view returns (Schema valueSchema) { + function getValueSchema(bytes32 tableId) internal view returns (Schema valueSchema) { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - valueSchema = StoreCore.getValueSchema(table); + valueSchema = StoreCore.getValueSchema(tableId); } else { - valueSchema = IStore(_storeAddress).getValueSchema(table); + valueSchema = IStore(_storeAddress).getValueSchema(tableId); } } - function getKeySchema(bytes32 table) internal view returns (Schema keySchema) { + function getKeySchema(bytes32 tableId) internal view returns (Schema keySchema) { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - keySchema = StoreCore.getKeySchema(table); + keySchema = StoreCore.getKeySchema(tableId); } else { - keySchema = IStore(_storeAddress).getKeySchema(table); + keySchema = IStore(_storeAddress).getKeySchema(tableId); } } function registerTable( - bytes32 table, + bytes32 tableId, FieldLayout fieldLayout, Schema keySchema, Schema valueSchema, @@ -101,23 +101,23 @@ library StoreSwitch { ) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.registerTable(table, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); + StoreCore.registerTable(tableId, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); } else { - IStore(_storeAddress).registerTable(table, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); + IStore(_storeAddress).registerTable(tableId, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); } } - function setRecord(bytes32 table, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) internal { + function setRecord(bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.setRecord(table, key, data, fieldLayout); + StoreCore.setRecord(tableId, key, data, fieldLayout); } else { - IStore(_storeAddress).setRecord(table, key, data, fieldLayout); + IStore(_storeAddress).setRecord(tableId, key, data, fieldLayout); } } function setField( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 fieldIndex, bytes memory data, @@ -125,14 +125,14 @@ library StoreSwitch { ) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.setField(table, key, fieldIndex, data, fieldLayout); + StoreCore.setField(tableId, key, fieldIndex, data, fieldLayout); } else { - IStore(_storeAddress).setField(table, key, fieldIndex, data, fieldLayout); + IStore(_storeAddress).setField(tableId, key, fieldIndex, data, fieldLayout); } } function pushToField( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 fieldIndex, bytes memory dataToPush, @@ -140,14 +140,14 @@ library StoreSwitch { ) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.pushToField(table, key, fieldIndex, dataToPush, fieldLayout); + StoreCore.pushToField(tableId, key, fieldIndex, dataToPush, fieldLayout); } else { - IStore(_storeAddress).pushToField(table, key, fieldIndex, dataToPush, fieldLayout); + IStore(_storeAddress).pushToField(tableId, key, fieldIndex, dataToPush, fieldLayout); } } function popFromField( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 fieldIndex, uint256 byteLengthToPop, @@ -155,14 +155,14 @@ library StoreSwitch { ) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.popFromField(table, key, fieldIndex, byteLengthToPop, fieldLayout); + StoreCore.popFromField(tableId, key, fieldIndex, byteLengthToPop, fieldLayout); } else { - IStore(_storeAddress).popFromField(table, key, fieldIndex, byteLengthToPop, fieldLayout); + IStore(_storeAddress).popFromField(tableId, key, fieldIndex, byteLengthToPop, fieldLayout); } } function updateInField( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 fieldIndex, uint256 startByteIndex, @@ -171,78 +171,78 @@ library StoreSwitch { ) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.updateInField(table, key, fieldIndex, startByteIndex, dataToSet, fieldLayout); + StoreCore.updateInField(tableId, key, fieldIndex, startByteIndex, dataToSet, fieldLayout); } else { - IStore(_storeAddress).updateInField(table, key, fieldIndex, startByteIndex, dataToSet, fieldLayout); + IStore(_storeAddress).updateInField(tableId, key, fieldIndex, startByteIndex, dataToSet, fieldLayout); } } - function deleteRecord(bytes32 table, bytes32[] memory key, FieldLayout fieldLayout) internal { + function deleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.deleteRecord(table, key, fieldLayout); + StoreCore.deleteRecord(tableId, key, fieldLayout); } else { - IStore(_storeAddress).deleteRecord(table, key, fieldLayout); + IStore(_storeAddress).deleteRecord(tableId, key, fieldLayout); } } function emitEphemeralRecord( - bytes32 table, + bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout ) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.emitEphemeralRecord(table, key, data, fieldLayout); + StoreCore.emitEphemeralRecord(tableId, key, data, fieldLayout); } else { - IStore(_storeAddress).emitEphemeralRecord(table, key, data, fieldLayout); + IStore(_storeAddress).emitEphemeralRecord(tableId, key, data, fieldLayout); } } function getRecord( - bytes32 table, + bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout ) internal view returns (bytes memory) { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - return StoreCore.getRecord(table, key, fieldLayout); + return StoreCore.getRecord(tableId, key, fieldLayout); } else { - return IStore(_storeAddress).getRecord(table, key, fieldLayout); + return IStore(_storeAddress).getRecord(tableId, key, fieldLayout); } } function getField( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 fieldIndex, FieldLayout fieldLayout ) internal view returns (bytes memory) { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - return StoreCore.getField(table, key, fieldIndex, fieldLayout); + return StoreCore.getField(tableId, key, fieldIndex, fieldLayout); } else { - return IStore(_storeAddress).getField(table, key, fieldIndex, fieldLayout); + return IStore(_storeAddress).getField(tableId, key, fieldIndex, fieldLayout); } } function getFieldLength( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 fieldIndex, FieldLayout fieldLayout ) internal view returns (uint256) { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - return StoreCore.getFieldLength(table, key, fieldIndex, fieldLayout); + return StoreCore.getFieldLength(tableId, key, fieldIndex, fieldLayout); } else { - return IStore(_storeAddress).getFieldLength(table, key, fieldIndex, fieldLayout); + return IStore(_storeAddress).getFieldLength(tableId, key, fieldIndex, fieldLayout); } } function getFieldSlice( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 fieldIndex, FieldLayout fieldLayout, @@ -251,9 +251,9 @@ library StoreSwitch { ) internal view returns (bytes memory) { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - return StoreCore.getFieldSlice(table, key, fieldIndex, fieldLayout, start, end); + return StoreCore.getFieldSlice(tableId, key, fieldIndex, fieldLayout, start, end); } else { - return IStore(_storeAddress).getFieldSlice(table, key, fieldIndex, fieldLayout, start, end); + return IStore(_storeAddress).getFieldSlice(tableId, key, fieldIndex, fieldLayout, start, end); } } } diff --git a/packages/store/test/EchoSubscriber.sol b/packages/store/test/EchoSubscriber.sol index b93fef9aa9..b9e23c6b41 100644 --- a/packages/store/test/EchoSubscriber.sol +++ b/packages/store/test/EchoSubscriber.sol @@ -7,39 +7,39 @@ import { StoreHook } from "../src/StoreHook.sol"; contract EchoSubscriber is StoreHook { event HookCalled(bytes); - function onBeforeSetRecord(bytes32 table, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) public { - emit HookCalled(abi.encode(table, key, data, fieldLayout)); + function onBeforeSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) public { + emit HookCalled(abi.encode(tableId, key, data, fieldLayout)); } - function onAfterSetRecord(bytes32 table, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) public { - emit HookCalled(abi.encode(table, key, data, fieldLayout)); + function onAfterSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) public { + emit HookCalled(abi.encode(tableId, key, data, fieldLayout)); } function onBeforeSetField( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 schemaIndex, bytes memory data, FieldLayout fieldLayout ) public { - emit HookCalled(abi.encode(table, key, schemaIndex, data, fieldLayout)); + emit HookCalled(abi.encode(tableId, key, schemaIndex, data, fieldLayout)); } function onAfterSetField( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 schemaIndex, bytes memory data, FieldLayout fieldLayout ) public { - emit HookCalled(abi.encode(table, key, schemaIndex, data, fieldLayout)); + emit HookCalled(abi.encode(tableId, key, schemaIndex, data, fieldLayout)); } - function onBeforeDeleteRecord(bytes32 table, bytes32[] memory key, FieldLayout fieldLayout) public { - emit HookCalled(abi.encode(table, key, fieldLayout)); + function onBeforeDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) public { + emit HookCalled(abi.encode(tableId, key, fieldLayout)); } - function onAfterDeleteRecord(bytes32 table, bytes32[] memory key, FieldLayout fieldLayout) public { - emit HookCalled(abi.encode(table, key, fieldLayout)); + function onAfterDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) public { + emit HookCalled(abi.encode(tableId, key, fieldLayout)); } } diff --git a/packages/store/test/MirrorSubscriber.sol b/packages/store/test/MirrorSubscriber.sol index fe4d1d5c34..d30b615679 100644 --- a/packages/store/test/MirrorSubscriber.sol +++ b/packages/store/test/MirrorSubscriber.sol @@ -7,13 +7,13 @@ import { StoreSwitch } from "../src/StoreSwitch.sol"; import { FieldLayout } from "../src/FieldLayout.sol"; import { Schema } from "../src/Schema.sol"; -bytes32 constant indexerTableId = keccak256("indexer.table"); +bytes32 constant indexerTableId = keccak256("indexer.tableId"); contract MirrorSubscriber is StoreHook { - bytes32 _table; + bytes32 _tableId; constructor( - bytes32 table, + bytes32 tableId, FieldLayout fieldLayout, Schema keySchema, Schema valueSchema, @@ -21,26 +21,26 @@ contract MirrorSubscriber is StoreHook { string[] memory fieldNames ) { IStore(msg.sender).registerTable(indexerTableId, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); - _table = table; + _tableId = tableId; } - function onBeforeSetRecord(bytes32 table, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) public { - if (table != table) revert("invalid table"); + function onBeforeSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) public { + if (tableId != tableId) revert("invalid tableId"); StoreSwitch.setRecord(indexerTableId, key, data, fieldLayout); } - function onAfterSetRecord(bytes32 table, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) public { + function onAfterSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) public { // NOOP } function onBeforeSetField( - bytes32 table, + bytes32 tableId, bytes32[] memory key, uint8 schemaIndex, bytes memory data, FieldLayout fieldLayout ) public { - if (table != table) revert("invalid table"); + if (tableId != tableId) revert("invalid tableId"); StoreSwitch.setField(indexerTableId, key, schemaIndex, data, fieldLayout); } @@ -48,12 +48,12 @@ contract MirrorSubscriber is StoreHook { // NOOP } - function onBeforeDeleteRecord(bytes32 table, bytes32[] memory key, FieldLayout fieldLayout) public { - if (table != table) revert("invalid table"); + function onBeforeDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) public { + if (tableId != tableId) revert("invalid tableId"); StoreSwitch.deleteRecord(indexerTableId, key, fieldLayout); } - function onAfterDeleteRecord(bytes32 table, bytes32[] memory key, FieldLayout fieldLayout) public { + function onAfterDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) public { // NOOP } } diff --git a/packages/store/test/StoreCore.t.sol b/packages/store/test/StoreCore.t.sol index f6e37eac36..ad1b84685b 100644 --- a/packages/store/test/StoreCore.t.sol +++ b/packages/store/test/StoreCore.t.sol @@ -55,11 +55,11 @@ contract StoreCoreTest is Test, StoreMock { fieldNames[2] = "value3"; fieldNames[3] = "value4"; - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); // Expect a StoreSetRecord event to be emitted bytes32[] memory key = new bytes32[](1); - key[0] = bytes32(table); + key[0] = bytes32(tableId); vm.expectEmit(true, true, true, true); emit StoreSetRecord( TablesTableId, @@ -72,16 +72,16 @@ contract StoreCoreTest is Test, StoreMock { abi.encode(fieldNames) ) ); - IStore(this).registerTable(table, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); + IStore(this).registerTable(tableId, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); - assertEq(IStore(this).getFieldLayout(table).unwrap(), fieldLayout.unwrap()); - assertEq(IStore(this).getValueSchema(table).unwrap(), valueSchema.unwrap()); - assertEq(IStore(this).getKeySchema(table).unwrap(), keySchema.unwrap()); + assertEq(IStore(this).getFieldLayout(tableId).unwrap(), fieldLayout.unwrap()); + assertEq(IStore(this).getValueSchema(tableId).unwrap(), valueSchema.unwrap()); + assertEq(IStore(this).getKeySchema(tableId).unwrap(), keySchema.unwrap()); - bytes memory loadedKeyNames = Tables.getAbiEncodedKeyNames(IStore(this), table); + bytes memory loadedKeyNames = Tables.getAbiEncodedKeyNames(IStore(this), tableId); assertEq(loadedKeyNames, abi.encode(keyNames)); - bytes memory loadedFieldNames = Tables.getAbiEncodedFieldNames(IStore(this), table); + bytes memory loadedFieldNames = Tables.getAbiEncodedFieldNames(IStore(this), tableId); assertEq(loadedFieldNames, abi.encode(fieldNames)); } @@ -89,7 +89,7 @@ contract StoreCoreTest is Test, StoreMock { string[] memory keyNames = new string[](2); string[] memory fieldNames = new string[](4); IStore(this).registerTable( - keccak256("table"), + keccak256("tableId"), FieldLayout.wrap(keccak256("random bytes as value field layout")), Schema.wrap(keccak256("random bytes as key schema")), Schema.wrap(keccak256("random bytes as value schema")), @@ -108,35 +108,47 @@ contract StoreCoreTest is Test, StoreMock { SchemaType.UINT8, SchemaType.UINT16 ); - bytes32 table = keccak256("some.table"); - bytes32 table2 = keccak256("other.table"); - IStore(this).registerTable(table, fieldLayout, defaultKeySchema, valueSchema, keyNames, fieldNames); + bytes32 tableId = keccak256("some.tableId"); + bytes32 tableId2 = keccak256("other.tableId"); + IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, keyNames, fieldNames); - assertTrue(StoreCore.hasTable(table)); - assertFalse(StoreCore.hasTable(table2)); + assertTrue(StoreCore.hasTable(tableId)); + assertFalse(StoreCore.hasTable(tableId2)); - IStore(this).getFieldLayout(table); - IStore(this).getValueSchema(table); - IStore(this).getKeySchema(table); + IStore(this).getFieldLayout(tableId); + IStore(this).getValueSchema(tableId); + IStore(this).getKeySchema(tableId); vm.expectRevert( - abi.encodeWithSelector(IStoreErrors.StoreCore_TableNotFound.selector, table2, string(abi.encodePacked(table2))) + abi.encodeWithSelector( + IStoreErrors.StoreCore_TableNotFound.selector, + tableId2, + string(abi.encodePacked(tableId2)) + ) ); - IStore(this).getFieldLayout(table2); + IStore(this).getFieldLayout(tableId2); vm.expectRevert( - abi.encodeWithSelector(IStoreErrors.StoreCore_TableNotFound.selector, table2, string(abi.encodePacked(table2))) + abi.encodeWithSelector( + IStoreErrors.StoreCore_TableNotFound.selector, + tableId2, + string(abi.encodePacked(tableId2)) + ) ); - IStore(this).getValueSchema(table2); + IStore(this).getValueSchema(tableId2); vm.expectRevert( - abi.encodeWithSelector(IStoreErrors.StoreCore_TableNotFound.selector, table2, string(abi.encodePacked(table2))) + abi.encodeWithSelector( + IStoreErrors.StoreCore_TableNotFound.selector, + tableId2, + string(abi.encodePacked(tableId2)) + ) ); - IStore(this).getKeySchema(table2); + IStore(this).getKeySchema(tableId2); } function testRegisterTableRevertNames() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(1, 0); Schema keySchema = SchemaEncodeHelper.encode( SchemaType.UINT8, @@ -150,15 +162,15 @@ contract StoreCoreTest is Test, StoreMock { // Register table with invalid key names vm.expectRevert(abi.encodeWithSelector(IStoreErrors.StoreCore_InvalidKeyNamesLength.selector, 4, 1)); - IStore(this).registerTable(table, fieldLayout, keySchema, valueSchema, oneName, oneName); + IStore(this).registerTable(tableId, fieldLayout, keySchema, valueSchema, oneName, oneName); // Register table with invalid value names vm.expectRevert(abi.encodeWithSelector(IStoreErrors.StoreCore_InvalidFieldNamesLength.selector, 1, 4)); - IStore(this).registerTable(table, fieldLayout, keySchema, valueSchema, fourNames, fourNames); + IStore(this).registerTable(tableId, fieldLayout, keySchema, valueSchema, fourNames, fourNames); } function testSetAndGetDynamicDataLength() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(1, 2, 4, 2); Schema valueSchema = SchemaEncodeHelper.encode( @@ -170,32 +182,32 @@ contract StoreCoreTest is Test, StoreMock { ); // Register table - IStore(this).registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](5)); + IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](5)); // Create some key bytes32[] memory key = new bytes32[](1); key[0] = bytes32("some key"); // Set dynamic data length of dynamic index 0 - StoreCoreInternal._setDynamicDataLengthAtIndex(table, key, 0, 10); + StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, key, 0, 10); - PackedCounter encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(table, key); + PackedCounter encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(tableId, key); assertEq(encodedLength.atIndex(0), 10); assertEq(encodedLength.atIndex(1), 0); assertEq(encodedLength.total(), 10); // Set dynamic data length of dynamic index 1 - StoreCoreInternal._setDynamicDataLengthAtIndex(table, key, 1, 99); + StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, key, 1, 99); - encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(table, key); + encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(tableId, key); assertEq(encodedLength.atIndex(0), 10); assertEq(encodedLength.atIndex(1), 99); assertEq(encodedLength.total(), 109); // Reduce dynamic data length of dynamic index 0 again - StoreCoreInternal._setDynamicDataLengthAtIndex(table, key, 0, 5); + StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, key, 0, 5); - encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(table, key); + encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(tableId, key); assertEq(encodedLength.atIndex(0), 5); assertEq(encodedLength.atIndex(1), 99); assertEq(encodedLength.total(), 104); @@ -211,8 +223,8 @@ contract StoreCoreTest is Test, StoreMock { SchemaType.UINT16 ); - bytes32 table = keccak256("some.table"); - IStore(this).registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](4)); + bytes32 tableId = keccak256("some.tableId"); + IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](4)); // Set data bytes memory data = abi.encodePacked(bytes1(0x01), bytes2(0x0203), bytes1(0x04), bytes2(0x0506)); @@ -222,12 +234,12 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetRecord event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetRecord(table, key, data); + emit StoreSetRecord(tableId, key, data); - IStore(this).setRecord(table, key, data, fieldLayout); + IStore(this).setRecord(tableId, key, data, fieldLayout); // Get data - bytes memory loadedData = IStore(this).getRecord(table, key, fieldLayout); + bytes memory loadedData = IStore(this).getRecord(tableId, key, fieldLayout); assertTrue(Bytes.equals(data, loadedData)); } @@ -241,8 +253,8 @@ contract StoreCoreTest is Test, StoreMock { SchemaType.UINT8, SchemaType.UINT16 ); - bytes32 table = keccak256("some.table"); - IStore(this).registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](4)); + bytes32 tableId = keccak256("some.tableId"); + IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](4)); // Set data bytes memory data = abi.encodePacked(bytes1(0x01), bytes2(0x0203), bytes1(0x04)); @@ -251,15 +263,15 @@ contract StoreCoreTest is Test, StoreMock { key[0] = keccak256("some.key"); // This should fail because the data is not 6 bytes long - IStore(this).setRecord(table, key, data, fieldLayout); + IStore(this).setRecord(tableId, key, data, fieldLayout); } function testSetAndGetStaticDataSpanningWords() public { // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 32, 0); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128, SchemaType.UINT256); - bytes32 table = keccak256("some.table"); - IStore(this).registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); + bytes32 tableId = keccak256("some.tableId"); + IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); // Set data bytes memory data = abi.encodePacked( @@ -272,18 +284,18 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetRecord event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetRecord(table, key, data); + emit StoreSetRecord(tableId, key, data); - IStore(this).setRecord(table, key, data, fieldLayout); + IStore(this).setRecord(tableId, key, data, fieldLayout); // Get data - bytes memory loadedData = IStore(this).getRecord(table, key, fieldLayout); + bytes memory loadedData = IStore(this).getRecord(tableId, key, fieldLayout); assertTrue(Bytes.equals(data, loadedData)); } function testSetAndGetDynamicData() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); @@ -292,7 +304,7 @@ contract StoreCoreTest is Test, StoreMock { SchemaType.UINT32_ARRAY, SchemaType.UINT32_ARRAY ); - IStore(this).registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); + IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); bytes16 firstDataBytes = bytes16(0x0102030405060708090a0b0c0d0e0f10); @@ -332,13 +344,13 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetRecord event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetRecord(table, key, data); + emit StoreSetRecord(tableId, key, data); // Set data - IStore(this).setRecord(table, key, data, fieldLayout); + IStore(this).setRecord(tableId, key, data, fieldLayout); // Get data - bytes memory loadedData = IStore(this).getRecord(table, key, fieldLayout); + bytes memory loadedData = IStore(this).getRecord(tableId, key, fieldLayout); assertEq(loadedData.length, data.length); assertEq(keccak256(loadedData), keccak256(data)); @@ -358,7 +370,7 @@ contract StoreCoreTest is Test, StoreMock { } function testSetAndGetField() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 32, 2); @@ -368,7 +380,7 @@ contract StoreCoreTest is Test, StoreMock { SchemaType.UINT32_ARRAY, SchemaType.UINT32_ARRAY ); - IStore(this).registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](4)); + IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](4)); bytes16 firstDataBytes = bytes16(0x0102030405060708090a0b0c0d0e0f10); @@ -380,24 +392,24 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(table, key, 0, firstDataPacked); + emit StoreSetField(tableId, key, 0, firstDataPacked); // Set first field - IStore(this).setField(table, key, 0, firstDataPacked, fieldLayout); + IStore(this).setField(tableId, key, 0, firstDataPacked, fieldLayout); //////////////// // Static data //////////////// // Get first field - bytes memory loadedData = IStore(this).getField(table, key, 0, fieldLayout); + bytes memory loadedData = IStore(this).getField(tableId, key, 0, fieldLayout); // Verify loaded data is correct assertEq(loadedData.length, 16); assertEq(bytes16(loadedData), bytes16(firstDataBytes)); // Verify the second index is not set yet - assertEq(uint256(bytes32(IStore(this).getField(table, key, 1, fieldLayout))), 0); + assertEq(uint256(bytes32(IStore(this).getField(tableId, key, 1, fieldLayout))), 0); // Set second field bytes32 secondDataBytes = keccak256("some data"); @@ -406,27 +418,27 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(table, key, 1, secondDataPacked); + emit StoreSetField(tableId, key, 1, secondDataPacked); - IStore(this).setField(table, key, 1, secondDataPacked, fieldLayout); + IStore(this).setField(tableId, key, 1, secondDataPacked, fieldLayout); // Get second field - loadedData = IStore(this).getField(table, key, 1, fieldLayout); + loadedData = IStore(this).getField(tableId, key, 1, fieldLayout); // Verify loaded data is correct assertEq(loadedData.length, 32); assertEq(bytes32(loadedData), secondDataBytes); // Verify the first field didn't change - assertEq(bytes16(IStore(this).getField(table, key, 0, fieldLayout)), bytes16(firstDataBytes)); + assertEq(bytes16(IStore(this).getField(tableId, key, 0, fieldLayout)), bytes16(firstDataBytes)); // Verify the full static data is correct - assertEq(IStore(this).getFieldLayout(table).staticDataLength(), 48); - assertEq(IStore(this).getValueSchema(table).staticDataLength(), 48); - assertEq(Bytes.slice16(IStore(this).getRecord(table, key, fieldLayout), 0), firstDataBytes); - assertEq(Bytes.slice32(IStore(this).getRecord(table, key, fieldLayout), 16), secondDataBytes); + assertEq(IStore(this).getFieldLayout(tableId).staticDataLength(), 48); + assertEq(IStore(this).getValueSchema(tableId).staticDataLength(), 48); + assertEq(Bytes.slice16(IStore(this).getRecord(tableId, key, fieldLayout), 0), firstDataBytes); + assertEq(Bytes.slice32(IStore(this).getRecord(tableId, key, fieldLayout), 16), secondDataBytes); assertEq( - keccak256(SliceLib.getSubslice(IStore(this).getRecord(table, key, fieldLayout), 0, 48).toBytes()), + keccak256(SliceLib.getSubslice(IStore(this).getRecord(tableId, key, fieldLayout), 0, 48).toBytes()), keccak256(abi.encodePacked(firstDataBytes, secondDataBytes)) ); @@ -453,13 +465,13 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(table, key, 2, thirdDataBytes); + emit StoreSetField(tableId, key, 2, thirdDataBytes); // Set third field - IStore(this).setField(table, key, 2, thirdDataBytes, fieldLayout); + IStore(this).setField(tableId, key, 2, thirdDataBytes, fieldLayout); // Get third field - loadedData = IStore(this).getField(table, key, 2, fieldLayout); + loadedData = IStore(this).getField(tableId, key, 2, fieldLayout); // Verify loaded data is correct assertEq(SliceLib.fromBytes(loadedData).decodeArray_uint32().length, 2); @@ -467,21 +479,21 @@ contract StoreCoreTest is Test, StoreMock { assertEq(keccak256(loadedData), keccak256(thirdDataBytes)); // Verify the fourth field is not set yet - assertEq(IStore(this).getField(table, key, 3, fieldLayout).length, 0); + assertEq(IStore(this).getField(tableId, key, 3, fieldLayout).length, 0); // Verify none of the previous fields were impacted - assertEq(bytes16(IStore(this).getField(table, key, 0, fieldLayout)), bytes16(firstDataBytes)); - assertEq(bytes32(IStore(this).getField(table, key, 1, fieldLayout)), bytes32(secondDataBytes)); + assertEq(bytes16(IStore(this).getField(tableId, key, 0, fieldLayout)), bytes16(firstDataBytes)); + assertEq(bytes32(IStore(this).getField(tableId, key, 1, fieldLayout)), bytes32(secondDataBytes)); // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(table, key, 3, fourthDataBytes); + emit StoreSetField(tableId, key, 3, fourthDataBytes); // Set fourth field - IStore(this).setField(table, key, 3, fourthDataBytes, fieldLayout); + IStore(this).setField(tableId, key, 3, fourthDataBytes, fieldLayout); // Get fourth field - loadedData = IStore(this).getField(table, key, 3, fieldLayout); + loadedData = IStore(this).getField(tableId, key, 3, fieldLayout); // Verify loaded data is correct assertEq(loadedData.length, fourthDataBytes.length); @@ -490,7 +502,7 @@ contract StoreCoreTest is Test, StoreMock { // Verify all fields are correct PackedCounter encodedLengths = PackedCounterLib.pack(uint40(thirdDataBytes.length), uint40(fourthDataBytes.length)); assertEq( - keccak256(IStore(this).getRecord(table, key, fieldLayout)), + keccak256(IStore(this).getRecord(tableId, key, fieldLayout)), keccak256( abi.encodePacked(firstDataBytes, secondDataBytes, encodedLengths.unwrap(), thirdDataBytes, fourthDataBytes) ) @@ -498,7 +510,7 @@ contract StoreCoreTest is Test, StoreMock { } function testDeleteData() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); @@ -507,7 +519,7 @@ contract StoreCoreTest is Test, StoreMock { SchemaType.UINT32_ARRAY, SchemaType.UINT32_ARRAY ); - IStore(this).registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); + IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); bytes16 firstDataBytes = bytes16(0x0102030405060708090a0b0c0d0e0f10); @@ -546,28 +558,28 @@ contract StoreCoreTest is Test, StoreMock { key[0] = bytes32("some.key"); // Set data - IStore(this).setRecord(table, key, data, fieldLayout); + IStore(this).setRecord(tableId, key, data, fieldLayout); // Get data - bytes memory loadedData = IStore(this).getRecord(table, key, fieldLayout); + bytes memory loadedData = IStore(this).getRecord(tableId, key, fieldLayout); assertEq(loadedData.length, data.length); assertEq(keccak256(loadedData), keccak256(data)); // Expect a StoreDeleteRecord event to be emitted vm.expectEmit(true, true, true, true); - emit StoreDeleteRecord(table, key); + emit StoreDeleteRecord(tableId, key); // Delete data - IStore(this).deleteRecord(table, key, fieldLayout); + IStore(this).deleteRecord(tableId, key, fieldLayout); // Verify data is deleted - loadedData = IStore(this).getRecord(table, key, fieldLayout); + loadedData = IStore(this).getRecord(tableId, key, fieldLayout); assertEq(keccak256(loadedData), keccak256(new bytes(fieldLayout.staticDataLength()))); } struct TestPushToFieldData { - bytes32 table; + bytes32 tableId; bytes32[] key; bytes32 firstDataBytes; bytes secondDataBytes; @@ -582,7 +594,7 @@ contract StoreCoreTest is Test, StoreMock { function testPushToField() public { TestPushToFieldData memory data = TestPushToFieldData(0, new bytes32[](0), 0, "", "", "", "", "", "", ""); - data.table = keccak256("some.table"); + data.tableId = keccak256("some.tableId"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); @@ -592,7 +604,7 @@ contract StoreCoreTest is Test, StoreMock { SchemaType.UINT32_ARRAY ); IStore(this).registerTable( - data.table, + data.tableId, fieldLayout, defaultKeySchema, valueSchema, @@ -622,10 +634,10 @@ contract StoreCoreTest is Test, StoreMock { } // Set fields - IStore(this).setField(data.table, data.key, 0, abi.encodePacked(data.firstDataBytes), fieldLayout); - IStore(this).setField(data.table, data.key, 1, data.secondDataBytes, fieldLayout); + IStore(this).setField(data.tableId, data.key, 0, abi.encodePacked(data.firstDataBytes), fieldLayout); + IStore(this).setField(data.tableId, data.key, 1, data.secondDataBytes, fieldLayout); // Initialize a field with push - IStore(this).pushToField(data.table, data.key, 2, data.thirdDataBytes, fieldLayout); + IStore(this).pushToField(data.tableId, data.key, 2, data.thirdDataBytes, fieldLayout); // Create data to push { @@ -637,13 +649,13 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(data.table, data.key, 1, data.newSecondDataBytes); + emit StoreSetField(data.tableId, data.key, 1, data.newSecondDataBytes); // Push to second field - IStore(this).pushToField(data.table, data.key, 1, data.secondDataToPush, fieldLayout); + IStore(this).pushToField(data.tableId, data.key, 1, data.secondDataToPush, fieldLayout); // Get second field - data.loadedData = IStore(this).getField(data.table, data.key, 1, fieldLayout); + data.loadedData = IStore(this).getField(data.tableId, data.key, 1, fieldLayout); // Verify loaded data is correct assertEq(SliceLib.fromBytes(data.loadedData).decodeArray_uint32().length, 2 + 1); @@ -651,8 +663,8 @@ contract StoreCoreTest is Test, StoreMock { assertEq(data.loadedData, data.newSecondDataBytes); // Verify none of the other fields were impacted - assertEq(bytes32(IStore(this).getField(data.table, data.key, 0, fieldLayout)), data.firstDataBytes); - assertEq(IStore(this).getField(data.table, data.key, 2, fieldLayout), data.thirdDataBytes); + assertEq(bytes32(IStore(this).getField(data.tableId, data.key, 0, fieldLayout)), data.firstDataBytes); + assertEq(IStore(this).getField(data.tableId, data.key, 2, fieldLayout), data.thirdDataBytes); // Create data to push { @@ -673,13 +685,13 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(data.table, data.key, 2, data.newThirdDataBytes); + emit StoreSetField(data.tableId, data.key, 2, data.newThirdDataBytes); // Push to third field - IStore(this).pushToField(data.table, data.key, 2, data.thirdDataToPush, fieldLayout); + IStore(this).pushToField(data.tableId, data.key, 2, data.thirdDataToPush, fieldLayout); // Get third field - data.loadedData = IStore(this).getField(data.table, data.key, 2, fieldLayout); + data.loadedData = IStore(this).getField(data.tableId, data.key, 2, fieldLayout); // Verify loaded data is correct assertEq(SliceLib.fromBytes(data.loadedData).decodeArray_uint32().length, 3 + 10); @@ -687,12 +699,12 @@ contract StoreCoreTest is Test, StoreMock { assertEq(data.loadedData, data.newThirdDataBytes); // Verify none of the other fields were impacted - assertEq(bytes32(IStore(this).getField(data.table, data.key, 0, fieldLayout)), data.firstDataBytes); - assertEq(IStore(this).getField(data.table, data.key, 1, fieldLayout), data.newSecondDataBytes); + assertEq(bytes32(IStore(this).getField(data.tableId, data.key, 0, fieldLayout)), data.firstDataBytes); + assertEq(IStore(this).getField(data.tableId, data.key, 1, fieldLayout), data.newSecondDataBytes); } struct TestUpdateInFieldData { - bytes32 table; + bytes32 tableId; bytes32[] key; bytes32 firstDataBytes; uint32[] secondData; @@ -722,7 +734,7 @@ contract StoreCoreTest is Test, StoreMock { "" ); - data.table = keccak256("some.table"); + data.tableId = keccak256("some.tableId"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); @@ -732,7 +744,7 @@ contract StoreCoreTest is Test, StoreMock { SchemaType.UINT64_ARRAY ); IStore(this).registerTable( - data.table, + data.tableId, fieldLayout, defaultKeySchema, valueSchema, @@ -761,9 +773,9 @@ contract StoreCoreTest is Test, StoreMock { data.thirdDataBytes = EncodeArray.encode(data.thirdData); // Set fields - IStore(this).setField(data.table, data.key, 0, abi.encodePacked(data.firstDataBytes), fieldLayout); - IStore(this).setField(data.table, data.key, 1, data.secondDataBytes, fieldLayout); - IStore(this).setField(data.table, data.key, 2, data.thirdDataBytes, fieldLayout); + IStore(this).setField(data.tableId, data.key, 0, abi.encodePacked(data.firstDataBytes), fieldLayout); + IStore(this).setField(data.tableId, data.key, 1, data.secondDataBytes, fieldLayout); + IStore(this).setField(data.tableId, data.key, 2, data.thirdDataBytes, fieldLayout); // Create data to use for the update { @@ -776,13 +788,13 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(data.table, data.key, 1, data.newSecondDataBytes); + emit StoreSetField(data.tableId, data.key, 1, data.newSecondDataBytes); // Update index 1 in second field (4 = byte length of uint32) - IStore(this).updateInField(data.table, data.key, 1, 4 * 1, data.secondDataForUpdate, fieldLayout); + IStore(this).updateInField(data.tableId, data.key, 1, 4 * 1, data.secondDataForUpdate, fieldLayout); // Get second field - data.loadedData = IStore(this).getField(data.table, data.key, 1, fieldLayout); + data.loadedData = IStore(this).getField(data.tableId, data.key, 1, fieldLayout); // Verify loaded data is correct assertEq(SliceLib.fromBytes(data.loadedData).decodeArray_uint32().length, data.secondData.length); @@ -790,8 +802,8 @@ contract StoreCoreTest is Test, StoreMock { assertEq(data.loadedData, data.newSecondDataBytes); // Verify none of the other fields were impacted - assertEq(bytes32(IStore(this).getField(data.table, data.key, 0, fieldLayout)), data.firstDataBytes); - assertEq(IStore(this).getField(data.table, data.key, 2, fieldLayout), data.thirdDataBytes); + assertEq(bytes32(IStore(this).getField(data.tableId, data.key, 0, fieldLayout)), data.firstDataBytes); + assertEq(IStore(this).getField(data.tableId, data.key, 2, fieldLayout), data.thirdDataBytes); // Create data for update { @@ -814,13 +826,13 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(data.table, data.key, 2, data.newThirdDataBytes); + emit StoreSetField(data.tableId, data.key, 2, data.newThirdDataBytes); // Update indexes 1,2,3,4 in third field (8 = byte length of uint64) - IStore(this).updateInField(data.table, data.key, 2, 8 * 1, data.thirdDataForUpdate, fieldLayout); + IStore(this).updateInField(data.tableId, data.key, 2, 8 * 1, data.thirdDataForUpdate, fieldLayout); // Get third field - data.loadedData = IStore(this).getField(data.table, data.key, 2, fieldLayout); + data.loadedData = IStore(this).getField(data.tableId, data.key, 2, fieldLayout); // Verify loaded data is correct assertEq(SliceLib.fromBytes(data.loadedData).decodeArray_uint64().length, data.thirdData.length); @@ -828,56 +840,56 @@ contract StoreCoreTest is Test, StoreMock { assertEq(data.loadedData, data.newThirdDataBytes); // Verify none of the other fields were impacted - assertEq(bytes32(IStore(this).getField(data.table, data.key, 0, fieldLayout)), data.firstDataBytes); - assertEq(IStore(this).getField(data.table, data.key, 1, fieldLayout), data.newSecondDataBytes); + assertEq(bytes32(IStore(this).getField(data.tableId, data.key, 0, fieldLayout)), data.firstDataBytes); + assertEq(IStore(this).getField(data.tableId, data.key, 1, fieldLayout), data.newSecondDataBytes); // startByteIndex must not overflow vm.expectRevert( abi.encodeWithSelector(IStoreErrors.StoreCore_DataIndexOverflow.selector, type(uint40).max, type(uint56).max) ); - IStore(this).updateInField(data.table, data.key, 2, type(uint56).max, data.thirdDataForUpdate, fieldLayout); + IStore(this).updateInField(data.tableId, data.key, 2, type(uint56).max, data.thirdDataForUpdate, fieldLayout); } function testAccessEmptyData() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(4, 1); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT32, SchemaType.UINT32_ARRAY); - IStore(this).registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); + IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); // Create key bytes32[] memory key = new bytes32[](1); key[0] = bytes32("some.key"); - bytes memory data1 = IStore(this).getRecord(table, key, fieldLayout); + bytes memory data1 = IStore(this).getRecord(tableId, key, fieldLayout); assertEq(data1.length, fieldLayout.staticDataLength()); - bytes memory data2 = IStore(this).getField(table, key, 0, fieldLayout); + bytes memory data2 = IStore(this).getField(tableId, key, 0, fieldLayout); assertEq(data2.length, fieldLayout.staticDataLength()); - bytes memory data3 = IStore(this).getField(table, key, 1, fieldLayout); + bytes memory data3 = IStore(this).getField(tableId, key, 1, fieldLayout); assertEq(data3.length, 0); - uint256 data3Length = IStore(this).getFieldLength(table, key, 1, fieldLayout); + uint256 data3Length = IStore(this).getFieldLength(tableId, key, 1, fieldLayout); assertEq(data3Length, 0); - bytes memory data3Slice = IStore(this).getFieldSlice(table, key, 1, fieldLayout, 0, 0); + bytes memory data3Slice = IStore(this).getFieldSlice(tableId, key, 1, fieldLayout, 0, 0); assertEq(data3Slice.length, 0); } function testRegisterHook() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some key"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 0); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128); - IStore(this).registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](1)); + IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](1)); // Create subscriber MirrorSubscriber subscriber = new MirrorSubscriber( - table, + tableId, fieldLayout, defaultKeySchema, valueSchema, @@ -886,7 +898,7 @@ contract StoreCoreTest is Test, StoreMock { ); IStore(this).registerStoreHook( - table, + tableId, subscriber, StoreHookLib.encodeBitmap({ onBeforeSetRecord: true, @@ -900,7 +912,7 @@ contract StoreCoreTest is Test, StoreMock { bytes memory data = abi.encodePacked(bytes16(0x0102030405060708090a0b0c0d0e0f10)); - IStore(this).setRecord(table, key, data, fieldLayout); + IStore(this).setRecord(tableId, key, data, fieldLayout); // Get data from indexed table - the indexer should have mirrored the data there bytes memory indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); @@ -908,13 +920,13 @@ contract StoreCoreTest is Test, StoreMock { data = abi.encodePacked(bytes16(0x1112131415161718191a1b1c1d1e1f20)); - IStore(this).setField(table, key, 0, data, fieldLayout); + IStore(this).setField(tableId, key, 0, data, fieldLayout); // Get data from indexed table - the indexer should have mirrored the data there indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); assertEq(keccak256(data), keccak256(indexedData)); - IStore(this).deleteRecord(table, key, fieldLayout); + IStore(this).deleteRecord(tableId, key, fieldLayout); // Get data from indexed table - the indexer should have mirrored the data there indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); @@ -922,14 +934,14 @@ contract StoreCoreTest is Test, StoreMock { } function testUnregisterHook() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some key"); // Register table's value schema FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 0); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128); - IStore(this).registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](1)); + IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](1)); // Create a RevertSubscriber and an EchoSubscriber RevertSubscriber revertSubscriber = new RevertSubscriber(); @@ -937,7 +949,7 @@ contract StoreCoreTest is Test, StoreMock { // Register both subscribers IStore(this).registerStoreHook( - table, + tableId, revertSubscriber, StoreHookLib.encodeBitmap({ onBeforeSetRecord: true, @@ -950,7 +962,7 @@ contract StoreCoreTest is Test, StoreMock { ); // Register both subscribers IStore(this).registerStoreHook( - table, + tableId, echoSubscriber, StoreHookLib.encodeBitmap({ onBeforeSetRecord: true, @@ -966,63 +978,63 @@ contract StoreCoreTest is Test, StoreMock { // Expect a revert when the RevertSubscriber's onBeforeSetRecord hook is called vm.expectRevert(bytes("onBeforeSetRecord")); - IStore(this).setRecord(table, key, data, fieldLayout); + IStore(this).setRecord(tableId, key, data, fieldLayout); // Expect a revert when the RevertSubscriber's onBeforeSetField hook is called vm.expectRevert(bytes("onBeforeSetField")); - IStore(this).setField(table, key, 0, data, fieldLayout); + IStore(this).setField(tableId, key, 0, data, fieldLayout); // Expect a revert when the RevertSubscriber's onBeforeDeleteRecord hook is called vm.expectRevert(bytes("onBeforeDeleteRecord")); - IStore(this).deleteRecord(table, key, fieldLayout); + IStore(this).deleteRecord(tableId, key, fieldLayout); // Unregister the RevertSubscriber - IStore(this).unregisterStoreHook(table, revertSubscriber); + IStore(this).unregisterStoreHook(tableId, revertSubscriber); // Expect a HookCalled event to be emitted when the EchoSubscriber's onBeforeSetRecord hook is called vm.expectEmit(true, true, true, true); - emit HookCalled(abi.encode(table, key, data, fieldLayout)); + emit HookCalled(abi.encode(tableId, key, data, fieldLayout)); // Expect a HookCalled event to be emitted when the EchoSubscriber's onAfterSetRecord hook is called vm.expectEmit(true, true, true, true); - emit HookCalled(abi.encode(table, key, data, fieldLayout)); + emit HookCalled(abi.encode(tableId, key, data, fieldLayout)); - IStore(this).setRecord(table, key, data, fieldLayout); + IStore(this).setRecord(tableId, key, data, fieldLayout); // Expect a HookCalled event to be emitted when the EchoSubscriber's onBeforeSetField hook is called vm.expectEmit(true, true, true, true); - emit HookCalled(abi.encode(table, key, uint8(0), data, fieldLayout)); + emit HookCalled(abi.encode(tableId, key, uint8(0), data, fieldLayout)); // Expect a HookCalled event to be emitted when the EchoSubscriber's onAfterSetField hook is called vm.expectEmit(true, true, true, true); - emit HookCalled(abi.encode(table, key, uint8(0), data, fieldLayout)); + emit HookCalled(abi.encode(tableId, key, uint8(0), data, fieldLayout)); - IStore(this).setField(table, key, 0, data, fieldLayout); + IStore(this).setField(tableId, key, 0, data, fieldLayout); // Expect a HookCalled event to be emitted when the EchoSubscriber's onBeforeDeleteRecord hook is called vm.expectEmit(true, true, true, true); - emit HookCalled(abi.encode(table, key, fieldLayout)); + emit HookCalled(abi.encode(tableId, key, fieldLayout)); // Expect a HookCalled event to be emitted when the EchoSubscriber's onAfterDeleteRecord hook is called vm.expectEmit(true, true, true, true); - emit HookCalled(abi.encode(table, key, fieldLayout)); + emit HookCalled(abi.encode(tableId, key, fieldLayout)); - IStore(this).deleteRecord(table, key, fieldLayout); + IStore(this).deleteRecord(tableId, key, fieldLayout); } function testHooksDynamicData() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some key"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 1); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128, SchemaType.UINT32_ARRAY); - IStore(this).registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); + IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); // Create subscriber MirrorSubscriber subscriber = new MirrorSubscriber( - table, + tableId, fieldLayout, defaultKeySchema, valueSchema, @@ -1031,7 +1043,7 @@ contract StoreCoreTest is Test, StoreMock { ); IStore(this).registerStoreHook( - table, + tableId, subscriber, StoreHookLib.encodeBitmap({ onBeforeSetRecord: true, @@ -1051,7 +1063,7 @@ contract StoreCoreTest is Test, StoreMock { bytes memory staticData = abi.encodePacked(bytes16(0x0102030405060708090a0b0c0d0e0f10)); bytes memory data = abi.encodePacked(staticData, dynamicData); - IStore(this).setRecord(table, key, data, fieldLayout); + IStore(this).setRecord(tableId, key, data, fieldLayout); // Get data from indexed table - the indexer should have mirrored the data there bytes memory indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); @@ -1063,13 +1075,13 @@ contract StoreCoreTest is Test, StoreMock { dynamicData = abi.encodePacked(encodedArrayDataLength.unwrap(), arrayDataBytes); data = abi.encodePacked(staticData, dynamicData); - IStore(this).setField(table, key, 1, arrayDataBytes, fieldLayout); + IStore(this).setField(tableId, key, 1, arrayDataBytes, fieldLayout); // Get data from indexed table - the indexer should have mirrored the data there indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); assertEq(keccak256(data), keccak256(indexedData)); - IStore(this).deleteRecord(table, key, fieldLayout); + IStore(this).deleteRecord(tableId, key, fieldLayout); // Get data from indexed table - the indexer should have mirrored the data there indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); diff --git a/packages/store/test/StoreCoreDynamic.t.sol b/packages/store/test/StoreCoreDynamic.t.sol index a29d56eaa5..c781320cf7 100644 --- a/packages/store/test/StoreCoreDynamic.t.sol +++ b/packages/store/test/StoreCoreDynamic.t.sol @@ -17,7 +17,7 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { Schema internal defaultKeySchema = SchemaEncodeHelper.encode(SchemaType.BYTES32); bytes32[] internal _key; - bytes32 internal _table = keccak256("some.table"); + bytes32 internal _tableId = keccak256("some.tableId"); bytes32 internal firstDataBytes; uint32[] internal secondData; @@ -27,13 +27,13 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { // Expose an external popFromField function for testing purposes of indexers (see testHooks) function popFromField( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, uint8 schemaIndex, uint256 byteLengthToPop, FieldLayout fieldLayout ) public override { - StoreCore.popFromField(table, key, schemaIndex, byteLengthToPop, fieldLayout); + StoreCore.popFromField(tableId, key, schemaIndex, byteLengthToPop, fieldLayout); } function setUp() public { @@ -44,7 +44,7 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { SchemaType.UINT32_ARRAY, SchemaType.UINT32_ARRAY ); - StoreCore.registerTable(_table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); + StoreCore.registerTable(_tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); // Create key _key = new bytes32[](1); @@ -73,14 +73,14 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { thirdDataBytes = EncodeArray.encode(thirdData); // Set fields - StoreCore.setField(_table, _key, 0, abi.encodePacked(firstDataBytes), fieldLayout); - StoreCore.setField(_table, _key, 1, secondDataBytes, fieldLayout); + StoreCore.setField(_tableId, _key, 0, abi.encodePacked(firstDataBytes), fieldLayout); + StoreCore.setField(_tableId, _key, 1, secondDataBytes, fieldLayout); // Initialize a field with push - StoreCore.pushToField(_table, _key, 2, thirdDataBytes, fieldLayout); + StoreCore.pushToField(_tableId, _key, 2, thirdDataBytes, fieldLayout); } function testPopFromSecondField() public { - FieldLayout fieldLayout = StoreCore.getFieldLayout(_table); + FieldLayout fieldLayout = StoreCore.getFieldLayout(_tableId); bytes memory dataBytes = secondDataBytes; // Prepare expected data @@ -92,34 +92,34 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(_table, _key, 1, newDataBytes); + emit StoreSetField(_tableId, _key, 1, newDataBytes); // Pop from second field startGasReport("pop from field (cold, 1 slot, 1 uint32 item)"); - StoreCore.popFromField(_table, _key, 1, byteLengthToPop, fieldLayout); + StoreCore.popFromField(_tableId, _key, 1, byteLengthToPop, fieldLayout); endGasReport(); // Get second field - bytes memory loadedData = StoreCore.getField(_table, _key, 1, fieldLayout); + bytes memory loadedData = StoreCore.getField(_tableId, _key, 1, fieldLayout); // Verify loaded data is correct assertEq(loadedData, newDataBytes); // Reset the second field and pop again (but warm this time) - StoreCore.setField(_table, _key, 1, dataBytes, fieldLayout); + StoreCore.setField(_tableId, _key, 1, dataBytes, fieldLayout); startGasReport("pop from field (warm, 1 slot, 1 uint32 item)"); - StoreCore.popFromField(_table, _key, 1, byteLengthToPop, fieldLayout); + StoreCore.popFromField(_tableId, _key, 1, byteLengthToPop, fieldLayout); endGasReport(); // Get second field - loadedData = StoreCore.getField(_table, _key, 1, fieldLayout); + loadedData = StoreCore.getField(_tableId, _key, 1, fieldLayout); // Verify loaded data is correct assertEq(loadedData, newDataBytes); // Verify none of the other fields were impacted - assertEq(bytes32(StoreCore.getField(_table, _key, 0, fieldLayout)), firstDataBytes); - assertEq(StoreCore.getField(_table, _key, 2, fieldLayout), thirdDataBytes); + assertEq(bytes32(StoreCore.getField(_tableId, _key, 0, fieldLayout)), firstDataBytes); + assertEq(StoreCore.getField(_tableId, _key, 2, fieldLayout), thirdDataBytes); } function testPopFromThirdField() public { - FieldLayout fieldLayout = StoreCore.getFieldLayout(_table); + FieldLayout fieldLayout = StoreCore.getFieldLayout(_tableId); bytes memory dataBytes = thirdDataBytes; // Prepare expected data @@ -131,74 +131,74 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { // Expect a StoreSetField event to be emitted after pop vm.expectEmit(true, true, true, true); - emit StoreSetField(_table, _key, 2, dataBytes); + emit StoreSetField(_tableId, _key, 2, dataBytes); // Pop from the field startGasReport("pop from field (cold, 2 slots, 10 uint32 items)"); - StoreCore.popFromField(_table, _key, 2, byteLengthToPop, fieldLayout); + StoreCore.popFromField(_tableId, _key, 2, byteLengthToPop, fieldLayout); endGasReport(); // Load and verify the field - bytes memory loadedData = StoreCore.getField(_table, _key, 2, fieldLayout); + bytes memory loadedData = StoreCore.getField(_tableId, _key, 2, fieldLayout); assertEq(loadedData, newDataBytes); // Reset the field and pop again (but warm this time) - StoreCore.setField(_table, _key, 2, dataBytes, fieldLayout); + StoreCore.setField(_tableId, _key, 2, dataBytes, fieldLayout); startGasReport("pop from field (warm, 2 slots, 10 uint32 items)"); - StoreCore.popFromField(_table, _key, 2, byteLengthToPop, fieldLayout); + StoreCore.popFromField(_tableId, _key, 2, byteLengthToPop, fieldLayout); endGasReport(); // Load and verify the field - loadedData = StoreCore.getField(_table, _key, 2, fieldLayout); + loadedData = StoreCore.getField(_tableId, _key, 2, fieldLayout); assertEq(loadedData, newDataBytes); // Verify none of the other fields were impacted - assertEq(bytes32(StoreCore.getField(_table, _key, 0, fieldLayout)), firstDataBytes); - assertEq(StoreCore.getField(_table, _key, 1, fieldLayout), secondDataBytes); + assertEq(bytes32(StoreCore.getField(_tableId, _key, 0, fieldLayout)), firstDataBytes); + assertEq(StoreCore.getField(_tableId, _key, 1, fieldLayout), secondDataBytes); } function testGetSecondFieldLength() public { - FieldLayout fieldLayout = StoreCore.getFieldLayout(_table); + FieldLayout fieldLayout = StoreCore.getFieldLayout(_tableId); startGasReport("get field length (cold, 1 slot)"); - uint256 length = StoreCore.getFieldLength(_table, _key, 1, fieldLayout); + uint256 length = StoreCore.getFieldLength(_tableId, _key, 1, fieldLayout); endGasReport(); assertEq(length, secondDataBytes.length); startGasReport("get field length (warm, 1 slot)"); - length = StoreCore.getFieldLength(_table, _key, 1, fieldLayout); + length = StoreCore.getFieldLength(_tableId, _key, 1, fieldLayout); endGasReport(); assertEq(length, secondDataBytes.length); } function testGetThirdFieldLength() public { - FieldLayout fieldLayout = StoreCore.getFieldLayout(_table); + FieldLayout fieldLayout = StoreCore.getFieldLayout(_tableId); startGasReport("get field length (warm due to , 2 slots)"); - uint256 length = StoreCore.getFieldLength(_table, _key, 2, fieldLayout); + uint256 length = StoreCore.getFieldLength(_tableId, _key, 2, fieldLayout); endGasReport(); assertEq(length, thirdDataBytes.length); startGasReport("get field length (warm, 2 slots)"); - length = StoreCore.getFieldLength(_table, _key, 2, fieldLayout); + length = StoreCore.getFieldLength(_tableId, _key, 2, fieldLayout); endGasReport(); assertEq(length, thirdDataBytes.length); } function testGetFieldSlice() public { - FieldLayout fieldLayout = StoreCore.getFieldLayout(_table); + FieldLayout fieldLayout = StoreCore.getFieldLayout(_tableId); startGasReport("get field slice (cold, 1 slot)"); - bytes memory secondFieldSlice = StoreCore.getFieldSlice(_table, _key, 1, fieldLayout, 0, 4); + bytes memory secondFieldSlice = StoreCore.getFieldSlice(_tableId, _key, 1, fieldLayout, 0, 4); endGasReport(); assertEq(secondFieldSlice, SliceLib.getSubslice(secondDataBytes, 0, 4).toBytes()); startGasReport("get field slice (warm, 1 slot)"); - secondFieldSlice = StoreCore.getFieldSlice(_table, _key, 1, fieldLayout, 4, 8); + secondFieldSlice = StoreCore.getFieldSlice(_tableId, _key, 1, fieldLayout, 4, 8); endGasReport(); assertEq(secondFieldSlice, SliceLib.getSubslice(secondDataBytes, 4, 8).toBytes()); startGasReport("get field slice (semi-cold, 1 slot)"); - bytes memory thirdFieldSlice = StoreCore.getFieldSlice(_table, _key, 2, fieldLayout, 4, 32); + bytes memory thirdFieldSlice = StoreCore.getFieldSlice(_tableId, _key, 2, fieldLayout, 4, 32); endGasReport(); assertEq(thirdFieldSlice, SliceLib.getSubslice(thirdDataBytes, 4, 32).toBytes()); startGasReport("get field slice (warm, 2 slots)"); - thirdFieldSlice = StoreCore.getFieldSlice(_table, _key, 2, fieldLayout, 8, 40); + thirdFieldSlice = StoreCore.getFieldSlice(_tableId, _key, 2, fieldLayout, 8, 40); endGasReport(); assertEq(thirdFieldSlice, SliceLib.getSubslice(thirdDataBytes, 8, 40).toBytes()); } diff --git a/packages/store/test/StoreCoreGas.t.sol b/packages/store/test/StoreCoreGas.t.sol index d09dc15539..8a826be357 100644 --- a/packages/store/test/StoreCoreGas.t.sol +++ b/packages/store/test/StoreCoreGas.t.sol @@ -41,7 +41,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { SchemaType.UINT16 ); Schema keySchema = SchemaEncodeHelper.encode(SchemaType.UINT8, SchemaType.UINT16); - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); string[] memory keyNames = new string[](2); keyNames[0] = "key1"; @@ -53,19 +53,19 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { fieldNames[3] = "value4"; startGasReport("StoreCore: register table"); - StoreCore.registerTable(table, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); + StoreCore.registerTable(tableId, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); endGasReport(); startGasReport("StoreCore: get field layout (warm)"); - StoreCore.getFieldLayout(table); + StoreCore.getFieldLayout(tableId); endGasReport(); startGasReport("StoreCore: get value schema (warm)"); - StoreCore.getValueSchema(table); + StoreCore.getValueSchema(tableId); endGasReport(); startGasReport("StoreCore: get key schema (warm)"); - StoreCore.getKeySchema(table); + StoreCore.getKeySchema(tableId); endGasReport(); } @@ -77,21 +77,21 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { SchemaType.UINT16 ); FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(1, 2, 1, 2, 0); - bytes32 table = keccak256("some.table"); - bytes32 table2 = keccak256("other.table"); - StoreCore.registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](4)); + bytes32 tableId = keccak256("some.tableId"); + bytes32 tableId2 = keccak256("other.tableId"); + StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](4)); startGasReport("Check for existence of table (existent)"); - StoreCore.hasTable(table); + StoreCore.hasTable(tableId); endGasReport(); startGasReport("check for existence of table (non-existent)"); - StoreCore.hasTable(table2); + StoreCore.hasTable(tableId2); endGasReport(); } function testSetAndGetDynamicDataLength() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT8, @@ -104,7 +104,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(1, 2, 4, 2); // Register table - StoreCore.registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](5)); + StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](5)); // Create some key bytes32[] memory key = new bytes32[](1); @@ -112,17 +112,17 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Set dynamic data length of dynamic index 0 startGasReport("set dynamic length of dynamic index 0"); - StoreCoreInternal._setDynamicDataLengthAtIndex(table, key, 0, 10); + StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, key, 0, 10); endGasReport(); // Set dynamic data length of dynamic index 1 startGasReport("set dynamic length of dynamic index 1"); - StoreCoreInternal._setDynamicDataLengthAtIndex(table, key, 1, 99); + StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, key, 1, 99); endGasReport(); // Reduce dynamic data length of dynamic index 0 again startGasReport("reduce dynamic length of dynamic index 0"); - StoreCoreInternal._setDynamicDataLengthAtIndex(table, key, 0, 5); + StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, key, 0, 5); endGasReport(); } @@ -135,8 +135,8 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { SchemaType.UINT16 ); FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(1, 2, 1, 2, 0); - bytes32 table = keccak256("some.table"); - StoreCore.registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](4)); + bytes32 tableId = keccak256("some.tableId"); + StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](4)); // Set data bytes memory data = abi.encodePacked(bytes1(0x01), bytes2(0x0203), bytes1(0x04), bytes2(0x0506)); @@ -144,12 +144,12 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { key[0] = keccak256("some.key"); startGasReport("set static record (1 slot)"); - StoreCore.setRecord(table, key, data, fieldLayout); + StoreCore.setRecord(tableId, key, data, fieldLayout); endGasReport(); // Get data startGasReport("get static record (1 slot)"); - StoreCore.getRecord(table, key, fieldLayout); + StoreCore.getRecord(tableId, key, fieldLayout); endGasReport(); } @@ -157,8 +157,8 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Register table Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128, SchemaType.UINT256); FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 32, 0); - bytes32 table = keccak256("some.table"); - StoreCore.registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); + bytes32 tableId = keccak256("some.tableId"); + StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); // Set data bytes memory data = abi.encodePacked( @@ -170,17 +170,17 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { key[0] = keccak256("some.key"); startGasReport("set static record (2 slots)"); - StoreCore.setRecord(table, key, data, fieldLayout); + StoreCore.setRecord(tableId, key, data, fieldLayout); endGasReport(); // Get data startGasReport("get static record (2 slots)"); - StoreCore.getRecord(table, key, fieldLayout); + StoreCore.getRecord(tableId, key, fieldLayout); endGasReport(); } function testSetAndGetDynamicData() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); @@ -189,7 +189,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { SchemaType.UINT32_ARRAY, SchemaType.UINT32_ARRAY ); - StoreCore.registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); + StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); bytes16 firstDataBytes = bytes16(0x0102030405060708090a0b0c0d0e0f10); @@ -229,12 +229,12 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Set data startGasReport("set complex record with dynamic data (4 slots)"); - StoreCore.setRecord(table, key, data, fieldLayout); + StoreCore.setRecord(tableId, key, data, fieldLayout); endGasReport(); // Get data startGasReport("get complex record with dynamic data (4 slots)"); - StoreCore.getRecord(table, key, fieldLayout); + StoreCore.getRecord(tableId, key, fieldLayout); endGasReport(); // Compare gas - setting the data as raw struct @@ -256,7 +256,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { } function testSetAndGetField() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 32, 2); @@ -266,7 +266,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { SchemaType.UINT32_ARRAY, SchemaType.UINT32_ARRAY ); - StoreCore.registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](4)); + StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](4)); bytes16 firstDataBytes = bytes16(0x0102030405060708090a0b0c0d0e0f10); @@ -278,7 +278,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Set first field startGasReport("set static field (1 slot)"); - StoreCore.setField(table, key, 0, firstDataPacked, fieldLayout); + StoreCore.setField(tableId, key, 0, firstDataPacked, fieldLayout); endGasReport(); //////////////// @@ -287,7 +287,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Get first field startGasReport("get static field (1 slot)"); - StoreCore.getField(table, key, 0, fieldLayout); + StoreCore.getField(tableId, key, 0, fieldLayout); endGasReport(); // Set second field @@ -295,12 +295,12 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes memory secondDataPacked = abi.encodePacked(secondDataBytes); startGasReport("set static field (overlap 2 slot)"); - StoreCore.setField(table, key, 1, secondDataPacked, fieldLayout); + StoreCore.setField(tableId, key, 1, secondDataPacked, fieldLayout); endGasReport(); // Get second field startGasReport("get static field (overlap 2 slot)"); - StoreCore.getField(table, key, 1, fieldLayout); + StoreCore.getField(tableId, key, 1, fieldLayout); endGasReport(); //////////////// @@ -326,27 +326,27 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Set third field startGasReport("set dynamic field (1 slot, first dynamic field)"); - StoreCore.setField(table, key, 2, thirdDataBytes, fieldLayout); + StoreCore.setField(tableId, key, 2, thirdDataBytes, fieldLayout); endGasReport(); // Get third field startGasReport("get dynamic field (1 slot, first dynamic field)"); - StoreCore.getField(table, key, 2, fieldLayout); + StoreCore.getField(tableId, key, 2, fieldLayout); endGasReport(); // Set fourth field startGasReport("set dynamic field (1 slot, second dynamic field)"); - StoreCore.setField(table, key, 3, fourthDataBytes, fieldLayout); + StoreCore.setField(tableId, key, 3, fourthDataBytes, fieldLayout); endGasReport(); // Get fourth field startGasReport("get dynamic field (1 slot, second dynamic field)"); - StoreCore.getField(table, key, 3, fieldLayout); + StoreCore.getField(tableId, key, 3, fieldLayout); endGasReport(); } function testDeleteData() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); @@ -355,7 +355,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { SchemaType.UINT32_ARRAY, SchemaType.UINT32_ARRAY ); - StoreCore.registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); + StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); bytes16 firstDataBytes = bytes16(0x0102030405060708090a0b0c0d0e0f10); @@ -394,16 +394,16 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { key[0] = bytes32("some.key"); // Set data - StoreCore.setRecord(table, key, data, fieldLayout); + StoreCore.setRecord(tableId, key, data, fieldLayout); // Delete data startGasReport("delete record (complex data, 3 slots)"); - StoreCore.deleteRecord(table, key, fieldLayout); + StoreCore.deleteRecord(tableId, key, fieldLayout); endGasReport(); } function testPushToField() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); @@ -412,7 +412,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { SchemaType.UINT32_ARRAY, SchemaType.UINT32_ARRAY ); - StoreCore.registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); + StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); // Create key bytes32[] memory key = new bytes32[](1); @@ -437,10 +437,10 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { } // Set fields - StoreCore.setField(table, key, 0, abi.encodePacked(firstDataBytes), fieldLayout); - StoreCore.setField(table, key, 1, secondDataBytes, fieldLayout); + StoreCore.setField(tableId, key, 0, abi.encodePacked(firstDataBytes), fieldLayout); + StoreCore.setField(tableId, key, 1, secondDataBytes, fieldLayout); // Initialize a field with push - StoreCore.pushToField(table, key, 2, thirdDataBytes, fieldLayout); + StoreCore.pushToField(tableId, key, 2, thirdDataBytes, fieldLayout); // Create data to push bytes memory secondDataToPush; @@ -452,7 +452,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Push to second field startGasReport("push to field (1 slot, 1 uint32 item)"); - StoreCore.pushToField(table, key, 1, secondDataToPush, fieldLayout); + StoreCore.pushToField(tableId, key, 1, secondDataToPush, fieldLayout); endGasReport(); // Create data to push @@ -474,7 +474,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Push to third field startGasReport("push to field (2 slots, 10 uint32 items)"); - StoreCore.pushToField(table, key, 2, thirdDataToPush, fieldLayout); + StoreCore.pushToField(tableId, key, 2, thirdDataToPush, fieldLayout); endGasReport(); } @@ -490,7 +490,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { function testUpdateInField() public { TestUpdateInFieldData memory data = TestUpdateInFieldData("", "", "", "", "", "", ""); - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); @@ -499,7 +499,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { SchemaType.UINT32_ARRAY, SchemaType.UINT64_ARRAY ); - StoreCore.registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); + StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); // Create key bytes32[] memory key = new bytes32[](1); @@ -522,9 +522,9 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { data.thirdDataBytes = EncodeArray.encode(thirdData); // Set fields - StoreCore.setField(table, key, 0, abi.encodePacked(data.firstDataBytes), fieldLayout); - StoreCore.setField(table, key, 1, data.secondDataBytes, fieldLayout); - StoreCore.setField(table, key, 2, data.thirdDataBytes, fieldLayout); + StoreCore.setField(tableId, key, 0, abi.encodePacked(data.firstDataBytes), fieldLayout); + StoreCore.setField(tableId, key, 1, data.secondDataBytes, fieldLayout); + StoreCore.setField(tableId, key, 2, data.thirdDataBytes, fieldLayout); // Create data to use for the update { @@ -537,7 +537,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Update index 1 in second field (4 = byte length of uint32) startGasReport("update in field (1 slot, 1 uint32 item)"); - StoreCore.updateInField(table, key, 1, 4 * 1, data.secondDataForUpdate, fieldLayout); + StoreCore.updateInField(tableId, key, 1, 4 * 1, data.secondDataForUpdate, fieldLayout); endGasReport(); // Create data for update @@ -561,55 +561,55 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Update indexes 1,2,3,4 in third field (8 = byte length of uint64) startGasReport("push to field (2 slots, 6 uint64 items)"); - StoreCore.updateInField(table, key, 2, 8 * 1, data.thirdDataForUpdate, fieldLayout); + StoreCore.updateInField(tableId, key, 2, 8 * 1, data.thirdDataForUpdate, fieldLayout); endGasReport(); } function testAccessEmptyData() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(4, 1); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT32, SchemaType.UINT32_ARRAY); - StoreCore.registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); + StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); // Create key bytes32[] memory key = new bytes32[](1); key[0] = bytes32("some.key"); startGasReport("access non-existing record"); - StoreCore.getRecord(table, key, fieldLayout); + StoreCore.getRecord(tableId, key, fieldLayout); endGasReport(); startGasReport("access static field of non-existing record"); - StoreCore.getField(table, key, 0, fieldLayout); + StoreCore.getField(tableId, key, 0, fieldLayout); endGasReport(); startGasReport("access dynamic field of non-existing record"); - StoreCore.getField(table, key, 1, fieldLayout); + StoreCore.getField(tableId, key, 1, fieldLayout); endGasReport(); startGasReport("access length of dynamic field of non-existing record"); - StoreCore.getFieldLength(table, key, 1, fieldLayout); + StoreCore.getFieldLength(tableId, key, 1, fieldLayout); endGasReport(); startGasReport("access slice of dynamic field of non-existing record"); - StoreCore.getFieldSlice(table, key, 1, fieldLayout, 0, 0); + StoreCore.getFieldSlice(tableId, key, 1, fieldLayout, 0, 0); endGasReport(); } function testHooks() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some key"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 0); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128); - StoreCore.registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](1)); + StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](1)); // Create subscriber MirrorSubscriber subscriber = new MirrorSubscriber( - table, + tableId, fieldLayout, defaultKeySchema, valueSchema, @@ -619,7 +619,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { startGasReport("register subscriber"); StoreCore.registerStoreHook( - table, + tableId, subscriber, StoreHookLib.encodeBitmap({ onBeforeSetRecord: true, @@ -635,33 +635,33 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes memory data = abi.encodePacked(bytes16(0x0102030405060708090a0b0c0d0e0f10)); startGasReport("set record on table with subscriber"); - StoreCore.setRecord(table, key, data, fieldLayout); + StoreCore.setRecord(tableId, key, data, fieldLayout); endGasReport(); data = abi.encodePacked(bytes16(0x1112131415161718191a1b1c1d1e1f20)); startGasReport("set static field on table with subscriber"); - StoreCore.setField(table, key, 0, data, fieldLayout); + StoreCore.setField(tableId, key, 0, data, fieldLayout); endGasReport(); startGasReport("delete record on table with subscriber"); - StoreCore.deleteRecord(table, key, fieldLayout); + StoreCore.deleteRecord(tableId, key, fieldLayout); endGasReport(); } function testHooksDynamicData() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some key"); // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 1); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128, SchemaType.UINT32_ARRAY); - StoreCore.registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); + StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); // Create subscriber MirrorSubscriber subscriber = new MirrorSubscriber( - table, + tableId, fieldLayout, defaultKeySchema, valueSchema, @@ -671,7 +671,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { startGasReport("register subscriber"); StoreCore.registerStoreHook( - table, + tableId, subscriber, StoreHookLib.encodeBitmap({ onBeforeSetRecord: true, @@ -693,7 +693,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes memory data = abi.encodePacked(staticData, dynamicData); startGasReport("set (dynamic) record on table with subscriber"); - StoreCore.setRecord(table, key, data, fieldLayout); + StoreCore.setRecord(tableId, key, data, fieldLayout); endGasReport(); // Update dynamic data @@ -703,11 +703,11 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { data = abi.encodePacked(staticData, dynamicData); startGasReport("set (dynamic) field on table with subscriber"); - StoreCore.setField(table, key, 1, arrayDataBytes, fieldLayout); + StoreCore.setField(tableId, key, 1, arrayDataBytes, fieldLayout); endGasReport(); startGasReport("delete (dynamic) record on table with subscriber"); - StoreCore.deleteRecord(table, key, fieldLayout); + StoreCore.deleteRecord(tableId, key, fieldLayout); endGasReport(); } } diff --git a/packages/store/test/StoreMock.sol b/packages/store/test/StoreMock.sol index 8338942a8a..7f41e95ba7 100644 --- a/packages/store/test/StoreMock.sol +++ b/packages/store/test/StoreMock.sol @@ -18,92 +18,92 @@ contract StoreMock is IStore, StoreRead { // Set full record (including full dynamic data) function setRecord( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, bytes calldata data, FieldLayout fieldLayout ) public virtual { - StoreCore.setRecord(table, key, data, fieldLayout); + StoreCore.setRecord(tableId, key, data, fieldLayout); } // Set partial data at schema index function setField( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, uint8 schemaIndex, bytes calldata data, FieldLayout fieldLayout ) public virtual { - StoreCore.setField(table, key, schemaIndex, data, fieldLayout); + StoreCore.setField(tableId, key, schemaIndex, data, fieldLayout); } // Push encoded items to the dynamic field at schema index function pushToField( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, uint8 schemaIndex, bytes calldata dataToPush, FieldLayout fieldLayout ) public virtual { - StoreCore.pushToField(table, key, schemaIndex, dataToPush, fieldLayout); + StoreCore.pushToField(tableId, key, schemaIndex, dataToPush, fieldLayout); } // Pop byte length from the dynamic field at schema index function popFromField( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, uint8 schemaIndex, uint256 byteLengthToPop, FieldLayout fieldLayout ) public virtual { - StoreCore.popFromField(table, key, schemaIndex, byteLengthToPop, fieldLayout); + StoreCore.popFromField(tableId, key, schemaIndex, byteLengthToPop, fieldLayout); } // Change encoded items within the dynamic field at schema index function updateInField( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, uint8 schemaIndex, uint256 startByteIndex, bytes calldata dataToSet, FieldLayout fieldLayout ) public virtual { - StoreCore.updateInField(table, key, schemaIndex, startByteIndex, dataToSet, fieldLayout); + StoreCore.updateInField(tableId, key, schemaIndex, startByteIndex, dataToSet, fieldLayout); } // Set full record (including full dynamic data) - function deleteRecord(bytes32 table, bytes32[] memory key, FieldLayout fieldLayout) public virtual { - StoreCore.deleteRecord(table, key, fieldLayout); + function deleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) public virtual { + StoreCore.deleteRecord(tableId, key, fieldLayout); } // Emit the ephemeral event without modifying storage function emitEphemeralRecord( - bytes32 table, + bytes32 tableId, bytes32[] calldata key, bytes calldata data, FieldLayout fieldLayout ) public virtual { - StoreCore.emitEphemeralRecord(table, key, data, fieldLayout); + StoreCore.emitEphemeralRecord(tableId, key, data, fieldLayout); } function registerTable( - bytes32 table, + bytes32 tableId, FieldLayout fieldLayout, Schema keySchema, Schema valueSchema, string[] calldata keyNames, string[] calldata fieldNames ) public virtual { - StoreCore.registerTable(table, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); + StoreCore.registerTable(tableId, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); } // Register hook to be called when a record or field is set or deleted - function registerStoreHook(bytes32 table, IStoreHook hookAddress, uint8 enabledHooksBitmap) public virtual { - StoreCore.registerStoreHook(table, hookAddress, enabledHooksBitmap); + function registerStoreHook(bytes32 tableId, IStoreHook hookAddress, uint8 enabledHooksBitmap) public virtual { + StoreCore.registerStoreHook(tableId, hookAddress, enabledHooksBitmap); } // Unregister hook to be called when a record or field is set or deleted - function unregisterStoreHook(bytes32 table, IStoreHook hookAddress) public virtual { - StoreCore.unregisterStoreHook(table, hookAddress); + function unregisterStoreHook(bytes32 tableId, IStoreHook hookAddress) public virtual { + StoreCore.unregisterStoreHook(tableId, hookAddress); } } diff --git a/packages/store/ts/storeEvents.ts b/packages/store/ts/storeEvents.ts index f65d884db5..c2cb00a604 100644 --- a/packages/store/ts/storeEvents.ts +++ b/packages/store/ts/storeEvents.ts @@ -1,6 +1,6 @@ export const storeEvents = [ - "event StoreDeleteRecord(bytes32 table, bytes32[] key)", - "event StoreSetField(bytes32 table, bytes32[] key, uint8 schemaIndex, bytes data)", - "event StoreSetRecord(bytes32 table, bytes32[] key, bytes data)", - "event StoreEphemeralRecord(bytes32 table, bytes32[] key, bytes data)", + "event StoreDeleteRecord(bytes32 tableId, bytes32[] key)", + "event StoreSetField(bytes32 tableId, bytes32[] key, uint8 schemaIndex, bytes data)", + "event StoreSetRecord(bytes32 tableId, bytes32[] key, bytes data)", + "event StoreEphemeralRecord(bytes32 tableId, bytes32[] key, bytes data)", ] as const; diff --git a/packages/world/src/modules/keysintable/KeysInTableHook.sol b/packages/world/src/modules/keysintable/KeysInTableHook.sol index 2e9a449324..706ebac740 100644 --- a/packages/world/src/modules/keysintable/KeysInTableHook.sol +++ b/packages/world/src/modules/keysintable/KeysInTableHook.sol @@ -40,20 +40,20 @@ contract KeysInTableHook is StoreHook { } } - function onBeforeSetRecord(bytes32 table, bytes32[] memory key, bytes memory, FieldLayout) public { - handleSet(table, key); + function onBeforeSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory, FieldLayout) public { + handleSet(tableId, key); } - function onAfterSetRecord(bytes32 table, bytes32[] memory key, bytes memory, FieldLayout) public { + function onAfterSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory, FieldLayout) public { // NOOP } - function onBeforeSetField(bytes32 table, bytes32[] memory key, uint8, bytes memory, FieldLayout) public { + function onBeforeSetField(bytes32 tableId, bytes32[] memory key, uint8, bytes memory, FieldLayout) public { // NOOP } - function onAfterSetField(bytes32 table, bytes32[] memory key, uint8, bytes memory, FieldLayout) public { - handleSet(table, key); + function onAfterSetField(bytes32 tableId, bytes32[] memory key, uint8, bytes memory, FieldLayout) public { + handleSet(tableId, key); } function onBeforeDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout) public { @@ -77,7 +77,6 @@ contract KeysInTableHook is StoreHook { bytes32 lastKey = KeysInTable.getItemKeys0(tableId, length - 1); lastKeyTuple[0] = lastKey; - // Remove the key from the list of keys in this table KeysInTable.updateKeys0(tableId, index, lastKey); KeysInTable.popKeys0(tableId); @@ -85,7 +84,6 @@ contract KeysInTableHook is StoreHook { lastKey = KeysInTable.getItemKeys1(tableId, length - 1); lastKeyTuple[1] = lastKey; - // Remove the key from the list of keys in this table KeysInTable.updateKeys1(tableId, index, lastKey); KeysInTable.popKeys1(tableId); @@ -93,7 +91,6 @@ contract KeysInTableHook is StoreHook { lastKey = KeysInTable.getItemKeys2(tableId, length - 1); lastKeyTuple[2] = lastKey; - // Swap and pop the key from the list of keys in this table KeysInTable.updateKeys2(tableId, index, lastKey); KeysInTable.popKeys2(tableId); @@ -101,7 +98,6 @@ contract KeysInTableHook is StoreHook { lastKey = KeysInTable.getItemKeys3(tableId, length - 1); lastKeyTuple[3] = lastKey; - // Remove the key from the list of keys in this table KeysInTable.updateKeys3(tableId, index, lastKey); KeysInTable.popKeys3(tableId); @@ -109,7 +105,6 @@ contract KeysInTableHook is StoreHook { lastKey = KeysInTable.getItemKeys4(tableId, length - 1); lastKeyTuple[4] = lastKey; - // Remove the key from the list of keys in this table KeysInTable.updateKeys4(tableId, index, lastKey); KeysInTable.popKeys4(tableId); } @@ -125,7 +120,7 @@ contract KeysInTableHook is StoreHook { } } - function onAfterDeleteRecord(bytes32 table, bytes32[] memory key, FieldLayout fieldLayout) public { + function onAfterDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) public { // NOOP } } diff --git a/packages/world/test/World.t.sol b/packages/world/test/World.t.sol index 640782c591..f130c04ebe 100644 --- a/packages/world/test/World.t.sol +++ b/packages/world/test/World.t.sol @@ -559,17 +559,7 @@ contract WorldTest is Test, GasReporter { // Expect the data to be written assertTrue(Bool.get(world, tableId)); - // Write data to the table via its tableId - world.setField(tableId, singletonKey, 0, abi.encodePacked(false), fieldLayout); - - // Expect the data to be written - assertFalse(Bool.get(world, tableId)); - - // Expect an error when trying to write from an address that doesn't have access when calling via the namespace - _expectAccessDenied(address(0x01), "testSetField", "testTable"); - world.setField(tableId, singletonKey, 0, abi.encodePacked(true), fieldLayout); - - // Expect an error when trying to write from an address that doesn't have access when calling via the tableId + // Expect an error when trying to write from an address that doesn't have access _expectAccessDenied(address(0x01), "testSetField", "testTable"); world.setField(tableId, singletonKey, 0, abi.encodePacked(true), fieldLayout); @@ -630,7 +620,7 @@ contract WorldTest is Test, GasReporter { // Register a new table world.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](1)); - // Write data to the table via the namespace and expect it to be written + // Write data to the table and expect it to be written world.setRecord(tableId, singletonKey, abi.encodePacked(true), fieldLayout); assertTrue(Bool.get(world, tableId)); @@ -641,15 +631,7 @@ contract WorldTest is Test, GasReporter { // expect it to be deleted assertFalse(Bool.get(world, tableId)); - // Write data to the table via the namespace and expect it to be written - world.setRecord(tableId, singletonKey, abi.encodePacked(true), fieldLayout); - assertTrue(Bool.get(world, tableId)); - - // Delete the record via the tableId and expect it to be deleted - world.deleteRecord(tableId, singletonKey, fieldLayout); - assertFalse(Bool.get(world, tableId)); - - // Write data to the table via the namespace and expect it to be written + // Write data to the table and expect it to be written world.setRecord(tableId, singletonKey, abi.encodePacked(true), fieldLayout); assertTrue(Bool.get(world, tableId)); diff --git a/packages/world/test/WorldDynamicUpdate.t.sol b/packages/world/test/WorldDynamicUpdate.t.sol index fe84fdbc75..e2bea13264 100644 --- a/packages/world/test/WorldDynamicUpdate.t.sol +++ b/packages/world/test/WorldDynamicUpdate.t.sol @@ -128,11 +128,7 @@ contract UpdateInFieldTest is Test, GasReporter { assertEq(loadedData[i], initData[i]); } - // Expect an error when trying to write from an address that doesn't have access (via namespace/name) - _expectAccessDenied(address(0x01), tableId); - world.popFromField(tableId, keyTuple, 0, 20, fieldLayout); - - // Expect an error when trying to write from an address that doesn't have access (via tableId) + // Expect an error when trying to write from an address that doesn't have access _expectAccessDenied(address(0x01), tableId); world.popFromField(tableId, keyTuple, 0, 20, fieldLayout); @@ -170,11 +166,7 @@ contract UpdateInFieldTest is Test, GasReporter { initData[1] = dataForUpdate[0]; assertEq(AddressArray.get(world, tableId, key), initData); - // Expect an error when trying to write from an address that doesn't have access (via namespace/name) - _expectAccessDenied(address(0x01), tableId); - world.updateInField(tableId, keyTuple, 0, 0, EncodeArray.encode(dataForUpdate), fieldLayout); - - // Expect an error when trying to write from an address that doesn't have access (via tableId) + // Expect an error when trying to write from an address that doesn't have access _expectAccessDenied(address(0x01), tableId); world.updateInField(tableId, keyTuple, 0, 0, EncodeArray.encode(dataForUpdate), fieldLayout); diff --git a/test-data/world-logs.json b/test-data/world-logs.json index 97dea80c14..1f79d89f7e 100644 --- a/test-data/world-logs.json +++ b/test-data/world-logs.json @@ -5,9 +5,9 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000016d756473746f726500000000000000005461626c65730000000000000000000000000000000000000000000000000000000000000000000000000000000003400060030220202000000000000000000000000000000000000000000000000000002001005f000000000000000000000000000000000000000000000000000000006003025f5f5fc4c40000000000000000000000000000000000000000000000000000000000000000000000000000000000022000000000a0000000000002c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000077461626c654964000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000b6669656c644c61796f757400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000096b6579536368656d610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b76616c7565536368656d610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012616269456e636f6465644b65794e616d657300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014616269456e636f6465644669656c644e616d6573000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xd84cbdaf74c599ed411fd63e23c3d4aedd492d53efe8347769008829bab2f507", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x0", "transactionLogIndex": "0x0", @@ -19,9 +19,9 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000016d756473746f7265000000000000000053746f7265486f6f6b7300000000000000000000000000000000000000000000000000000000000000000000000001c00000000100000000000000000000000000000000000000000000000000000000002001005f00000000000000000000000000000000000000000000000000000000000001b600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b65790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xd84cbdaf74c599ed411fd63e23c3d4aedd492d53efe8347769008829bab2f507", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x1", "transactionLogIndex": "0x1", @@ -33,9 +33,9 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e616d6573706163654f776e6572000000000000000000000000000000000000000000000000000000000000000001c00014010014000000000000000000000000000000000000000000000000000000001001004f000000000000000000000000000000000000000000000000000000001401006100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000096e616d657370616365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000056f776e6572000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xd84cbdaf74c599ed411fd63e23c3d4aedd492d53efe8347769008829bab2f507", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x2", "transactionLogIndex": "0x2", @@ -44,12 +44,12 @@ { "address": "0x5fbdb2315678afecb367f032d93f642f64180aa3", "topics": [ - "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" + "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x000000000000000000000000000000004e616d6573706163654f776e657200000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014f39fd6e51aad88f6f4ce6ab8827279cfffb92266000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xd84cbdaf74c599ed411fd63e23c3d4aedd492d53efe8347769008829bab2f507", + "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000042616c616e636573000000000000000000000000000000000000000000000000000000000000000000000000000001c00020010020000000000000000000000000000000000000000000000000000000001001004f000000000000000000000000000000000000000000000000000000002001001f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000096e616d6573706163650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000762616c616e636500000000000000000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x3", "transactionLogIndex": "0x3", @@ -60,13 +60,13 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000042616c616e636573000000000000000000000000000000000000000000000000000000000000000000000000000001c00020010020000000000000000000000000000000000000000000000000000000001001004f000000000000000000000000000000000000000000000000000000002001001f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000096e616d6573706163650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000762616c616e636500000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", - "logIndex": "0x5", - "transactionLogIndex": "0x0", + "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000496e7374616c6c65644d6f64756c657300000000000000000000000000000000000000000000000000000000000002200014010014000000000000000000000000000000000000000000000000000000003002004f5f0000000000000000000000000000000000000000000000000000001401006100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000100000000000001a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000a6d6f64756c654e616d6500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d617267756d656e74734861736800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000d6d6f64756c654164647265737300000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", + "logIndex": "0x4", + "transactionLogIndex": "0x4", "removed": false }, { @@ -74,13 +74,13 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000496e7374616c6c65644d6f64756c657300000000000000000000000000000000000000000000000000000000000002200014010014000000000000000000000000000000000000000000000000000000003002004f5f0000000000000000000000000000000000000000000000000000001401006100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000100000000000001a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000a6d6f64756c654e616d6500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d617267756d656e74734861736800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000d6d6f64756c654164647265737300000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", - "logIndex": "0x6", - "transactionLogIndex": "0x1", + "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000044656c65676174696f6e730000000000000000000000000000000000000000000000000000000000000000000000022000200100200000000000000000000000000000000000000000000000000000000028020061610000000000000000000000000000000000000000000000000000002001005f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000100000000000001a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000964656c656761746f720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000964656c6567617465650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001364656c65676174696f6e436f6e74726f6c496400000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", + "logIndex": "0x5", + "transactionLogIndex": "0x5", "removed": false }, { @@ -89,12 +89,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000005265736f75726365416363657373000000000000000000000000000000000000000000000000000000000000000002200001010001000000000000000000000000000000000000000000000000000000003402005f610000000000000000000000000000000000000000000000000000000101006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000100000000000001a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000663616c6c6572000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000066163636573730000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", - "logIndex": "0x7", - "transactionLogIndex": "0x2", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", + "logIndex": "0x6", + "transactionLogIndex": "0x6", "removed": false }, { @@ -103,12 +103,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000053797374656d7300000000000000000000000000000000000000000000000000000000000000000000000000000002200015020014010000000000000000000000000000000000000000000000000000002001005f0000000000000000000000000000000000000000000000000000000015020061600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000a0000000000001a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f72000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000673797374656d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c7075626c69634163636573730000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", - "logIndex": "0x8", - "transactionLogIndex": "0x3", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", + "logIndex": "0x7", + "transactionLogIndex": "0x7", "removed": false }, { @@ -117,12 +117,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000022000240200200400000000000000000000000000000000000000000000000000000004010043000000000000000000000000000000000000000000000000000000002402005f430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000a0000000000001a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001066756e6374696f6e53656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001673797374656d46756e6374696f6e53656c6563746f7200000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", - "logIndex": "0x9", - "transactionLogIndex": "0x4", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", + "logIndex": "0x8", + "transactionLogIndex": "0x8", "removed": false }, { @@ -131,12 +131,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000053797374656d486f6f6b73000000000000000000000000000000000000000000000000000000000000000000000001c00000000100000000000000000000000000000000000000000000000000000000002001005f00000000000000000000000000000000000000000000000000000000000001b600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", - "logIndex": "0xa", - "transactionLogIndex": "0x5", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", + "logIndex": "0x9", + "transactionLogIndex": "0x9", "removed": false }, { @@ -145,12 +145,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000053797374656d5265676973747279000000000000000000000000000000000000000000000000000000000000000001c000200100200000000000000000000000000000000000000000000000000000000014010061000000000000000000000000000000000000000000000000000000002001005f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a000000000000140000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000673797374656d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", - "logIndex": "0xb", - "transactionLogIndex": "0x6", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", + "logIndex": "0xa", + "transactionLogIndex": "0xa", "removed": false }, { @@ -159,12 +159,26 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000005265736f75726365547970650000000000000000000000000000000000000000000000000000000000000000000001c00001010001000000000000000000000000000000000000000000000000000000002001005f000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000c7265736f75726365547970650000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", + "logIndex": "0xb", + "transactionLogIndex": "0xb", + "removed": false + }, + { + "address": "0x5fbdb2315678afecb367f032d93f642f64180aa3", + "topics": [ + "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" + ], + "data": "0x000000000000000000000000000000004e616d6573706163654f776e657200000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014f39fd6e51aad88f6f4ce6ab8827279cfffb92266000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0xc", - "transactionLogIndex": "0x7", + "transactionLogIndex": "0xc", "removed": false }, { @@ -173,12 +187,12 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb9226600000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0xd", - "transactionLogIndex": "0x8", + "transactionLogIndex": "0xd", "removed": false }, { @@ -187,12 +201,12 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0xe", - "transactionLogIndex": "0x9", + "transactionLogIndex": "0xe", "removed": false }, { @@ -201,12 +215,12 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000636f72652e730000000000000000000000000000000000000000000000000000000000000000000000000000000000010300000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0xf", - "transactionLogIndex": "0xa", + "transactionLogIndex": "0xf", "removed": false }, { @@ -215,12 +229,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000053797374656d73000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000636f72652e73000000000000000000000000000000000000000000000000000000000000000000000000000000000015cafac3dd18ac6c6e92c921884f9e4176737c052c010000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x10", - "transactionLogIndex": "0xb", + "transactionLogIndex": "0x10", "removed": false }, { @@ -229,12 +243,12 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x0000000000000000000000000000000053797374656d526567697374727900000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000cafac3dd18ac6c6e92c921884f9e4176737c052c000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000636f72652e7300000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x11", - "transactionLogIndex": "0xc", + "transactionLogIndex": "0x11", "removed": false }, { @@ -243,12 +257,12 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cafac3dd18ac6c6e92c921884f9e4176737c052c00000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x12", - "transactionLogIndex": "0xd", + "transactionLogIndex": "0x12", "removed": false }, { @@ -257,12 +271,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000140554c3a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e730000000000000000000040554c3a00000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x13", - "transactionLogIndex": "0xe", + "transactionLogIndex": "0x13", "removed": false }, { @@ -271,12 +285,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000018d53b20800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000008d53b20800000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x14", - "transactionLogIndex": "0xf", + "transactionLogIndex": "0x14", "removed": false }, { @@ -285,12 +299,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000125f6221000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e730000000000000000000025f6221000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x15", - "transactionLogIndex": "0x10", + "transactionLogIndex": "0x15", "removed": false }, { @@ -299,12 +313,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000012bfaa27400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000002bfaa27400000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x16", - "transactionLogIndex": "0x11", + "transactionLogIndex": "0x16", "removed": false }, { @@ -313,12 +327,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000121293ca000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e730000000000000000000021293ca000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x17", - "transactionLogIndex": "0x12", + "transactionLogIndex": "0x17", "removed": false }, { @@ -327,12 +341,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000018818929400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000008818929400000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x18", - "transactionLogIndex": "0x13", + "transactionLogIndex": "0x18", "removed": false }, { @@ -341,12 +355,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000018da798da00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000008da798da00000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x19", - "transactionLogIndex": "0x14", + "transactionLogIndex": "0x19", "removed": false }, { @@ -355,12 +369,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010ba51f4900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000000ba51f4900000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x1a", - "transactionLogIndex": "0x15", + "transactionLogIndex": "0x1a", "removed": false }, { @@ -369,12 +383,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001530f4b6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000530f4b6000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x1b", - "transactionLogIndex": "0x16", + "transactionLogIndex": "0x1b", "removed": false }, { @@ -383,12 +397,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010560912900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000000560912900000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x1c", - "transactionLogIndex": "0x17", + "transactionLogIndex": "0x1c", "removed": false }, { @@ -397,12 +411,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001a886545e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000a886545e00000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x1d", - "transactionLogIndex": "0x18", + "transactionLogIndex": "0x1d", "removed": false }, { @@ -411,12 +425,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001d5f8337f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000d5f8337f00000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x1e", - "transactionLogIndex": "0x19", + "transactionLogIndex": "0x1e", "removed": false }, { @@ -425,12 +439,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001a92813ad00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000a92813ad00000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x1f", - "transactionLogIndex": "0x1a", + "transactionLogIndex": "0x1f", "removed": false }, { @@ -439,12 +453,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000013350b6a900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000003350b6a900000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x20", - "transactionLogIndex": "0x1b", + "transactionLogIndex": "0x20", "removed": false }, { @@ -453,12 +467,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000013c03a51c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000003c03a51c00000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x21", - "transactionLogIndex": "0x1c", + "transactionLogIndex": "0x21", "removed": false }, { @@ -467,12 +481,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001b7a3c75600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000b7a3c75600000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x22", - "transactionLogIndex": "0x1d", + "transactionLogIndex": "0x22", "removed": false }, { @@ -481,12 +495,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000011d2257ba00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000001d2257ba00000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x23", - "transactionLogIndex": "0x1e", + "transactionLogIndex": "0x23", "removed": false }, { @@ -495,12 +509,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x00000000000000000000000000000000496e7374616c6c65644d6f64756c6573000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002636f72652e6d0000000000000000000000000000000000000000000000000000c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4700000000000000000000000000000000000000000000000000000000000000014e7f1725e7734ce288f8367e1bb143e90bb3f0512000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x99deb14acfd37070907742a1e1132b770fa6d08a4ac6cf48c67c26ddd9ab1fa2", - "transactionIndex": "0x7", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", + "transactionIndex": "0x0", "logIndex": "0x24", - "transactionLogIndex": "0x1f", + "transactionLogIndex": "0x24", "removed": false }, { @@ -509,10 +523,10 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737400000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x2a37be40264ec61f831b80f2ba86de357880aca3543deef9af1da49f512d767a", - "transactionIndex": "0x8", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0x7bca8d7dabf72bfa9ff127d2d2fac95a747b5cbd45e44d820789f14a6d340d2f", + "transactionIndex": "0x1", "logIndex": "0x25", "transactionLogIndex": "0x0", "removed": false @@ -523,10 +537,10 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c697374000000000000000000000000000000000000000000000000000000000000000000000000016000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000040000000000000e000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x2a37be40264ec61f831b80f2ba86de357880aca3543deef9af1da49f512d767a", - "transactionIndex": "0x8", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0x7bca8d7dabf72bfa9ff127d2d2fac95a747b5cbd45e44d820789f14a6d340d2f", + "transactionIndex": "0x1", "logIndex": "0x26", "transactionLogIndex": "0x1", "removed": false @@ -536,11 +550,11 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000566563746f720000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xf0a076b9fa7fba5660e3ea38e2cc3f839ac119fafe6e621a52dd4d48412547b6", - "transactionIndex": "0x9", + "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000437573746f6d4572726f72735379737400000000000000000000000000000000000000000000000000000000000000010300000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xb5f9defc11305940c4b08a6f34cdb4a671fde33905f288048b70c85b1d0875eb", + "transactionIndex": "0x2", "logIndex": "0x27", "transactionLogIndex": "0x0", "removed": false @@ -550,11 +564,11 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000566563746f72000000000000000000000000000000000000000000000000000000000000000000000000000000000220000802000404000000000000000000000000000000000000000000000000000000040100030000000000000000000000000000000000000000000000000000000008020023230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000a0000000000001a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b6579000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017900000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xf0a076b9fa7fba5660e3ea38e2cc3f839ac119fafe6e621a52dd4d48412547b6", - "transactionIndex": "0x9", + "data": "0x0000000000000000000000000000000053797374656d73000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000437573746f6d4572726f72735379737400000000000000000000000000000000000000000000000000000000000000155fc8d32690cc91d4c39d9d3abcbd16989f875707010000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xb5f9defc11305940c4b08a6f34cdb4a671fde33905f288048b70c85b1d0875eb", + "transactionIndex": "0x2", "logIndex": "0x28", "transactionLogIndex": "0x1", "removed": false @@ -564,27 +578,27 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265720000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xa22266979e22263283f576d1dc598465908c7cd4ed7d40c7434a1887a94a773b", - "transactionIndex": "0xa", + "data": "0x0000000000000000000000000000000053797374656d526567697374727900000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f875707000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000437573746f6d4572726f727353797374", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xb5f9defc11305940c4b08a6f34cdb4a671fde33905f288048b70c85b1d0875eb", + "transactionIndex": "0x2", "logIndex": "0x29", - "transactionLogIndex": "0x0", + "transactionLogIndex": "0x2", "removed": false }, { "address": "0x5fbdb2315678afecb367f032d93f642f64180aa3", "topics": [ - "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" + "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265720000000000000000000000000000000000000000000000000000000000000000000000000000000001c000040100040000000000000000000000000000000000000000000000000000000004010003000000000000000000000000000000000000000000000000000000000401000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b65790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xa22266979e22263283f576d1dc598465908c7cd4ed7d40c7434a1887a94a773b", - "transactionIndex": "0xa", + "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f87570700000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xb5f9defc11305940c4b08a6f34cdb4a671fde33905f288048b70c85b1d0875eb", + "transactionIndex": "0x2", "logIndex": "0x2a", - "transactionLogIndex": "0x1", + "transactionLogIndex": "0x3", "removed": false }, { @@ -592,11 +606,11 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000437573746f6d4572726f72735379737400000000000000000000000000000000000000000000000000000000000000010300000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xa019744ca59e63a91c327629d7137ec2d851787e922d8d9f48c8e74c3b622453", - "transactionIndex": "0xb", + "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737453797374656d00000000000000000000000000000000000000000000000000000000000000010300000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0x5e56042175cee9139c0439cc0df13d0efbdb1a57e93e5353f8fc713ea061bfce", + "transactionIndex": "0x3", "logIndex": "0x2b", "transactionLogIndex": "0x0", "removed": false @@ -606,11 +620,11 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x0000000000000000000000000000000053797374656d73000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000437573746f6d4572726f72735379737400000000000000000000000000000000000000000000000000000000000000155fc8d32690cc91d4c39d9d3abcbd16989f875707010000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xa019744ca59e63a91c327629d7137ec2d851787e922d8d9f48c8e74c3b622453", - "transactionIndex": "0xb", + "data": "0x0000000000000000000000000000000053797374656d73000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737453797374656d00000000000000000000000000000000000000000000000000000000000000150165878a594ca255338adfa4d48449f69242eb8f010000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0x5e56042175cee9139c0439cc0df13d0efbdb1a57e93e5353f8fc713ea061bfce", + "transactionIndex": "0x3", "logIndex": "0x2c", "transactionLogIndex": "0x1", "removed": false @@ -620,11 +634,11 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x0000000000000000000000000000000053797374656d526567697374727900000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f875707000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000437573746f6d4572726f727353797374", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xa019744ca59e63a91c327629d7137ec2d851787e922d8d9f48c8e74c3b622453", - "transactionIndex": "0xb", + "data": "0x0000000000000000000000000000000053797374656d526567697374727900000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000165878a594ca255338adfa4d48449f69242eb8f0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000004e756d6265724c69737453797374656d", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0x5e56042175cee9139c0439cc0df13d0efbdb1a57e93e5353f8fc713ea061bfce", + "transactionIndex": "0x3", "logIndex": "0x2d", "transactionLogIndex": "0x2", "removed": false @@ -634,11 +648,11 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f87570700000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xa019744ca59e63a91c327629d7137ec2d851787e922d8d9f48c8e74c3b622453", - "transactionIndex": "0xb", + "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000165878a594ca255338adfa4d48449f69242eb8f00000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0x5e56042175cee9139c0439cc0df13d0efbdb1a57e93e5353f8fc713ea061bfce", + "transactionIndex": "0x3", "logIndex": "0x2e", "transactionLogIndex": "0x3", "removed": false @@ -648,11 +662,11 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737453797374656d00000000000000000000000000000000000000000000000000000000000000010300000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x63c06061f3c8f9e8dfe3dfcf955082539d44d2bccefe66b943c5f481337b5f61", - "transactionIndex": "0xc", + "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000566563746f720000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xb3febd63ed51098bd7062390e4e859508e55a1bbfa5ee8ec197a4df93586f632", + "transactionIndex": "0x4", "logIndex": "0x2f", "transactionLogIndex": "0x0", "removed": false @@ -662,11 +676,11 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x0000000000000000000000000000000053797374656d73000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737453797374656d00000000000000000000000000000000000000000000000000000000000000150165878a594ca255338adfa4d48449f69242eb8f010000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x63c06061f3c8f9e8dfe3dfcf955082539d44d2bccefe66b943c5f481337b5f61", - "transactionIndex": "0xc", + "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000566563746f72000000000000000000000000000000000000000000000000000000000000000000000000000000000220000802000404000000000000000000000000000000000000000000000000000000040100030000000000000000000000000000000000000000000000000000000008020023230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000a0000000000001a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b6579000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017900000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xb3febd63ed51098bd7062390e4e859508e55a1bbfa5ee8ec197a4df93586f632", + "transactionIndex": "0x4", "logIndex": "0x30", "transactionLogIndex": "0x1", "removed": false @@ -676,27 +690,27 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x0000000000000000000000000000000053797374656d526567697374727900000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000165878a594ca255338adfa4d48449f69242eb8f0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000004e756d6265724c69737453797374656d", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x63c06061f3c8f9e8dfe3dfcf955082539d44d2bccefe66b943c5f481337b5f61", - "transactionIndex": "0xc", + "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265720000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xd9aea844188d36cd599b3d9ddd523b1269131ec10ebf5b107a50bffe8a03985e", + "transactionIndex": "0x5", "logIndex": "0x31", - "transactionLogIndex": "0x2", + "transactionLogIndex": "0x0", "removed": false }, { "address": "0x5fbdb2315678afecb367f032d93f642f64180aa3", "topics": [ - "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" + "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000165878a594ca255338adfa4d48449f69242eb8f00000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x63c06061f3c8f9e8dfe3dfcf955082539d44d2bccefe66b943c5f481337b5f61", - "transactionIndex": "0xc", + "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265720000000000000000000000000000000000000000000000000000000000000000000000000000000001c000040100040000000000000000000000000000000000000000000000000000000004010003000000000000000000000000000000000000000000000000000000000401000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b65790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xd9aea844188d36cd599b3d9ddd523b1269131ec10ebf5b107a50bffe8a03985e", + "transactionIndex": "0x5", "logIndex": "0x32", - "transactionLogIndex": "0x3", + "transactionLogIndex": "0x1", "removed": false }, { @@ -705,10 +719,10 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004d756c7469000000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xd24893f65a6b85dc7d9644726e7f03fddc4edc256d956f2965ef800c134e0719", - "transactionIndex": "0xd", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xa50c88a503c25f17dc6c8e4cc779f15341f6f8242da501989a64ec87a8f5a85b", + "transactionIndex": "0x6", "logIndex": "0x33", "transactionLogIndex": "0x0", "removed": false @@ -719,10 +733,10 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004d756c74690000000000000000000000000000000000000000000000000000000000000000000000000000000000034000210200200100000000000000000000000000000000000000000000000000000034040003601f2e000000000000000000000000000000000000000000000000002102003f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000001c0000000000002c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000016100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000162000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000036e756d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xd24893f65a6b85dc7d9644726e7f03fddc4edc256d956f2965ef800c134e0719", - "transactionIndex": "0xd", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0xa50c88a503c25f17dc6c8e4cc779f15341f6f8242da501989a64ec87a8f5a85b", + "transactionIndex": "0x6", "logIndex": "0x34", "transactionLogIndex": "0x1", "removed": false @@ -732,11 +746,11 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000015f644e3c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000437573746f6d4572726f7273537973745f644e3c00000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x7457d2e10dd336429a4077839674b8a346fb220ff17b4058a0a385b981b58cb5", - "transactionIndex": "0xe", + "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001306d61a5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656d306d61a500000000000000000000000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0x2fc64bbab454451eca5989fa793399718795f92515de1032447065da3dec0201", + "transactionIndex": "0x7", "logIndex": "0x35", "transactionLogIndex": "0x0", "removed": false @@ -747,10 +761,10 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001b8a44c7c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656db8a44c7c00000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x21e16439547f1c2a365efc548780b3cbd47ef74bdbbd55cde27c9d55458842f2", - "transactionIndex": "0xf", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0x704d3a95376db47cabae3ba83743e46e1eb751b82a9b622af5a555e109d59a66", + "transactionIndex": "0x8", "logIndex": "0x36", "transactionLogIndex": "0x0", "removed": false @@ -760,11 +774,11 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001306d61a5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656d306d61a500000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xe76907051c864ea6d12f038a0423ac6043ffe4aedf405378f25c6f8a63dc038c", - "transactionIndex": "0x10", + "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f7f0e440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656df7f0e44000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0x39116de046d5a63b1624f2556f78148c5bfaf0011b126598d96615cbbf89dc7f", + "transactionIndex": "0x9", "logIndex": "0x37", "transactionLogIndex": "0x0", "removed": false @@ -774,11 +788,11 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001a4ece52c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656da4ece52c00000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0x83c2546f45504545c8921d74dce1335f7db65f2c573b14971dc283a0abb427a2", - "transactionIndex": "0x11", + "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000015f644e3c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000437573746f6d4572726f7273537973745f644e3c00000000000000000000000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0x6f143315ee4b6e8f64a70bf520ea301db90a677eda48a9f423bd5d1f5b4a1c28", + "transactionIndex": "0xa", "logIndex": "0x38", "transactionLogIndex": "0x0", "removed": false @@ -788,11 +802,11 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f7f0e440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656df7f0e44000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc69c386d859fa05880ce8c651bf668d7db8b91b038ace616e20d7502917815e0", - "blockNumber": "0x2", - "transactionHash": "0xaee239c8f1398730a2f5e8c2426cd47f8d39a4c66e2d73155b4dcd73f3b45e68", - "transactionIndex": "0x12", + "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001a4ece52c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656da4ece52c00000000000000000000000000000000000000000000000000000000", + "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", + "blockNumber": "0x4", + "transactionHash": "0x0f4f8c0ea36e9e8e88cdd2f5719f2ffa36a3698bdf7fe2b8443685d35517d6ea", + "transactionIndex": "0xb", "logIndex": "0x39", "transactionLogIndex": "0x0", "removed": false @@ -803,9 +817,9 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000004e756d6265724c6973740000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000001a400000000000000000000000000000000000000000000000000000000", - "blockHash": "0x54705c7c1c71954d18db182c27c85def952826a0f7c9e09e933ad90a29e1ccd9", - "blockNumber": "0x3", - "transactionHash": "0xedae06dc8024b7b364f6ef80597edfb3c595b4b0eba21b9f0afb683c0ad4ea64", + "blockHash": "0xaff54c40af4b26fae5bfcbb5187e698f5e4a54c338fac1e9ddbcdef5eb979c6b", + "blockNumber": "0x5", + "transactionHash": "0x6b11c4b4d9257da889cd755a9aef98068339dea0770f3c43def5293c47977876", "transactionIndex": "0x0", "logIndex": "0x0", "transactionLogIndex": "0x0", @@ -817,9 +831,9 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000004e756d6265724c6973740000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000001a400000045000000000000000000000000000000000000000000000000", - "blockHash": "0x54705c7c1c71954d18db182c27c85def952826a0f7c9e09e933ad90a29e1ccd9", - "blockNumber": "0x3", - "transactionHash": "0xf457c087993354a5ca9d86b59df3f8d355d23fb441386fb70bddf09770e3bc21", + "blockHash": "0xaff54c40af4b26fae5bfcbb5187e698f5e4a54c338fac1e9ddbcdef5eb979c6b", + "blockNumber": "0x5", + "transactionHash": "0x2453e912dfab0eed54e6140d2f5c829034fe51fa844767991510eb71ecff8a3b", "transactionIndex": "0x1", "logIndex": "0x1", "transactionLogIndex": "0x0",