From 5fc685743d742390c8ece41c95e57f9f4c8559bb Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 12:43:52 +0100 Subject: [PATCH 01/28] feat: use valueSchema every where --- e2e/packages/contracts/mud.config.ts | 8 ++-- e2e/packages/sync-test/data/encodeTestData.ts | 4 +- e2e/packages/sync-test/data/types.ts | 2 +- .../minimal/packages/contracts/mud.config.ts | 6 +-- packages/cli/scripts/generate-test-tables.ts | 13 +++--- packages/cli/src/utils/deploy.ts | 6 +-- .../protocol-parser/src/decodeRecord.test.ts | 12 +++--- packages/protocol-parser/src/decodeRecord.ts | 16 ++++---- .../protocol-parser/src/encodeRecord.test.ts | 14 +++---- packages/protocol-parser/src/encodeRecord.ts | 15 ++++--- packages/protocol-parser/src/encodeValue.ts | 2 +- .../protocol-parser/src/hexToPackedCounter.ts | 4 +- .../protocol-parser/src/keySchemaToHex.ts | 4 +- .../protocol-parser/src/valueSchemaToHex.ts | 6 +-- packages/store-sync/src/blockLogsToStorage.ts | 4 +- .../src/postgres/buildInternalTables.ts | 1 - packages/store-sync/src/schemaToDefaults.ts | 4 +- packages/store/mud.config.ts | 10 ++--- packages/store/src/IStore.sol | 4 +- packages/store/src/StoreRead.sol | 8 ++-- packages/store/test/StoreCore.t.sol | 4 +- packages/store/test/StoreCoreDynamic.t.sol | 2 +- packages/store/test/StoreCoreGas.t.sol | 22 +++++----- packages/store/test/tables/StoreHooks.t.sol | 2 +- packages/store/ts/codegen/renderTable.ts | 12 +++--- packages/store/ts/codegen/tableOptions.ts | 8 ++-- packages/store/ts/common.ts | 2 +- packages/store/ts/config/storeConfig.ts | 26 ++++++------ .../store/ts/register/mudConfig.test-d.ts | 8 ++-- packages/world/mud.config.ts | 40 +++++++++---------- .../StoreRegistrationSystem.sol | 4 +- .../modules/keysintable/getKeysInTable.sol | 13 +++--- packages/world/ts/register/index.test.ts | 2 +- .../phaser/packages/contracts/mud.config.ts | 2 +- .../threejs/packages/contracts/mud.config.ts | 2 +- .../vanilla/packages/contracts/mud.config.ts | 2 +- 36 files changed, 147 insertions(+), 147 deletions(-) diff --git a/e2e/packages/contracts/mud.config.ts b/e2e/packages/contracts/mud.config.ts index 762ce21584..c3da4297c5 100644 --- a/e2e/packages/contracts/mud.config.ts +++ b/e2e/packages/contracts/mud.config.ts @@ -6,7 +6,7 @@ export default mudConfig({ keySchema: { key: "uint32", }, - schema: { + valueSchema: { value: "uint32", }, }, @@ -14,14 +14,14 @@ export default mudConfig({ keySchema: { key: "uint32", }, - schema: { + valueSchema: { x: "int32", y: "int32", }, }, NumberList: { keySchema: {}, - schema: { + valueSchema: { value: "uint32[]", }, }, @@ -32,7 +32,7 @@ export default mudConfig({ c: "uint256", d: "int120", }, - schema: { + valueSchema: { num: "int256", value: "bool", }, diff --git a/e2e/packages/sync-test/data/encodeTestData.ts b/e2e/packages/sync-test/data/encodeTestData.ts index c0a6ab9dd5..a433626d61 100644 --- a/e2e/packages/sync-test/data/encodeTestData.ts +++ b/e2e/packages/sync-test/data/encodeTestData.ts @@ -18,9 +18,9 @@ export function encodeTestData(testData: Data) { return encodeAbiParameters([{ type: keyType }], [keyValue]); }); - const encodedValue = encodePacked(Object.values(config.tables[table].schema), Object.values(record.value)); + const encodedValue = encodePacked(Object.values(config.tables[table].valueSchema), Object.values(record.value)); - const encodedValueSchema = schemaToHex(abiTypesToSchema(Object.values(config.tables[table].schema))); + const encodedValueSchema = schemaToHex(abiTypesToSchema(Object.values(config.tables[table].valueSchema))); return { key: encodedKey, diff --git a/e2e/packages/sync-test/data/types.ts b/e2e/packages/sync-test/data/types.ts index 4ab5dab4ed..85abd2c90d 100644 --- a/e2e/packages/sync-test/data/types.ts +++ b/e2e/packages/sync-test/data/types.ts @@ -10,7 +10,7 @@ type Key = SchemaToPrimitive< (typeof config)["tables"][Table]["keySchema"] >; type Value
= SchemaToPrimitive< - (typeof config)["tables"][Table]["schema"] + (typeof config)["tables"][Table]["valueSchema"] >; export type Datum
= { diff --git a/examples/minimal/packages/contracts/mud.config.ts b/examples/minimal/packages/contracts/mud.config.ts index 70d98bb5d6..58cf475496 100644 --- a/examples/minimal/packages/contracts/mud.config.ts +++ b/examples/minimal/packages/contracts/mud.config.ts @@ -16,14 +16,14 @@ export default mudConfig({ tables: { CounterTable: { keySchema: {}, - schema: { + valueSchema: { value: "uint32", }, storeArgument: true, }, MessageTable: { keySchema: {}, - schema: { + valueSchema: { value: "string", }, ephemeral: true, @@ -34,7 +34,7 @@ export default mudConfig({ item: "uint32", itemVariant: "uint32", }, - schema: { amount: "uint32" }, + valueSchema: { amount: "uint32" }, }, }, // KeysWithValue doesn't seem to like singleton keys diff --git a/packages/cli/scripts/generate-test-tables.ts b/packages/cli/scripts/generate-test-tables.ts index ec8174f3ee..d7ca0db655 100644 --- a/packages/cli/scripts/generate-test-tables.ts +++ b/packages/cli/scripts/generate-test-tables.ts @@ -1,12 +1,11 @@ import path from "path"; -import { StoreConfig } from "@latticexyz/store"; import { tablegen } from "@latticexyz/store/codegen"; import { mudConfig } from "@latticexyz/world/register"; import { getSrcDirectory } from "@latticexyz/common/foundry"; import { logError } from "../src/utils/errors"; // This config is used only for tests. -// Aside from avoiding `mud.config.mts` in cli package (could cause issues), +// Aside from avoiding `mud.config.ts` in cli package (could cause issues), // this also tests that mudConfig and tablegen can work as standalone functions let config; try { @@ -22,7 +21,7 @@ try { k6: "Enum1", k7: "Enum2", }, - schema: { + valueSchema: { v1: "uint256", v2: "int32", v3: "bytes16", @@ -33,7 +32,7 @@ try { }, }, Dynamics1: { - schema: { + valueSchema: { staticB32: "bytes32[1]", staticI32: "int32[2]", staticU128: "uint128[3]", @@ -42,7 +41,7 @@ try { }, }, Dynamics2: { - schema: { + valueSchema: { u64: "uint64[]", str: "string", b: "bytes", @@ -50,7 +49,7 @@ try { }, Singleton: { keySchema: {}, - schema: { + valueSchema: { v1: "int256", v2: "uint32[2]", v3: "uint32[2]", @@ -59,7 +58,7 @@ try { dataStruct: false, }, Ephemeral: { - schema: "uint256", + valueSchema: "uint256", ephemeral: true, }, }, diff --git a/packages/cli/src/utils/deploy.ts b/packages/cli/src/utils/deploy.ts index e9079dfd39..5ac0bc5bf3 100644 --- a/packages/cli/src/utils/deploy.ts +++ b/packages/cli/src/utils/deploy.ts @@ -147,14 +147,14 @@ export async function deploy( const tableIds: { [tableName: string]: Uint8Array } = {}; promises = [ ...promises, - ...Object.entries(mudConfig.tables).map(async ([tableName, { name, schema, keySchema }]) => { + ...Object.entries(mudConfig.tables).map(async ([tableName, { name, valueSchema, keySchema }]) => { console.log(chalk.blue(`Registering table ${tableName} at ${namespace}/${name}`)); // Store the tableId for later use tableIds[tableName] = toResourceSelector(namespace, name); // Register table - const schemaTypes = Object.values(schema).map((abiOrUserType) => { + const schemaTypes = Object.values(valueSchema).map((abiOrUserType) => { const { schemaType } = resolveAbiOrUserType(abiOrUserType, mudConfig); return schemaType; }); @@ -179,7 +179,7 @@ export async function deploy( encodeSchema(keyTypes), encodeSchema(schemaTypes), Object.keys(keySchema), - Object.keys(schema), + Object.keys(valueSchema), ], confirmations ); diff --git a/packages/protocol-parser/src/decodeRecord.test.ts b/packages/protocol-parser/src/decodeRecord.test.ts index 390dcc6ade..87e357f599 100644 --- a/packages/protocol-parser/src/decodeRecord.test.ts +++ b/packages/protocol-parser/src/decodeRecord.test.ts @@ -3,17 +3,17 @@ import { decodeRecord } from "./decodeRecord"; describe("decodeRecord", () => { it("can decode hex to record values", () => { - const schema = { staticFields: ["uint32", "uint128"], dynamicFields: ["uint32[]", "string"] } as const; + const valueSchema = { staticFields: ["uint32", "uint128"], dynamicFields: ["uint32[]", "string"] } as const; const values = decodeRecord( - schema, + valueSchema, "0x0000000100000000000000000000000000000002000000000000000000000000000000000000000b0000000008000000000000130000000300000004736f6d6520737472696e67" ); expect(values).toStrictEqual([1, 2n, [3, 4], "some string"]); }); it("can decode an empty record", () => { - const schema = { staticFields: [], dynamicFields: ["string", "string"] } as const; - const values = decodeRecord(schema, "0x0000000000000000000000000000000000000000000000000000000000000000"); + const valueSchema = { staticFields: [], dynamicFields: ["string", "string"] } as const; + const values = decodeRecord(valueSchema, "0x0000000000000000000000000000000000000000000000000000000000000000"); expect(values).toMatchInlineSnapshot(` [ "", @@ -23,8 +23,8 @@ describe("decodeRecord", () => { }); it("can decode an out of bounds array", () => { - const schema = { staticFields: [], dynamicFields: ["uint32[]"] } as const; - const values = decodeRecord(schema, "0x0000000000000000000000000000000000000000000000000400000000000004"); + const valueSchema = { staticFields: [], dynamicFields: ["uint32[]"] } as const; + const values = decodeRecord(valueSchema, "0x0000000000000000000000000000000000000000000000000400000000000004"); expect(values).toMatchInlineSnapshot(` [ [ diff --git a/packages/protocol-parser/src/decodeRecord.ts b/packages/protocol-parser/src/decodeRecord.ts index 2f8536287d..c48dc0bd24 100644 --- a/packages/protocol-parser/src/decodeRecord.ts +++ b/packages/protocol-parser/src/decodeRecord.ts @@ -13,23 +13,23 @@ import { staticDataLength } from "./staticDataLength"; import { readHex } from "./readHex"; /** @deprecated use `decodeValue` instead */ -export function decodeRecord(schema: Schema, data: Hex): readonly (StaticPrimitiveType | DynamicPrimitiveType)[] { +export function decodeRecord(valueSchema: Schema, data: Hex): readonly (StaticPrimitiveType | DynamicPrimitiveType)[] { const values: (StaticPrimitiveType | DynamicPrimitiveType)[] = []; let bytesOffset = 0; - schema.staticFields.forEach((fieldType) => { + valueSchema.staticFields.forEach((fieldType) => { const fieldByteLength = staticAbiTypeToByteLength[fieldType]; const value = decodeStaticField(fieldType, readHex(data, bytesOffset, bytesOffset + fieldByteLength)); bytesOffset += fieldByteLength; values.push(value); }); - // Warn user if static data length doesn't match the schema, because data corruption might be possible. - const schemaStaticDataLength = staticDataLength(schema.staticFields); + // Warn user if static data length doesn't match the value schema, because data corruption might be possible. + const schemaStaticDataLength = staticDataLength(valueSchema.staticFields); const actualStaticDataLength = bytesOffset; if (actualStaticDataLength !== schemaStaticDataLength) { console.warn( - "Decoded static data length does not match schema's expected static data length. Data may get corrupted. Is `getStaticByteLength` outdated?", + "Decoded static data length does not match value schema's expected static data length. Data may get corrupted. Is `getStaticByteLength` outdated?", { expectedLength: schemaStaticDataLength, actualLength: actualStaticDataLength, @@ -38,11 +38,11 @@ export function decodeRecord(schema: Schema, data: Hex): readonly (StaticPrimiti ); } - if (schema.dynamicFields.length > 0) { + if (valueSchema.dynamicFields.length > 0) { const dataLayout = hexToPackedCounter(readHex(data, bytesOffset, bytesOffset + 32)); bytesOffset += 32; - schema.dynamicFields.forEach((fieldType, i) => { + valueSchema.dynamicFields.forEach((fieldType, i) => { const dataLength = dataLayout.fieldByteLengths[i]; if (dataLength > 0) { const value = decodeDynamicField(fieldType, readHex(data, bytesOffset, bytesOffset + dataLength)); @@ -53,7 +53,7 @@ export function decodeRecord(schema: Schema, data: Hex): readonly (StaticPrimiti } }); - // Warn user if dynamic data length doesn't match the schema, because data corruption might be possible. + // Warn user if dynamic data length doesn't match the dynamic data length, because data corruption might be possible. const actualDynamicDataLength = bytesOffset - 32 - actualStaticDataLength; // TODO: refactor this so we don't break for bytes offsets >UINT40 if (BigInt(actualDynamicDataLength) !== dataLayout.totalByteLength) { diff --git a/packages/protocol-parser/src/encodeRecord.test.ts b/packages/protocol-parser/src/encodeRecord.test.ts index fde765d9b6..29222756fa 100644 --- a/packages/protocol-parser/src/encodeRecord.test.ts +++ b/packages/protocol-parser/src/encodeRecord.test.ts @@ -2,23 +2,23 @@ import { describe, expect, it } from "vitest"; import { encodeRecord } from "./encodeRecord"; describe("encodeRecord", () => { - it("can encode a schema and record values to hex", () => { - const schema = { staticFields: ["uint32", "uint128"], dynamicFields: ["uint32[]", "string"] } as const; - const hex = encodeRecord(schema, [1, 2n, [3, 4], "some string"]); + it("can encode a value schema and record values to hex", () => { + const valueSchema = { staticFields: ["uint32", "uint128"], dynamicFields: ["uint32[]", "string"] } as const; + const hex = encodeRecord(valueSchema, [1, 2n, [3, 4], "some string"]); expect(hex).toBe( "0x0000000100000000000000000000000000000002000000000000000000000000000000000000000b0000000008000000000000130000000300000004736f6d6520737472696e67" ); }); it("should not include the packed dynamic lengths if there are no dynamic fields", () => { - const schema = { staticFields: ["uint32", "uint128"], dynamicFields: [] } as const; - const hex = encodeRecord(schema, [1, 2n]); + const valueSchema = { staticFields: ["uint32", "uint128"], dynamicFields: [] } as const; + const hex = encodeRecord(valueSchema, [1, 2n]); expect(hex).toBe("0x0000000100000000000000000000000000000002"); }); it("can encode an array to hex", () => { - const schema = { staticFields: [], dynamicFields: ["uint32[]"] } as const; - const hex = encodeRecord(schema, [[42]]); + const valueSchema = { staticFields: [], dynamicFields: ["uint32[]"] } as const; + const hex = encodeRecord(valueSchema, [[42]]); expect(hex).toBe("0x00000000000000000000000000000000000000000000000004000000000000040000002a"); }); }); diff --git a/packages/protocol-parser/src/encodeRecord.ts b/packages/protocol-parser/src/encodeRecord.ts index b224a6c532..b92287830c 100644 --- a/packages/protocol-parser/src/encodeRecord.ts +++ b/packages/protocol-parser/src/encodeRecord.ts @@ -4,18 +4,21 @@ import { encodeField } from "./encodeField"; import { Schema } from "./common"; /** @deprecated use `encodeValue` instead */ -export function encodeRecord(schema: Schema, values: readonly (StaticPrimitiveType | DynamicPrimitiveType)[]): Hex { - const staticValues = values.slice(0, schema.staticFields.length) as readonly StaticPrimitiveType[]; - const dynamicValues = values.slice(schema.staticFields.length) as readonly DynamicPrimitiveType[]; +export function encodeRecord( + valueSchema: Schema, + values: readonly (StaticPrimitiveType | DynamicPrimitiveType)[] +): Hex { + const staticValues = values.slice(0, valueSchema.staticFields.length) as readonly StaticPrimitiveType[]; + const dynamicValues = values.slice(valueSchema.staticFields.length) as readonly DynamicPrimitiveType[]; const staticData = staticValues - .map((value, i) => encodeField(schema.staticFields[i], value).replace(/^0x/, "")) + .map((value, i) => encodeField(valueSchema.staticFields[i], value).replace(/^0x/, "")) .join(""); - if (schema.dynamicFields.length === 0) return `0x${staticData}`; + if (valueSchema.dynamicFields.length === 0) return `0x${staticData}`; const dynamicDataItems = dynamicValues.map((value, i) => - encodeField(schema.dynamicFields[i], value).replace(/^0x/, "") + encodeField(valueSchema.dynamicFields[i], value).replace(/^0x/, "") ); const dynamicFieldByteLengths = dynamicDataItems.map((value) => value.length / 2).reverse(); diff --git a/packages/protocol-parser/src/encodeValue.ts b/packages/protocol-parser/src/encodeValue.ts index 6394f144b3..f953ccee21 100644 --- a/packages/protocol-parser/src/encodeValue.ts +++ b/packages/protocol-parser/src/encodeValue.ts @@ -13,6 +13,6 @@ export function encodeValue( // TODO: refactor and move all encodeRecord logic into this method so we can delete encodeRecord // This currently assumes fields/values are ordered by static, dynamic - // TODO: make sure we preserve ordering based on schema definition + // TODO: make sure we preserve ordering based on value schema definition return encodeRecord({ staticFields, dynamicFields }, Object.values(value)); } diff --git a/packages/protocol-parser/src/hexToPackedCounter.ts b/packages/protocol-parser/src/hexToPackedCounter.ts index 6ab5920bbd..c8816d15f7 100644 --- a/packages/protocol-parser/src/hexToPackedCounter.ts +++ b/packages/protocol-parser/src/hexToPackedCounter.ts @@ -9,7 +9,7 @@ import { readHex } from "./readHex"; // - Last 7 bytes (uint56) are used for the total byte length of the dynamic data // - The next 5 byte (uint40) sections are used for the byte length of each field, indexed from right to left -// We use byte lengths rather than item counts so that, on chain, we can slice without having to get the schema first (and thus the field lengths of each dynamic type) +// We use byte lengths rather than item counts so that, on chain, we can slice without having to get the value schema first (and thus the field lengths of each dynamic type) export function hexToPackedCounter(data: Hex): { totalByteLength: bigint; @@ -20,7 +20,7 @@ export function hexToPackedCounter(data: Hex): { } const totalByteLength = decodeStaticField("uint56", readHex(data, 32 - 7, 32)); - // TODO: use schema to make sure we only parse as many as we need (rather than zeroes at the end)? + // TODO: use value schema to make sure we only parse as many as we need (rather than zeroes at the end)? const reversedFieldByteLengths = decodeDynamicField("uint40[]", readHex(data, 0, 32 - 7)); // Reverse the lengths const fieldByteLengths = Object.freeze([...reversedFieldByteLengths].reverse()); diff --git a/packages/protocol-parser/src/keySchemaToHex.ts b/packages/protocol-parser/src/keySchemaToHex.ts index 0d5d3a697e..f2e9443153 100644 --- a/packages/protocol-parser/src/keySchemaToHex.ts +++ b/packages/protocol-parser/src/keySchemaToHex.ts @@ -3,6 +3,6 @@ import { Hex } from "viem"; import { KeySchema } from "./common"; import { schemaToHex } from "./schemaToHex"; -export function keySchemaToHex(schema: KeySchema): Hex { - return schemaToHex({ staticFields: Object.values(schema).filter(isStaticAbiType), dynamicFields: [] }); +export function keySchemaToHex(keySchema: KeySchema): Hex { + return schemaToHex({ staticFields: Object.values(keySchema).filter(isStaticAbiType), dynamicFields: [] }); } diff --git a/packages/protocol-parser/src/valueSchemaToHex.ts b/packages/protocol-parser/src/valueSchemaToHex.ts index b7e24b7f7a..205b8696ea 100644 --- a/packages/protocol-parser/src/valueSchemaToHex.ts +++ b/packages/protocol-parser/src/valueSchemaToHex.ts @@ -3,9 +3,9 @@ import { Hex } from "viem"; import { ValueSchema } from "./common"; import { schemaToHex } from "./schemaToHex"; -export function valueSchemaToHex(schema: ValueSchema): Hex { +export function valueSchemaToHex(valueSchema: ValueSchema): Hex { return schemaToHex({ - staticFields: Object.values(schema).filter(isStaticAbiType), - dynamicFields: Object.values(schema).filter(isDynamicAbiType), + staticFields: Object.values(valueSchema).filter(isStaticAbiType), + dynamicFields: Object.values(valueSchema).filter(isDynamicAbiType), }); } diff --git a/packages/store-sync/src/blockLogsToStorage.ts b/packages/store-sync/src/blockLogsToStorage.ts index 70f07276a6..f4af902b71 100644 --- a/packages/store-sync/src/blockLogsToStorage.ts +++ b/packages/store-sync/src/blockLogsToStorage.ts @@ -48,9 +48,9 @@ export function blockLogsToStorage({ const table = hexToTableId(tableId); - const valueTuple = decodeRecord(abiTypesToSchema(Object.values(schemasTable.schema)), log.args.data); + const valueTuple = decodeRecord(abiTypesToSchema(Object.values(schemasTable.valueSchema)), log.args.data); const value = Object.fromEntries( - Object.keys(schemasTable.schema).map((name, i) => [name, valueTuple[i]]) + Object.keys(schemasTable.valueSchema).map((name, i) => [name, valueTuple[i]]) ) as ConfigToValuePrimitives; const keySchema = hexToSchema(value.keySchema); diff --git a/packages/store-sync/src/postgres/buildInternalTables.ts b/packages/store-sync/src/postgres/buildInternalTables.ts index 889566db44..08a4fd8b80 100644 --- a/packages/store-sync/src/postgres/buildInternalTables.ts +++ b/packages/store-sync/src/postgres/buildInternalTables.ts @@ -1,5 +1,4 @@ import { integer, pgSchema, text } from "drizzle-orm/pg-core"; -import { DynamicAbiType, StaticAbiType } from "@latticexyz/schema-type"; import { transformSchemaName } from "./transformSchemaName"; import { asAddress, asBigInt, asJson, asNumber } from "./columnTypes"; import { KeySchema, ValueSchema } from "@latticexyz/protocol-parser"; diff --git a/packages/store-sync/src/schemaToDefaults.ts b/packages/store-sync/src/schemaToDefaults.ts index 36dab2b1ec..15be27c54c 100644 --- a/packages/store-sync/src/schemaToDefaults.ts +++ b/packages/store-sync/src/schemaToDefaults.ts @@ -1,8 +1,8 @@ import { schemaAbiTypeToDefaultValue } from "@latticexyz/schema-type"; import { ValueSchema, SchemaToPrimitives } from "@latticexyz/protocol-parser"; -export function schemaToDefaults(schema: TSchema): SchemaToPrimitives { +export function schemaToDefaults(valueSchema: TSchema): SchemaToPrimitives { return Object.fromEntries( - Object.entries(schema).map(([key, abiType]) => [key, schemaAbiTypeToDefaultValue[abiType]]) + Object.entries(valueSchema).map(([key, abiType]) => [key, schemaAbiTypeToDefaultValue[abiType]]) ) as SchemaToPrimitives; } diff --git a/packages/store/mud.config.ts b/packages/store/mud.config.ts index 8a99d085b3..814ab527b9 100644 --- a/packages/store/mud.config.ts +++ b/packages/store/mud.config.ts @@ -13,7 +13,7 @@ export default mudConfig({ keySchema: { tableId: "bytes32", }, - schema: { + valueSchema: { fieldLayout: "bytes32", keySchema: "bytes32", valueSchema: "bytes32", @@ -23,12 +23,12 @@ export default mudConfig({ }, // The Hooks table is a generic table used by the `filterFromList` util in `Hook.sol` Hooks: { - schema: "bytes21[]", + valueSchema: "bytes21[]", tableIdArgument: true, }, // TODO: move these test tables to a separate mud config Mixed: { - schema: { + valueSchema: { u32: "uint32", u128: "uint128", a32: "uint32[]", @@ -36,7 +36,7 @@ export default mudConfig({ }, }, Vector2: { - schema: { + valueSchema: { x: "uint32", y: "uint32", }, @@ -50,7 +50,7 @@ export default mudConfig({ k5: "bool", k6: "ExampleEnum", }, - schema: "bool", + valueSchema: "bool", }, }, }); diff --git a/packages/store/src/IStore.sol b/packages/store/src/IStore.sol index 2a939e8529..c2e48c9fb4 100644 --- a/packages/store/src/IStore.sol +++ b/packages/store/src/IStore.sol @@ -9,9 +9,9 @@ import { IStoreHook } from "./IStoreHook.sol"; interface IStoreRead { function getFieldLayout(bytes32 table) external view returns (FieldLayout fieldLayout); - function getValueSchema(bytes32 table) external view returns (Schema schema); + function getValueSchema(bytes32 table) external view returns (Schema valueSchema); - function getKeySchema(bytes32 table) external view returns (Schema schema); + function getKeySchema(bytes32 table) external view returns (Schema keySchema); // Get full record (including full array) function getRecord( diff --git a/packages/store/src/StoreRead.sol b/packages/store/src/StoreRead.sol index 28fc1ff91a..425d66aee0 100644 --- a/packages/store/src/StoreRead.sol +++ b/packages/store/src/StoreRead.sol @@ -11,12 +11,12 @@ contract StoreRead is IStoreRead { fieldLayout = StoreCore.getFieldLayout(table); } - function getValueSchema(bytes32 table) public view virtual returns (Schema schema) { - schema = StoreCore.getValueSchema(table); + function getValueSchema(bytes32 table) public view virtual returns (Schema valueSchema) { + valueSchema = StoreCore.getValueSchema(table); } - function getKeySchema(bytes32 table) public view virtual returns (Schema schema) { - schema = StoreCore.getKeySchema(table); + function getKeySchema(bytes32 table) public view virtual returns (Schema keySchema) { + keySchema = StoreCore.getKeySchema(table); } // Get full record (static and dynamic data) diff --git a/packages/store/test/StoreCore.t.sol b/packages/store/test/StoreCore.t.sol index 15892cb85c..f6e37eac36 100644 --- a/packages/store/test/StoreCore.t.sol +++ b/packages/store/test/StoreCore.t.sol @@ -92,7 +92,7 @@ contract StoreCoreTest is Test, StoreMock { keccak256("table"), FieldLayout.wrap(keccak256("random bytes as value field layout")), Schema.wrap(keccak256("random bytes as key schema")), - Schema.wrap(keccak256("random bytes as schema")), + Schema.wrap(keccak256("random bytes as value schema")), keyNames, fieldNames ); @@ -926,7 +926,7 @@ contract StoreCoreTest is Test, StoreMock { bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some key"); - // Register table's schema + // 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)); diff --git a/packages/store/test/StoreCoreDynamic.t.sol b/packages/store/test/StoreCoreDynamic.t.sol index 19a08dd88c..a29d56eaa5 100644 --- a/packages/store/test/StoreCoreDynamic.t.sol +++ b/packages/store/test/StoreCoreDynamic.t.sol @@ -37,7 +37,7 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { } function setUp() public { - // Register table's schema + // Register table's value schema FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT256, diff --git a/packages/store/test/StoreCoreGas.t.sol b/packages/store/test/StoreCoreGas.t.sol index 97e2ec65a6..d09dc15539 100644 --- a/packages/store/test/StoreCoreGas.t.sol +++ b/packages/store/test/StoreCoreGas.t.sol @@ -60,7 +60,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { StoreCore.getFieldLayout(table); endGasReport(); - startGasReport("StoreCore: get schema (warm)"); + startGasReport("StoreCore: get value schema (warm)"); StoreCore.getValueSchema(table); endGasReport(); @@ -103,7 +103,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(1, 2, 4, 2); - // Register schema + // Register table StoreCore.registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](5)); // Create some key @@ -127,7 +127,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { } function testSetAndGetStaticData() public { - // Register table's schema + // Register table Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT8, SchemaType.UINT16, @@ -154,7 +154,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { } function testSetAndGetStaticDataSpanningWords() public { - // Register table's schema + // Register table Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128, SchemaType.UINT256); FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 32, 0); bytes32 table = keccak256("some.table"); @@ -182,7 +182,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { function testSetAndGetDynamicData() public { bytes32 table = keccak256("some.table"); - // Register table's schema + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, @@ -258,7 +258,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { function testSetAndGetField() public { bytes32 table = keccak256("some.table"); - // Register table's schema + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, @@ -348,7 +348,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { function testDeleteData() public { bytes32 table = keccak256("some.table"); - // Register table's schema + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, @@ -405,7 +405,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { function testPushToField() public { bytes32 table = keccak256("some.table"); - // Register table's schema + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT256, @@ -492,7 +492,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { TestUpdateInFieldData memory data = TestUpdateInFieldData("", "", "", "", "", "", ""); bytes32 table = keccak256("some.table"); - // Register table's schema + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT256, @@ -602,7 +602,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some key"); - // Register table's schema + // 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)); @@ -654,7 +654,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some key"); - // Register table's schema + // 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)); diff --git a/packages/store/test/tables/StoreHooks.t.sol b/packages/store/test/tables/StoreHooks.t.sol index ff347c9b86..5960dde364 100644 --- a/packages/store/test/tables/StoreHooks.t.sol +++ b/packages/store/test/tables/StoreHooks.t.sol @@ -8,7 +8,7 @@ import { StoreHooks } from "../../src/codegen/Tables.sol"; contract StoreHooksTest is Test, GasReporter, StoreMock { function testTable() public { - // StoreHooks schema is already registered by StoreCore + // StoreHooks table is already registered by StoreMock bytes32 key = keccak256("somekey"); bytes21[] memory hooks = new bytes21[](1); diff --git a/packages/store/ts/codegen/renderTable.ts b/packages/store/ts/codegen/renderTable.ts index cc19b244ef..8181133cfb 100644 --- a/packages/store/ts/codegen/renderTable.ts +++ b/packages/store/ts/codegen/renderTable.ts @@ -84,18 +84,18 @@ export function renderTable(options: RenderTableOptions) { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](${keyTuple.length}); - ${renderList(keyTuple, ({ enumName }, index) => `_schema[${index}] = SchemaType.${enumName};`)} + SchemaType[] memory _keySchema = new SchemaType[](${keyTuple.length}); + ${renderList(keyTuple, ({ enumName }, index) => `_keySchema[${index}] = SchemaType.${enumName};`)} - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](${fields.length}); - ${renderList(fields, ({ enumName }, index) => `_schema[${index}] = SchemaType.${enumName};`)} + SchemaType[] memory _valueSchema = new SchemaType[](${fields.length}); + ${renderList(fields, ({ enumName }, index) => `_valueSchema[${index}] = SchemaType.${enumName};`)} - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/store/ts/codegen/tableOptions.ts b/packages/store/ts/codegen/tableOptions.ts index 5dccb14aca..fa38785757 100644 --- a/packages/store/ts/codegen/tableOptions.ts +++ b/packages/store/ts/codegen/tableOptions.ts @@ -27,9 +27,9 @@ export function getTableOptions(config: StoreConfig): TableOptions[] { // struct adds methods to get/set all values at once const withStruct = tableData.dataStruct; // operate on all fields at once; for only 1 field keep them only if struct is also kept - const withRecordMethods = withStruct || Object.keys(tableData.schema).length > 1; + const withRecordMethods = withStruct || Object.keys(tableData.valueSchema).length > 1; // field methods can be simply get/set if there's only 1 field and no record methods - const noFieldMethodSuffix = !withRecordMethods && Object.keys(tableData.schema).length === 1; + const noFieldMethodSuffix = !withRecordMethods && Object.keys(tableData.valueSchema).length === 1; // list of any symbols that need to be imported const imports: RelativeImportDatum[] = []; @@ -50,8 +50,8 @@ export function getTableOptions(config: StoreConfig): TableOptions[] { return keyTuple; }); - const fields = Object.keys(tableData.schema).map((name) => { - const abiOrUserType = tableData.schema[name]; + const fields = Object.keys(tableData.valueSchema).map((name) => { + const abiOrUserType = tableData.valueSchema[name]; const { renderType, schemaType } = resolveAbiOrUserType(abiOrUserType, config); const importDatum = importForAbiOrUserType(abiOrUserType, tableData.directory, config); diff --git a/packages/store/ts/common.ts b/packages/store/ts/common.ts index 380709deec..5e6ce3e000 100644 --- a/packages/store/ts/common.ts +++ b/packages/store/ts/common.ts @@ -21,7 +21,7 @@ export type SchemaConfigToPrimitives = { export type ConfigToTablesPrimitives = { [key in keyof C["tables"]]: { key: SchemaConfigToPrimitives; - value: SchemaConfigToPrimitives; + value: SchemaConfigToPrimitives; }; }; diff --git a/packages/store/ts/config/storeConfig.ts b/packages/store/ts/config/storeConfig.ts index 6944b4f61b..bca792c804 100644 --- a/packages/store/ts/config/storeConfig.ts +++ b/packages/store/ts/config/storeConfig.ts @@ -87,17 +87,17 @@ export interface TableConfig< dataStruct?: boolean; /** Generate only `emitEphemeral` which emits an event without writing to storage. Default is false. */ ephemeral?: boolean; - /** Table's key schema names mapped to their types. Default is `{ key: "bytes32" }` */ + /** Table's key names mapped to their types. Default is `{ key: "bytes32" }` */ keySchema?: Record>; - /** Table's column names mapped to their types. Table name's 1st letter should be lowercase. */ - schema: SchemaConfig; + /** Table's field names mapped to their types. Table name's 1st letter should be lowercase. */ + valueSchema: SchemaConfig; } export type FullTableConfig< UserTypes extends StringForUnion = StringForUnion, StaticUserTypes extends StringForUnion = StringForUnion > = Required> & { - schema: FullSchemaConfig; + valueSchema: FullSchemaConfig; }; export interface ExpandTableConfig, TableName extends string> @@ -108,13 +108,13 @@ export interface ExpandTableConfig, TableN name: TableName; tableIdArgument: typeof TABLE_DEFAULTS.tableIdArgument; storeArgument: typeof TABLE_DEFAULTS.storeArgument; - // dataStruct isn't expanded, because its value is conditional on the number of schema fields + // dataStruct isn't expanded, because its value is conditional on the number of value schema fields dataStruct: boolean; keySchema: typeof TABLE_DEFAULTS.keySchema; ephemeral: typeof TABLE_DEFAULTS.ephemeral; } > { - schema: ExpandSchemaConfig; + valueSchema: ExpandSchemaConfig; } const zFullTableConfig = z @@ -125,12 +125,12 @@ const zFullTableConfig = z storeArgument: z.boolean().default(TABLE_DEFAULTS.storeArgument), dataStruct: z.boolean().optional(), keySchema: zKeySchema, - schema: zSchemaConfig, + valueSchema: zSchemaConfig, ephemeral: z.boolean().default(TABLE_DEFAULTS.ephemeral), }) .transform((arg) => { - // default dataStruct value depends on schema's length - if (Object.keys(arg.schema).length === 1) { + // default dataStruct value depends on value schema's length + if (Object.keys(arg.valueSchema).length === 1) { arg.dataStruct ??= false; } else { arg.dataStruct ??= true; @@ -140,7 +140,7 @@ const zFullTableConfig = z const zShorthandTableConfig = zFieldData.transform((fieldData) => { return zFullTableConfig.parse({ - schema: { + valueSchema: { value: fieldData, }, }); @@ -177,7 +177,7 @@ export type FullTablesConfig< export type ExpandTablesConfig> = { [TableName in keyof T]: T[TableName] extends FieldData - ? ExpandTableConfig<{ schema: { value: T[TableName] } }, TableName extends string ? TableName : never> + ? ExpandTableConfig<{ valueSchema: { value: T[TableName] } }, TableName extends string ? TableName : never> : T[TableName] extends TableConfig ? ExpandTableConfig : // Weakly typed values get a weakly typed expansion. @@ -290,7 +290,7 @@ function validateStoreConfig(config: z.output, ctx: // Local table variables must be unique within the table for (const table of Object.values(config.tables)) { const keySchemaNames = Object.keys(table.keySchema); - const fieldNames = Object.keys(table.schema); + const fieldNames = Object.keys(table.valueSchema); const duplicateVariableNames = getDuplicates([...keySchemaNames, ...fieldNames]); if (duplicateVariableNames.length > 0) { ctx.addIssue({ @@ -325,7 +325,7 @@ function validateStoreConfig(config: z.output, ctx: for (const keySchemaType of Object.values(table.keySchema)) { validateStaticAbiOrUserType(staticUserTypeNames, keySchemaType, ctx); } - for (const fieldType of Object.values(table.schema)) { + for (const fieldType of Object.values(table.valueSchema)) { validateAbiOrUserType(userTypeNames, staticUserTypeNames, fieldType, ctx); } } diff --git a/packages/store/ts/register/mudConfig.test-d.ts b/packages/store/ts/register/mudConfig.test-d.ts index 3e0c7c39a0..de08e2695b 100644 --- a/packages/store/ts/register/mudConfig.test-d.ts +++ b/packages/store/ts/register/mudConfig.test-d.ts @@ -12,12 +12,12 @@ describe("mudConfig", () => { keySchema: { a: "Enum1"; }; - schema: { + valueSchema: { b: "Enum2"; }; }; Table2: { - schema: { + valueSchema: { a: "uint32"; }; }; @@ -38,12 +38,12 @@ describe("mudConfig", () => { keySchema: { a: "Enum1"; }; - schema: { + valueSchema: { b: "Enum2"; }; }; Table2: { - schema: { + valueSchema: { a: "uint32"; }; }; diff --git a/packages/world/mud.config.ts b/packages/world/mud.config.ts index b23b1e0919..a043d644dd 100644 --- a/packages/world/mud.config.ts +++ b/packages/world/mud.config.ts @@ -15,7 +15,7 @@ export default mudConfig({ keySchema: { namespace: "bytes16", }, - schema: { + valueSchema: { owner: "address", }, }, @@ -24,7 +24,7 @@ export default mudConfig({ resourceSelector: "bytes32", caller: "address", }, - schema: { + valueSchema: { access: "bool", }, }, @@ -33,13 +33,13 @@ export default mudConfig({ moduleName: "bytes16", argumentsHash: "bytes32", // Hash of the params passed to the `install` function }, - schema: { + valueSchema: { moduleAddress: "address", }, // TODO: this is a workaround to use `getRecord` instead of `getField` in the autogen library, - // to allow using the table before it is registered. This is because `getRecord` passes the schema + // to allow using the table before it is registered. This is because `getRecord` passes the valueSchema // to store, while `getField` loads it from storage. Remove this once we have support for passing the - // schema in `getField` too. (See https://github.com/latticexyz/mud/issues/444) + // valueSchema in `getField` too. (See https://github.com/latticexyz/mud/issues/444) dataStruct: true, }, Delegations: { @@ -47,7 +47,7 @@ export default mudConfig({ delegator: "address", delegatee: "address", }, - schema: { + valueSchema: { delegationControlId: "bytes32", }, }, @@ -61,7 +61,7 @@ export default mudConfig({ keySchema: { namespace: "bytes16", }, - schema: { + valueSchema: { balance: "uint256", }, }, @@ -70,7 +70,7 @@ export default mudConfig({ keySchema: { resourceSelector: "bytes32", }, - schema: { + valueSchema: { system: "address", publicAccess: "bool", }, @@ -81,7 +81,7 @@ export default mudConfig({ keySchema: { system: "address", }, - schema: { + valueSchema: { resourceSelector: "bytes32", }, }, @@ -90,14 +90,14 @@ export default mudConfig({ keySchema: { resourceSelector: "bytes32", }, - schema: "bytes21[]", + valueSchema: "bytes21[]", }, ResourceType: { directory: "modules/core/tables", keySchema: { resourceSelector: "bytes32", }, - schema: { + valueSchema: { resourceType: "Resource", }, }, @@ -106,7 +106,7 @@ export default mudConfig({ keySchema: { functionSelector: "bytes4", }, - schema: { + valueSchema: { resourceSelector: "bytes32", systemFunctionSelector: "bytes4", }, @@ -117,7 +117,7 @@ export default mudConfig({ keySchema: { valueHash: "bytes32", }, - schema: { + valueSchema: { keysWithValue: "bytes32[]", // For now only supports 1 key per value }, tableIdArgument: true, @@ -125,7 +125,7 @@ export default mudConfig({ KeysInTable: { directory: "modules/keysintable/tables", keySchema: { sourceTable: "bytes32" }, - schema: { + valueSchema: { keys0: "bytes32[]", keys1: "bytes32[]", keys2: "bytes32[]", @@ -139,13 +139,13 @@ export default mudConfig({ sourceTable: "bytes32", keysHash: "bytes32", }, - schema: { has: "bool", index: "uint40" }, + valueSchema: { has: "bool", index: "uint40" }, dataStruct: false, }, UniqueEntity: { directory: "modules/uniqueentity/tables", keySchema: {}, - schema: "uint256", + valueSchema: "uint256", tableIdArgument: true, storeArgument: true, }, @@ -157,7 +157,7 @@ export default mudConfig({ resourceSelector: "bytes32", funcSelectorAndArgsHash: "bytes32", }, - schema: { + valueSchema: { availableCalls: "uint256", }, }, @@ -167,7 +167,7 @@ export default mudConfig({ delegator: "address", delegatee: "address", }, - schema: { + valueSchema: { maxTimestamp: "uint256", }, }, @@ -179,14 +179,14 @@ export default mudConfig({ Bool: { directory: "../test/tables", keySchema: {}, - schema: { + valueSchema: { value: "bool", }, tableIdArgument: true, }, AddressArray: { directory: "../test/tables", - schema: "address[]", + valueSchema: "address[]", tableIdArgument: true, }, }, diff --git a/packages/world/src/modules/core/implementations/StoreRegistrationSystem.sol b/packages/world/src/modules/core/implementations/StoreRegistrationSystem.sol index 6281cab124..00a5d3017c 100644 --- a/packages/world/src/modules/core/implementations/StoreRegistrationSystem.sol +++ b/packages/world/src/modules/core/implementations/StoreRegistrationSystem.sol @@ -34,7 +34,7 @@ contract StoreRegistrationSystem is System, IWorldErrors { using ResourceSelector for bytes32; /** - * Register a table with given schema in the given namespace + * Register a table with the given config */ function registerTable( bytes32 resourceSelector, @@ -72,7 +72,7 @@ contract StoreRegistrationSystem is System, IWorldErrors { // Store the table resource type ResourceType.set(resourceSelector, Resource.TABLE); - // Register the table's schema + // Register the table StoreCore.registerTable(resourceSelector, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); } diff --git a/packages/world/src/modules/keysintable/getKeysInTable.sol b/packages/world/src/modules/keysintable/getKeysInTable.sol index 9cdfb1abe0..c6b709f5fc 100644 --- a/packages/world/src/modules/keysintable/getKeysInTable.sol +++ b/packages/world/src/modules/keysintable/getKeysInTable.sol @@ -18,14 +18,13 @@ function getKeysInTable(bytes32 tableId) view returns (bytes32[][] memory keyTup * Note: this module only supports up to 5 composite keys. */ - Schema schema = StoreSwitch.getKeySchema(tableId); - - uint256 numFields = schema.numFields(); + Schema keySchema = StoreSwitch.getKeySchema(tableId); + uint256 numFields = keySchema.numFields(); uint256 length = KeysInTable.lengthKeys0(tableId); keyTuples = new bytes32[][](length); for (uint256 i; i < length; i++) { - keyTuples[i] = new bytes32[](numFields); // the length of the key tuple depends on the schema + keyTuples[i] = new bytes32[](numFields); // the length of the key tuple depends on the key schema if (numFields > 0) { keyTuples[i][0] = KeysInTable.getItemKeys0(tableId, i); @@ -53,14 +52,14 @@ function getKeysInTable(IStore store, bytes32 tableId) view returns (bytes32[][] * Note: this module only supports up to 5 composite keys. */ - Schema schema = store.getKeySchema(tableId); + Schema keySchema = store.getKeySchema(tableId); - uint256 numFields = schema.numFields(); + uint256 numFields = keySchema.numFields(); uint256 length = KeysInTable.lengthKeys0(store, tableId); keyTuples = new bytes32[][](length); for (uint256 i; i < length; i++) { - keyTuples[i] = new bytes32[](numFields); // the length of the key tuple depends on the schema + keyTuples[i] = new bytes32[](numFields); // the length of the key tuple depends on the key schema if (numFields > 0) { keyTuples[i][0] = KeysInTable.getItemKeys0(store, tableId, i); diff --git a/packages/world/ts/register/index.test.ts b/packages/world/ts/register/index.test.ts index 454855a828..71d4d0c8e7 100644 --- a/packages/world/ts/register/index.test.ts +++ b/packages/world/ts/register/index.test.ts @@ -8,7 +8,7 @@ test("resolveWorldConfig requires unique table and system names", () => { mudConfig({ tables: { Selector: { - schema: "uint256", + valueSchema: "uint256", }, }, systems: { diff --git a/templates/phaser/packages/contracts/mud.config.ts b/templates/phaser/packages/contracts/mud.config.ts index 1dc8d7e90f..70edda1693 100644 --- a/templates/phaser/packages/contracts/mud.config.ts +++ b/templates/phaser/packages/contracts/mud.config.ts @@ -4,7 +4,7 @@ export default mudConfig({ tables: { Counter: { keySchema: {}, - schema: "uint32", + valueSchema: "uint32", }, }, }); diff --git a/templates/threejs/packages/contracts/mud.config.ts b/templates/threejs/packages/contracts/mud.config.ts index 3a04487138..6ee5c6a809 100644 --- a/templates/threejs/packages/contracts/mud.config.ts +++ b/templates/threejs/packages/contracts/mud.config.ts @@ -3,7 +3,7 @@ import { mudConfig } from "@latticexyz/world/register"; export default mudConfig({ tables: { Position: { - schema: { + valueSchema: { x: "int32", y: "int32", z: "int32", diff --git a/templates/vanilla/packages/contracts/mud.config.ts b/templates/vanilla/packages/contracts/mud.config.ts index 1dc8d7e90f..70edda1693 100644 --- a/templates/vanilla/packages/contracts/mud.config.ts +++ b/templates/vanilla/packages/contracts/mud.config.ts @@ -4,7 +4,7 @@ export default mudConfig({ tables: { Counter: { keySchema: {}, - schema: "uint32", + valueSchema: "uint32", }, }, }); From 3310148b29be68834bd63536123562c3ab6e8181 Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 13:16:32 +0100 Subject: [PATCH 02/28] rebuild --- .../contracts/src/codegen/tables/Multi.sol | 20 +++++----- .../contracts/src/codegen/tables/Number.sol | 12 +++--- .../src/codegen/tables/NumberList.sol | 10 ++--- .../contracts/src/codegen/tables/Vector.sol | 14 +++---- .../src/codegen/tables/CounterTable.sol | 10 ++--- .../src/codegen/tables/Inventory.sol | 16 ++++---- .../src/codegen/tables/MessageTable.sol | 10 ++--- .../src/codegen/tables/Dynamics1.sol | 22 +++++------ .../src/codegen/tables/Dynamics2.sol | 16 ++++---- .../src/codegen/tables/Ephemeral.sol | 12 +++--- .../src/codegen/tables/Singleton.sol | 16 ++++---- .../contracts/src/codegen/tables/Statics.sol | 38 +++++++++---------- .../store/src/codegen/tables/Callbacks.sol | 12 +++--- packages/store/src/codegen/tables/Hooks.sol | 12 +++--- .../store/src/codegen/tables/KeyEncoding.sol | 22 +++++------ packages/store/src/codegen/tables/Mixed.sol | 18 ++++----- .../store/src/codegen/tables/StoreHooks.sol | 12 +++--- packages/store/src/codegen/tables/Tables.sol | 22 +++++------ packages/store/src/codegen/tables/Vector2.sol | 14 +++---- .../src/modules/core/tables/Balances.sol | 12 +++--- .../modules/core/tables/FunctionSelectors.sol | 14 +++---- .../src/modules/core/tables/ResourceType.sol | 12 +++--- .../src/modules/core/tables/SystemHooks.sol | 12 +++--- .../modules/core/tables/SystemRegistry.sol | 12 +++--- .../world/src/modules/core/tables/Systems.sol | 14 +++---- .../keysintable/tables/KeysInTable.sol | 22 +++++------ .../keysintable/tables/UsedKeysIndex.sol | 16 ++++---- .../keyswithvalue/tables/KeysWithValue.sol | 12 +++--- .../tables/CallboundDelegations.sol | 18 ++++----- .../tables/TimeboundDelegations.sol | 14 +++---- .../uniqueentity/tables/UniqueEntity.sol | 10 ++--- packages/world/src/tables/Delegations.sol | 14 +++---- .../world/src/tables/InstalledModules.sol | 14 +++---- packages/world/src/tables/NamespaceOwner.sol | 12 +++--- packages/world/src/tables/ResourceAccess.sol | 14 +++---- packages/world/test/tables/AddressArray.sol | 12 +++--- packages/world/test/tables/Bool.sol | 10 ++--- .../contracts/src/codegen/tables/Counter.sol | 10 ++--- .../react/packages/contracts/mud.config.ts | 2 +- .../contracts/src/codegen/tables/Counter.sol | 10 ++--- .../contracts/src/codegen/tables/Position.sol | 16 ++++---- .../contracts/src/codegen/tables/Counter.sol | 10 ++--- 42 files changed, 300 insertions(+), 300 deletions(-) diff --git a/e2e/packages/contracts/src/codegen/tables/Multi.sol b/e2e/packages/contracts/src/codegen/tables/Multi.sol index 873f71588f..a634403932 100644 --- a/e2e/packages/contracts/src/codegen/tables/Multi.sol +++ b/e2e/packages/contracts/src/codegen/tables/Multi.sol @@ -38,22 +38,22 @@ library Multi { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](4); - _schema[0] = SchemaType.UINT32; - _schema[1] = SchemaType.BOOL; - _schema[2] = SchemaType.UINT256; - _schema[3] = SchemaType.INT120; + SchemaType[] memory _keySchema = new SchemaType[](4); + _keySchema[0] = SchemaType.UINT32; + _keySchema[1] = SchemaType.BOOL; + _keySchema[2] = SchemaType.UINT256; + _keySchema[3] = SchemaType.INT120; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](2); - _schema[0] = SchemaType.INT256; - _schema[1] = SchemaType.BOOL; + SchemaType[] memory _valueSchema = new SchemaType[](2); + _valueSchema[0] = SchemaType.INT256; + _valueSchema[1] = SchemaType.BOOL; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/e2e/packages/contracts/src/codegen/tables/Number.sol b/e2e/packages/contracts/src/codegen/tables/Number.sol index 40ac16b6df..01127f809c 100644 --- a/e2e/packages/contracts/src/codegen/tables/Number.sol +++ b/e2e/packages/contracts/src/codegen/tables/Number.sol @@ -32,18 +32,18 @@ library Number { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.UINT32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT32; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/e2e/packages/contracts/src/codegen/tables/NumberList.sol b/e2e/packages/contracts/src/codegen/tables/NumberList.sol index c3bd7fdaa6..60d34cc507 100644 --- a/e2e/packages/contracts/src/codegen/tables/NumberList.sol +++ b/e2e/packages/contracts/src/codegen/tables/NumberList.sol @@ -31,17 +31,17 @@ library NumberList { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](0); + SchemaType[] memory _keySchema = new SchemaType[](0); - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT32_ARRAY; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT32_ARRAY; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/e2e/packages/contracts/src/codegen/tables/Vector.sol b/e2e/packages/contracts/src/codegen/tables/Vector.sol index 5b95bbaaa5..e258fac50c 100644 --- a/e2e/packages/contracts/src/codegen/tables/Vector.sol +++ b/e2e/packages/contracts/src/codegen/tables/Vector.sol @@ -38,19 +38,19 @@ library Vector { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.UINT32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](2); - _schema[0] = SchemaType.INT32; - _schema[1] = SchemaType.INT32; + SchemaType[] memory _valueSchema = new SchemaType[](2); + _valueSchema[0] = SchemaType.INT32; + _valueSchema[1] = SchemaType.INT32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/examples/minimal/packages/contracts/src/codegen/tables/CounterTable.sol b/examples/minimal/packages/contracts/src/codegen/tables/CounterTable.sol index d21d510f08..ed4f112789 100644 --- a/examples/minimal/packages/contracts/src/codegen/tables/CounterTable.sol +++ b/examples/minimal/packages/contracts/src/codegen/tables/CounterTable.sol @@ -32,17 +32,17 @@ library CounterTable { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](0); + SchemaType[] memory _keySchema = new SchemaType[](0); - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT32; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/examples/minimal/packages/contracts/src/codegen/tables/Inventory.sol b/examples/minimal/packages/contracts/src/codegen/tables/Inventory.sol index 65a36496d5..96df3c93dd 100644 --- a/examples/minimal/packages/contracts/src/codegen/tables/Inventory.sol +++ b/examples/minimal/packages/contracts/src/codegen/tables/Inventory.sol @@ -32,20 +32,20 @@ library Inventory { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](3); - _schema[0] = SchemaType.ADDRESS; - _schema[1] = SchemaType.UINT32; - _schema[2] = SchemaType.UINT32; + SchemaType[] memory _keySchema = new SchemaType[](3); + _keySchema[0] = SchemaType.ADDRESS; + _keySchema[1] = SchemaType.UINT32; + _keySchema[2] = SchemaType.UINT32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT32; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/examples/minimal/packages/contracts/src/codegen/tables/MessageTable.sol b/examples/minimal/packages/contracts/src/codegen/tables/MessageTable.sol index 849483b418..5fe5d13250 100644 --- a/examples/minimal/packages/contracts/src/codegen/tables/MessageTable.sol +++ b/examples/minimal/packages/contracts/src/codegen/tables/MessageTable.sol @@ -31,17 +31,17 @@ library MessageTable { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](0); + SchemaType[] memory _keySchema = new SchemaType[](0); - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.STRING; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.STRING; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/cli/contracts/src/codegen/tables/Dynamics1.sol b/packages/cli/contracts/src/codegen/tables/Dynamics1.sol index 177f030fde..368c3b73f4 100644 --- a/packages/cli/contracts/src/codegen/tables/Dynamics1.sol +++ b/packages/cli/contracts/src/codegen/tables/Dynamics1.sol @@ -39,22 +39,22 @@ library Dynamics1 { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](5); - _schema[0] = SchemaType.BYTES32_ARRAY; - _schema[1] = SchemaType.INT32_ARRAY; - _schema[2] = SchemaType.UINT128_ARRAY; - _schema[3] = SchemaType.ADDRESS_ARRAY; - _schema[4] = SchemaType.BOOL_ARRAY; - - return SchemaLib.encode(_schema); + SchemaType[] memory _valueSchema = new SchemaType[](5); + _valueSchema[0] = SchemaType.BYTES32_ARRAY; + _valueSchema[1] = SchemaType.INT32_ARRAY; + _valueSchema[2] = SchemaType.UINT128_ARRAY; + _valueSchema[3] = SchemaType.ADDRESS_ARRAY; + _valueSchema[4] = SchemaType.BOOL_ARRAY; + + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/cli/contracts/src/codegen/tables/Dynamics2.sol b/packages/cli/contracts/src/codegen/tables/Dynamics2.sol index 7b9dfd6f1a..3bcbe30cd3 100644 --- a/packages/cli/contracts/src/codegen/tables/Dynamics2.sol +++ b/packages/cli/contracts/src/codegen/tables/Dynamics2.sol @@ -37,20 +37,20 @@ library Dynamics2 { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](3); - _schema[0] = SchemaType.UINT64_ARRAY; - _schema[1] = SchemaType.STRING; - _schema[2] = SchemaType.BYTES; + SchemaType[] memory _valueSchema = new SchemaType[](3); + _valueSchema[0] = SchemaType.UINT64_ARRAY; + _valueSchema[1] = SchemaType.STRING; + _valueSchema[2] = SchemaType.BYTES; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/cli/contracts/src/codegen/tables/Ephemeral.sol b/packages/cli/contracts/src/codegen/tables/Ephemeral.sol index 61225beb79..0f9cec20cc 100644 --- a/packages/cli/contracts/src/codegen/tables/Ephemeral.sol +++ b/packages/cli/contracts/src/codegen/tables/Ephemeral.sol @@ -32,18 +32,18 @@ library Ephemeral { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT256; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT256; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/cli/contracts/src/codegen/tables/Singleton.sol b/packages/cli/contracts/src/codegen/tables/Singleton.sol index 2c8f5b0f95..c309eedd60 100644 --- a/packages/cli/contracts/src/codegen/tables/Singleton.sol +++ b/packages/cli/contracts/src/codegen/tables/Singleton.sol @@ -32,20 +32,20 @@ library Singleton { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](0); + SchemaType[] memory _keySchema = new SchemaType[](0); - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](4); - _schema[0] = SchemaType.INT256; - _schema[1] = SchemaType.UINT32_ARRAY; - _schema[2] = SchemaType.UINT32_ARRAY; - _schema[3] = SchemaType.UINT32_ARRAY; + SchemaType[] memory _valueSchema = new SchemaType[](4); + _valueSchema[0] = SchemaType.INT256; + _valueSchema[1] = SchemaType.UINT32_ARRAY; + _valueSchema[2] = SchemaType.UINT32_ARRAY; + _valueSchema[3] = SchemaType.UINT32_ARRAY; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/cli/contracts/src/codegen/tables/Statics.sol b/packages/cli/contracts/src/codegen/tables/Statics.sol index e2af928e82..089552188c 100644 --- a/packages/cli/contracts/src/codegen/tables/Statics.sol +++ b/packages/cli/contracts/src/codegen/tables/Statics.sol @@ -51,30 +51,30 @@ library Statics { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](7); - _schema[0] = SchemaType.UINT256; - _schema[1] = SchemaType.INT32; - _schema[2] = SchemaType.BYTES16; - _schema[3] = SchemaType.ADDRESS; - _schema[4] = SchemaType.BOOL; - _schema[5] = SchemaType.UINT8; - _schema[6] = SchemaType.UINT8; + SchemaType[] memory _keySchema = new SchemaType[](7); + _keySchema[0] = SchemaType.UINT256; + _keySchema[1] = SchemaType.INT32; + _keySchema[2] = SchemaType.BYTES16; + _keySchema[3] = SchemaType.ADDRESS; + _keySchema[4] = SchemaType.BOOL; + _keySchema[5] = SchemaType.UINT8; + _keySchema[6] = SchemaType.UINT8; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](7); - _schema[0] = SchemaType.UINT256; - _schema[1] = SchemaType.INT32; - _schema[2] = SchemaType.BYTES16; - _schema[3] = SchemaType.ADDRESS; - _schema[4] = SchemaType.BOOL; - _schema[5] = SchemaType.UINT8; - _schema[6] = SchemaType.UINT8; - - return SchemaLib.encode(_schema); + SchemaType[] memory _valueSchema = new SchemaType[](7); + _valueSchema[0] = SchemaType.UINT256; + _valueSchema[1] = SchemaType.INT32; + _valueSchema[2] = SchemaType.BYTES16; + _valueSchema[3] = SchemaType.ADDRESS; + _valueSchema[4] = SchemaType.BOOL; + _valueSchema[5] = SchemaType.UINT8; + _valueSchema[6] = SchemaType.UINT8; + + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/store/src/codegen/tables/Callbacks.sol b/packages/store/src/codegen/tables/Callbacks.sol index f43519c60d..0126d86c18 100644 --- a/packages/store/src/codegen/tables/Callbacks.sol +++ b/packages/store/src/codegen/tables/Callbacks.sol @@ -31,18 +31,18 @@ library Callbacks { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES24_ARRAY; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.BYTES24_ARRAY; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/store/src/codegen/tables/Hooks.sol b/packages/store/src/codegen/tables/Hooks.sol index 8fca4a03b7..242d5c9730 100644 --- a/packages/store/src/codegen/tables/Hooks.sol +++ b/packages/store/src/codegen/tables/Hooks.sol @@ -28,18 +28,18 @@ library Hooks { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES21_ARRAY; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.BYTES21_ARRAY; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/store/src/codegen/tables/KeyEncoding.sol b/packages/store/src/codegen/tables/KeyEncoding.sol index 43d4ca2cce..f2344cf382 100644 --- a/packages/store/src/codegen/tables/KeyEncoding.sol +++ b/packages/store/src/codegen/tables/KeyEncoding.sol @@ -35,23 +35,23 @@ library KeyEncoding { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](6); - _schema[0] = SchemaType.UINT256; - _schema[1] = SchemaType.INT32; - _schema[2] = SchemaType.BYTES16; - _schema[3] = SchemaType.ADDRESS; - _schema[4] = SchemaType.BOOL; - _schema[5] = SchemaType.UINT8; + SchemaType[] memory _keySchema = new SchemaType[](6); + _keySchema[0] = SchemaType.UINT256; + _keySchema[1] = SchemaType.INT32; + _keySchema[2] = SchemaType.BYTES16; + _keySchema[3] = SchemaType.ADDRESS; + _keySchema[4] = SchemaType.BOOL; + _keySchema[5] = SchemaType.UINT8; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BOOL; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.BOOL; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/store/src/codegen/tables/Mixed.sol b/packages/store/src/codegen/tables/Mixed.sol index bba29cecd6..22f664c8e1 100644 --- a/packages/store/src/codegen/tables/Mixed.sol +++ b/packages/store/src/codegen/tables/Mixed.sol @@ -40,21 +40,21 @@ library Mixed { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](4); - _schema[0] = SchemaType.UINT32; - _schema[1] = SchemaType.UINT128; - _schema[2] = SchemaType.UINT32_ARRAY; - _schema[3] = SchemaType.STRING; + SchemaType[] memory _valueSchema = new SchemaType[](4); + _valueSchema[0] = SchemaType.UINT32; + _valueSchema[1] = SchemaType.UINT128; + _valueSchema[2] = SchemaType.UINT32_ARRAY; + _valueSchema[3] = SchemaType.STRING; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/store/src/codegen/tables/StoreHooks.sol b/packages/store/src/codegen/tables/StoreHooks.sol index 2168293bce..9b84a3549e 100644 --- a/packages/store/src/codegen/tables/StoreHooks.sol +++ b/packages/store/src/codegen/tables/StoreHooks.sol @@ -31,18 +31,18 @@ library StoreHooks { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES21_ARRAY; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.BYTES21_ARRAY; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/store/src/codegen/tables/Tables.sol b/packages/store/src/codegen/tables/Tables.sol index 535a57a44f..fc82b0dedb 100644 --- a/packages/store/src/codegen/tables/Tables.sol +++ b/packages/store/src/codegen/tables/Tables.sol @@ -42,22 +42,22 @@ library Tables { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](5); - _schema[0] = SchemaType.BYTES32; - _schema[1] = SchemaType.BYTES32; - _schema[2] = SchemaType.BYTES32; - _schema[3] = SchemaType.BYTES; - _schema[4] = SchemaType.BYTES; - - return SchemaLib.encode(_schema); + SchemaType[] memory _valueSchema = new SchemaType[](5); + _valueSchema[0] = SchemaType.BYTES32; + _valueSchema[1] = SchemaType.BYTES32; + _valueSchema[2] = SchemaType.BYTES32; + _valueSchema[3] = SchemaType.BYTES; + _valueSchema[4] = SchemaType.BYTES; + + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/store/src/codegen/tables/Vector2.sol b/packages/store/src/codegen/tables/Vector2.sol index 518695ee86..82a58d420b 100644 --- a/packages/store/src/codegen/tables/Vector2.sol +++ b/packages/store/src/codegen/tables/Vector2.sol @@ -38,19 +38,19 @@ library Vector2 { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](2); - _schema[0] = SchemaType.UINT32; - _schema[1] = SchemaType.UINT32; + SchemaType[] memory _valueSchema = new SchemaType[](2); + _valueSchema[0] = SchemaType.UINT32; + _valueSchema[1] = SchemaType.UINT32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/modules/core/tables/Balances.sol b/packages/world/src/modules/core/tables/Balances.sol index c1ccd74606..76f03b4f3c 100644 --- a/packages/world/src/modules/core/tables/Balances.sol +++ b/packages/world/src/modules/core/tables/Balances.sol @@ -32,18 +32,18 @@ library Balances { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES16; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES16; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT256; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT256; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/modules/core/tables/FunctionSelectors.sol b/packages/world/src/modules/core/tables/FunctionSelectors.sol index 70b3329a17..e3023b3273 100644 --- a/packages/world/src/modules/core/tables/FunctionSelectors.sol +++ b/packages/world/src/modules/core/tables/FunctionSelectors.sol @@ -33,19 +33,19 @@ library FunctionSelectors { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES4; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES4; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](2); - _schema[0] = SchemaType.BYTES32; - _schema[1] = SchemaType.BYTES4; + SchemaType[] memory _valueSchema = new SchemaType[](2); + _valueSchema[0] = SchemaType.BYTES32; + _valueSchema[1] = SchemaType.BYTES4; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/modules/core/tables/ResourceType.sol b/packages/world/src/modules/core/tables/ResourceType.sol index cf99407ecf..45ba98b6fb 100644 --- a/packages/world/src/modules/core/tables/ResourceType.sol +++ b/packages/world/src/modules/core/tables/ResourceType.sol @@ -35,18 +35,18 @@ library ResourceType { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT8; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT8; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/modules/core/tables/SystemHooks.sol b/packages/world/src/modules/core/tables/SystemHooks.sol index 891623d6b4..0bb1d03e8a 100644 --- a/packages/world/src/modules/core/tables/SystemHooks.sol +++ b/packages/world/src/modules/core/tables/SystemHooks.sol @@ -31,18 +31,18 @@ library SystemHooks { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES21_ARRAY; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.BYTES21_ARRAY; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/modules/core/tables/SystemRegistry.sol b/packages/world/src/modules/core/tables/SystemRegistry.sol index d560340662..1bae5fb67b 100644 --- a/packages/world/src/modules/core/tables/SystemRegistry.sol +++ b/packages/world/src/modules/core/tables/SystemRegistry.sol @@ -32,18 +32,18 @@ library SystemRegistry { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.ADDRESS; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.ADDRESS; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/modules/core/tables/Systems.sol b/packages/world/src/modules/core/tables/Systems.sol index 1be8fb6223..fa6622d37e 100644 --- a/packages/world/src/modules/core/tables/Systems.sol +++ b/packages/world/src/modules/core/tables/Systems.sol @@ -33,19 +33,19 @@ library Systems { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](2); - _schema[0] = SchemaType.ADDRESS; - _schema[1] = SchemaType.BOOL; + SchemaType[] memory _valueSchema = new SchemaType[](2); + _valueSchema[0] = SchemaType.ADDRESS; + _valueSchema[1] = SchemaType.BOOL; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/modules/keysintable/tables/KeysInTable.sol b/packages/world/src/modules/keysintable/tables/KeysInTable.sol index 0840d6c228..fe4a0ef4f6 100644 --- a/packages/world/src/modules/keysintable/tables/KeysInTable.sol +++ b/packages/world/src/modules/keysintable/tables/KeysInTable.sol @@ -39,22 +39,22 @@ library KeysInTable { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](5); - _schema[0] = SchemaType.BYTES32_ARRAY; - _schema[1] = SchemaType.BYTES32_ARRAY; - _schema[2] = SchemaType.BYTES32_ARRAY; - _schema[3] = SchemaType.BYTES32_ARRAY; - _schema[4] = SchemaType.BYTES32_ARRAY; - - return SchemaLib.encode(_schema); + SchemaType[] memory _valueSchema = new SchemaType[](5); + _valueSchema[0] = SchemaType.BYTES32_ARRAY; + _valueSchema[1] = SchemaType.BYTES32_ARRAY; + _valueSchema[2] = SchemaType.BYTES32_ARRAY; + _valueSchema[3] = SchemaType.BYTES32_ARRAY; + _valueSchema[4] = SchemaType.BYTES32_ARRAY; + + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/modules/keysintable/tables/UsedKeysIndex.sol b/packages/world/src/modules/keysintable/tables/UsedKeysIndex.sol index 724610a783..b29e54cab8 100644 --- a/packages/world/src/modules/keysintable/tables/UsedKeysIndex.sol +++ b/packages/world/src/modules/keysintable/tables/UsedKeysIndex.sol @@ -33,20 +33,20 @@ library UsedKeysIndex { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](2); - _schema[0] = SchemaType.BYTES32; - _schema[1] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](2); + _keySchema[0] = SchemaType.BYTES32; + _keySchema[1] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](2); - _schema[0] = SchemaType.BOOL; - _schema[1] = SchemaType.UINT40; + SchemaType[] memory _valueSchema = new SchemaType[](2); + _valueSchema[0] = SchemaType.BOOL; + _valueSchema[1] = SchemaType.UINT40; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/modules/keyswithvalue/tables/KeysWithValue.sol b/packages/world/src/modules/keyswithvalue/tables/KeysWithValue.sol index 7ef033db5b..2ae73a6568 100644 --- a/packages/world/src/modules/keyswithvalue/tables/KeysWithValue.sol +++ b/packages/world/src/modules/keyswithvalue/tables/KeysWithValue.sol @@ -28,18 +28,18 @@ library KeysWithValue { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32_ARRAY; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.BYTES32_ARRAY; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/modules/std-delegations/tables/CallboundDelegations.sol b/packages/world/src/modules/std-delegations/tables/CallboundDelegations.sol index 3f582631db..a2f0f2519b 100644 --- a/packages/world/src/modules/std-delegations/tables/CallboundDelegations.sol +++ b/packages/world/src/modules/std-delegations/tables/CallboundDelegations.sol @@ -32,21 +32,21 @@ library CallboundDelegations { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](4); - _schema[0] = SchemaType.ADDRESS; - _schema[1] = SchemaType.ADDRESS; - _schema[2] = SchemaType.BYTES32; - _schema[3] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](4); + _keySchema[0] = SchemaType.ADDRESS; + _keySchema[1] = SchemaType.ADDRESS; + _keySchema[2] = SchemaType.BYTES32; + _keySchema[3] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT256; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT256; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/modules/std-delegations/tables/TimeboundDelegations.sol b/packages/world/src/modules/std-delegations/tables/TimeboundDelegations.sol index 40fd73e643..27a2552404 100644 --- a/packages/world/src/modules/std-delegations/tables/TimeboundDelegations.sol +++ b/packages/world/src/modules/std-delegations/tables/TimeboundDelegations.sol @@ -32,19 +32,19 @@ library TimeboundDelegations { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](2); - _schema[0] = SchemaType.ADDRESS; - _schema[1] = SchemaType.ADDRESS; + SchemaType[] memory _keySchema = new SchemaType[](2); + _keySchema[0] = SchemaType.ADDRESS; + _keySchema[1] = SchemaType.ADDRESS; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT256; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT256; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/modules/uniqueentity/tables/UniqueEntity.sol b/packages/world/src/modules/uniqueentity/tables/UniqueEntity.sol index 7adfa3d80d..092bde6646 100644 --- a/packages/world/src/modules/uniqueentity/tables/UniqueEntity.sol +++ b/packages/world/src/modules/uniqueentity/tables/UniqueEntity.sol @@ -29,17 +29,17 @@ library UniqueEntity { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](0); + SchemaType[] memory _keySchema = new SchemaType[](0); - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT256; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT256; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/tables/Delegations.sol b/packages/world/src/tables/Delegations.sol index bdc5bf5f4f..5889c445bd 100644 --- a/packages/world/src/tables/Delegations.sol +++ b/packages/world/src/tables/Delegations.sol @@ -32,19 +32,19 @@ library Delegations { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](2); - _schema[0] = SchemaType.ADDRESS; - _schema[1] = SchemaType.ADDRESS; + SchemaType[] memory _keySchema = new SchemaType[](2); + _keySchema[0] = SchemaType.ADDRESS; + _keySchema[1] = SchemaType.ADDRESS; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/tables/InstalledModules.sol b/packages/world/src/tables/InstalledModules.sol index 9a010b508d..9a03d507fa 100644 --- a/packages/world/src/tables/InstalledModules.sol +++ b/packages/world/src/tables/InstalledModules.sol @@ -36,19 +36,19 @@ library InstalledModules { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](2); - _schema[0] = SchemaType.BYTES16; - _schema[1] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](2); + _keySchema[0] = SchemaType.BYTES16; + _keySchema[1] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.ADDRESS; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.ADDRESS; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/tables/NamespaceOwner.sol b/packages/world/src/tables/NamespaceOwner.sol index 3a57ea199a..54033da9dd 100644 --- a/packages/world/src/tables/NamespaceOwner.sol +++ b/packages/world/src/tables/NamespaceOwner.sol @@ -32,18 +32,18 @@ library NamespaceOwner { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES16; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES16; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.ADDRESS; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.ADDRESS; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/src/tables/ResourceAccess.sol b/packages/world/src/tables/ResourceAccess.sol index 529c849038..f53abae8e7 100644 --- a/packages/world/src/tables/ResourceAccess.sol +++ b/packages/world/src/tables/ResourceAccess.sol @@ -32,19 +32,19 @@ library ResourceAccess { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](2); - _schema[0] = SchemaType.BYTES32; - _schema[1] = SchemaType.ADDRESS; + SchemaType[] memory _keySchema = new SchemaType[](2); + _keySchema[0] = SchemaType.BYTES32; + _keySchema[1] = SchemaType.ADDRESS; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BOOL; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.BOOL; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/test/tables/AddressArray.sol b/packages/world/test/tables/AddressArray.sol index 1daf1d0d6c..004e97be40 100644 --- a/packages/world/test/tables/AddressArray.sol +++ b/packages/world/test/tables/AddressArray.sol @@ -28,18 +28,18 @@ library AddressArray { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.ADDRESS_ARRAY; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.ADDRESS_ARRAY; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/packages/world/test/tables/Bool.sol b/packages/world/test/tables/Bool.sol index 73f02fd1af..955432d6b9 100644 --- a/packages/world/test/tables/Bool.sol +++ b/packages/world/test/tables/Bool.sol @@ -29,17 +29,17 @@ library Bool { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](0); + SchemaType[] memory _keySchema = new SchemaType[](0); - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BOOL; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.BOOL; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/templates/phaser/packages/contracts/src/codegen/tables/Counter.sol b/templates/phaser/packages/contracts/src/codegen/tables/Counter.sol index afb08c8ee5..302b905c36 100644 --- a/templates/phaser/packages/contracts/src/codegen/tables/Counter.sol +++ b/templates/phaser/packages/contracts/src/codegen/tables/Counter.sol @@ -32,17 +32,17 @@ library Counter { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](0); + SchemaType[] memory _keySchema = new SchemaType[](0); - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT32; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/templates/react/packages/contracts/mud.config.ts b/templates/react/packages/contracts/mud.config.ts index 1dc8d7e90f..70edda1693 100644 --- a/templates/react/packages/contracts/mud.config.ts +++ b/templates/react/packages/contracts/mud.config.ts @@ -4,7 +4,7 @@ export default mudConfig({ tables: { Counter: { keySchema: {}, - schema: "uint32", + valueSchema: "uint32", }, }, }); diff --git a/templates/react/packages/contracts/src/codegen/tables/Counter.sol b/templates/react/packages/contracts/src/codegen/tables/Counter.sol index afb08c8ee5..302b905c36 100644 --- a/templates/react/packages/contracts/src/codegen/tables/Counter.sol +++ b/templates/react/packages/contracts/src/codegen/tables/Counter.sol @@ -32,17 +32,17 @@ library Counter { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](0); + SchemaType[] memory _keySchema = new SchemaType[](0); - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT32; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/templates/threejs/packages/contracts/src/codegen/tables/Position.sol b/templates/threejs/packages/contracts/src/codegen/tables/Position.sol index ab4731aba7..fa15b967dc 100644 --- a/templates/threejs/packages/contracts/src/codegen/tables/Position.sol +++ b/templates/threejs/packages/contracts/src/codegen/tables/Position.sol @@ -40,20 +40,20 @@ library Position { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.BYTES32; + SchemaType[] memory _keySchema = new SchemaType[](1); + _keySchema[0] = SchemaType.BYTES32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](3); - _schema[0] = SchemaType.INT32; - _schema[1] = SchemaType.INT32; - _schema[2] = SchemaType.INT32; + SchemaType[] memory _valueSchema = new SchemaType[](3); + _valueSchema[0] = SchemaType.INT32; + _valueSchema[1] = SchemaType.INT32; + _valueSchema[2] = SchemaType.INT32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ diff --git a/templates/vanilla/packages/contracts/src/codegen/tables/Counter.sol b/templates/vanilla/packages/contracts/src/codegen/tables/Counter.sol index afb08c8ee5..302b905c36 100644 --- a/templates/vanilla/packages/contracts/src/codegen/tables/Counter.sol +++ b/templates/vanilla/packages/contracts/src/codegen/tables/Counter.sol @@ -32,17 +32,17 @@ library Counter { /** Get the table's key schema */ function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](0); + SchemaType[] memory _keySchema = new SchemaType[](0); - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } /** Get the table's value schema */ function getValueSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT32; + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } /** Get the table's key names */ From aca9b6543e58ba07017b42992b7ea0028ebce1c1 Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 13:19:59 +0100 Subject: [PATCH 03/28] gas report --- packages/store/gas-report.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/store/gas-report.json b/packages/store/gas-report.json index 0899ffa898..06772c450b 100644 --- a/packages/store/gas-report.json +++ b/packages/store/gas-report.json @@ -710,7 +710,7 @@ { "file": "test/StoreCoreGas.t.sol", "test": "testRegisterAndGetFieldLayout", - "name": "StoreCore: get schema (warm)", + "name": "StoreCore: get value schema (warm)", "gasUsed": 5033 }, { From 62239ef6ccc7bb88505a6ee9a149445137f4dc51 Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 13:55:17 +0100 Subject: [PATCH 04/28] fix tests --- packages/store-sync/src/recs/configToRecsComponents.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/store-sync/src/recs/configToRecsComponents.ts b/packages/store-sync/src/recs/configToRecsComponents.ts index f1b2e617e5..1d5b9e760e 100644 --- a/packages/store-sync/src/recs/configToRecsComponents.ts +++ b/packages/store-sync/src/recs/configToRecsComponents.ts @@ -15,7 +15,7 @@ export function configToRecsComponents( defineComponent( world, Object.fromEntries( - Object.entries(table.schema).map(([fieldName, schemaAbiType]) => [ + Object.entries(table.valueSchema).map(([fieldName, schemaAbiType]) => [ fieldName, schemaAbiTypeToRecsType[schemaAbiType as SchemaAbiType], ]) @@ -26,7 +26,7 @@ export function configToRecsComponents( componentName: tableName, tableName: `${config.namespace}:${tableName}`, keySchema: table.keySchema, - valueSchema: table.schema, + valueSchema: table.valueSchema, }, } ), From 7836de7364471f8a15198c73e09cde1c605bbea3 Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 14:06:26 +0100 Subject: [PATCH 05/28] fix tests --- packages/store-sync/src/recs/common.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/store-sync/src/recs/common.ts b/packages/store-sync/src/recs/common.ts index c384d5da13..d33aeb5b93 100644 --- a/packages/store-sync/src/recs/common.ts +++ b/packages/store-sync/src/recs/common.ts @@ -14,14 +14,14 @@ export type StoreComponentMetadata = RecsMetadata & { export type ConfigToRecsComponents = { [tableName in keyof TConfig["tables"] & string]: RecsComponent< { - [fieldName in keyof TConfig["tables"][tableName]["schema"] & string]: RecsType & - SchemaAbiTypeToRecsType; + [fieldName in keyof TConfig["tables"][tableName]["valueSchema"] & string]: RecsType & + SchemaAbiTypeToRecsType; }, StoreComponentMetadata & { componentName: tableName; tableName: `${TConfig["namespace"]}:${tableName}`; keySchema: TConfig["tables"][tableName]["keySchema"]; - valueSchema: TConfig["tables"][tableName]["schema"]; + valueSchema: TConfig["tables"][tableName]["valueSchema"]; } >; }; From 1597baf65efd2f4af3e49f246d281ed2acb968bc Mon Sep 17 00:00:00 2001 From: alvarius Date: Thu, 14 Sep 2023 14:22:32 +0100 Subject: [PATCH 06/28] Create cold-years-itch.md --- .changeset/cold-years-itch.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .changeset/cold-years-itch.md diff --git a/.changeset/cold-years-itch.md b/.changeset/cold-years-itch.md new file mode 100644 index 0000000000..55540911db --- /dev/null +++ b/.changeset/cold-years-itch.md @@ -0,0 +1,24 @@ +--- +"@latticexyz/cli": major +"@latticexyz/protocol-parser": major +"@latticexyz/store-sync": major +"@latticexyz/store": major +--- + +Renamed all occurrences of `schema` where it is used as "value schema" to `valueSchema` to clearly distinguish it from "key schema". +The only breaking change for users is the change from `schema` to `valueSchema` in `mud.config.ts`. + +```diff +// mud.config.ts +export default mudConfig({ + tables: { + CounterTable: { + keySchema: {}, +- schema: { ++ valueSchema: { + value: "uint32", + }, + }, + } +} +``` From 6f648498310403e132767db0dd5d0a1eb7e384c2 Mon Sep 17 00:00:00 2001 From: alvarius Date: Thu, 14 Sep 2023 18:02:03 +0100 Subject: [PATCH 07/28] Update .changeset/cold-years-itch.md Co-authored-by: Kevin Ingersoll --- .changeset/cold-years-itch.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/cold-years-itch.md b/.changeset/cold-years-itch.md index 55540911db..b132da0085 100644 --- a/.changeset/cold-years-itch.md +++ b/.changeset/cold-years-itch.md @@ -3,6 +3,7 @@ "@latticexyz/protocol-parser": major "@latticexyz/store-sync": major "@latticexyz/store": major +"create-mud": minor --- Renamed all occurrences of `schema` where it is used as "value schema" to `valueSchema` to clearly distinguish it from "key schema". From 14582af8bf0f719ebb83b5f8933f9b3bd0248420 Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 21:13:08 +0100 Subject: [PATCH 08/28] catch some more schemas --- docs/pages/client-side.mdx | 2 +- docs/pages/ecs.mdx | 2 +- docs/pages/quick-start.mdx | 9 ++++----- docs/pages/store/advanced-features.mdx | 12 +++++------ docs/pages/store/config.mdx | 12 +++++------ docs/pages/store/reading-and-writing.mdx | 8 ++++---- docs/pages/store/using-without-world.mdx | 19 ++++++++++++------ .../emojimon/a-wild-emojimon-appears.mdx | 20 +++++++++---------- .../tutorials/emojimon/map-and-terrain.mdx | 8 ++++---- .../emojimon/players-and-movement.mdx | 4 ++-- docs/pages/tutorials/minimal/add-table.mdx | 6 +++--- .../tutorials/walkthrough/minimal-onchain.mdx | 18 ++++++++--------- docs/pages/what-is-mud.mdx | 2 +- docs/pages/world/config.mdx | 2 +- docs/pages/world/modules.mdx | 4 ++-- docs/pages/world/querying.mdx | 2 +- docs/pages/world/subsystems.mdx | 4 ++-- docs/pages/world/world-101.mdx | 6 +++--- 18 files changed, 73 insertions(+), 67 deletions(-) diff --git a/docs/pages/client-side.mdx b/docs/pages/client-side.mdx index 287cd1b939..fc73319ed1 100644 --- a/docs/pages/client-side.mdx +++ b/docs/pages/client-side.mdx @@ -24,7 +24,7 @@ const config = mudConfig({ tables: { NameComponent: "string", PlayerComponent: "bool", - PositionComponent: { schema: { x: "int32", y: "int32" } }, + PositionComponent: { valueSchema: { x: "int32", y: "int32" } }, }, }); ``` diff --git a/docs/pages/ecs.mdx b/docs/pages/ecs.mdx index 03fe09b611..0f855a5da7 100644 --- a/docs/pages/ecs.mdx +++ b/docs/pages/ecs.mdx @@ -19,7 +19,7 @@ export default mudConfig({ tables: { PlayerComponent: "bool", PositionComponent: { - schema: { x: "int32", y: "int32" }, + valueSchema: { x: "int32", y: "int32" }, }, NameComponent: "string", DamageComponent: uint256, diff --git a/docs/pages/quick-start.mdx b/docs/pages/quick-start.mdx index e03fe5a60b..e8251e0f6f 100644 --- a/docs/pages/quick-start.mdx +++ b/docs/pages/quick-start.mdx @@ -81,7 +81,7 @@ export default mudConfig({ tables: { Counter: { keySchema: {}, - schema: "uint32", + valueSchema: "uint32", }, }, }); @@ -117,7 +117,7 @@ contract IncrementSystem is System { } ``` -The increment system is able to import `Counter` (from its autogenerated table schema) and operate on it by increasing its value by one. +The increment system is able to import `Counter` (from its autogenerated table library) and operate on it by increasing its value by one. Each system can contain any number of methods, though this system only has the single method—`increment`. These methods can then be called in the client to execute them in a transaction. @@ -127,7 +127,6 @@ The client package will vary depending on which template used (vanilla, react, p - You can adjust `createClientComponents.ts` to either override contract components or add client-only components. - If you are using chains other than foundry/anvil and lattice testnet, you can add them in `getNetworkConfig.ts` -- `createSystemCalls` represents how the client talks to the system contracts via our `worldSend` helper - `setup.ts` Beyond these files you can concern yourself simply with building out the frontend of the client. @@ -136,13 +135,13 @@ Beyond these files you can concern yourself simply with building out the fronten Now that you’re familiar with the basic structure of the client package, let’s go over how you can call on systems from the contracts package. -The starter project comes with `IncrementSystem.sol`—you can see it being called in `index.ts` (or `index.tsx` in the react template). +The starter project comes with `IncrementSystem.sol`—you can see it being called in `index.ts` (or `App.tsx` in the react template). ```tsx // Just for demonstration purposes: we create a global function that can be // called to invoke the Increment system contract via the world. (See IncrementSystem.sol.) (window as any).increment = async () => { - const tx = await worldSend("increment", []); + const tx = await worldContract.write.increment(); console.log("increment tx", tx); console.log("increment result", await tx.wait()); diff --git a/docs/pages/store/advanced-features.mdx b/docs/pages/store/advanced-features.mdx index e3ff1efea9..1a859967df 100644 --- a/docs/pages/store/advanced-features.mdx +++ b/docs/pages/store/advanced-features.mdx @@ -17,7 +17,7 @@ export default mudConfig({ tables: { CounterSingleton: { keySchema: {}, - schema: "uint256", + valueSchema: "uint256", }, }, }); @@ -48,7 +48,7 @@ import { mudConfig } from "@latticexyz/store/register"; export default mudConfig({ tables: { TradeExecuted: { - schema: { + valueSchema: { amount: "uint32", receiver: "bytes32", }, @@ -84,8 +84,8 @@ uint256 constant indexerTableId = uint256(keccak256("indexer.table")); contract MirrorSubscriber is IStoreHook { uint256 _table; - constructor(uint256 table, Schema schema, Schema keySchema) { - IStore(msg.sender).registerSchema(indexerTableId, schema, keySchema); + constructor(uint256 table, Schema keySchema, Schema valueSchema) { + IStore(msg.sender).registerSchema(indexerTableId, valueSchema, keySchema); _table = table; } @@ -110,9 +110,9 @@ Registering the hook can be done using the low-level Store API: ```solidity uint256 table = keccak256("table"); -Schema schema = SchemaLib.encode(SchemaType.UINT256, SchemaType.UINT256); +Schema valueSchema = SchemaLib.encode(SchemaType.UINT256, SchemaType.UINT256); Schema keySchema = SchemaLib.encode(SchemaType.UINT256); -MirrorSubscriber subscriber = new MirrorSubscriber(table, schema, keySchema); +MirrorSubscriber subscriber = new MirrorSubscriber(table, keySchema, valueSchema); StoreCore.registerStoreHook(table, subscriber); ``` diff --git a/docs/pages/store/config.mdx b/docs/pages/store/config.mdx index 386ac9e79b..36eacbcbdd 100644 --- a/docs/pages/store/config.mdx +++ b/docs/pages/store/config.mdx @@ -46,7 +46,7 @@ import { mudConfig } from "@latticexyz/store/register"; export default mudConfig({ tables: { MyTable: { - schema: { + valueSchema: { value: "uint32", }, }, @@ -62,7 +62,7 @@ The table configuration can have these properties: **`fileSelector` (optional)** _only used with the World framework_: a `string`: where to create the table in the namespace. -**`tableIdArgument` (optional)**: `bool`: whether to create getter and setter functions with the table ID as an argument, this is used to generate a single library to operate on multiple tables with the same schema and key structure. +**`tableIdArgument` (optional)**: `bool`: whether to create getter and setter functions with the table ID as an argument, this is used to generate a single library to operate on multiple tables with the same key and value structure. **`storeArgument` (optional)**: `bool`: whether to create getter and setter functions with the store address as an argument, this is used to generate a single library to operate on the same table in multiple stores. This adds new functions to the library, doubling the amount of functions created (each getter/setter will comes in a pair of “with `storeArgument`” and “without `storeArgument`”) @@ -86,7 +86,7 @@ Example: ```tsx tables: { MyTableWithTwoKeys: { - schema: { + valueSchema: { value1: "uint32", value2: "uint32", }, @@ -98,14 +98,14 @@ tables: { } ``` -**`schema` (required)**: an object with keys being the column name, and value being types from `SchemaType` +**`valueSchema` (required)**: an object with keys being the column name, and value being types from `SchemaType` Example: ```tsx tables: { MyTableWithFourValues: { - schema: { + valueSchema: { x: "uint32", y: "uint32", stringField: "string", @@ -135,7 +135,7 @@ Example: ```tsx tables: { MySingletonTable: { - schema: { + valueSchema: { value1: "uint32", value2: "uint32", }, diff --git a/docs/pages/store/reading-and-writing.mdx b/docs/pages/store/reading-and-writing.mdx index 229a678f4b..a2471147c2 100644 --- a/docs/pages/store/reading-and-writing.mdx +++ b/docs/pages/store/reading-and-writing.mdx @@ -21,7 +21,7 @@ This section assumes the existence of “MyTable” as described with the config // definition of MyTable tables: { MyTable: { - schema: { + valueSchema: { foo: "uint256", bar: "bool", fooArray: "uint256[]", // Store supports dynamic arrays @@ -106,7 +106,7 @@ This section assumes the existence of “MyTable” as described with the config // definition of MyTable tables: { MyTable: { - schema: { + valueSchema: { foo: "uint256", bar: "bool", }, @@ -147,8 +147,8 @@ uint256 tableId = uint256(keccak256("MyTable")); bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some.key"); // Retrieve a record -Schema schema = SchemaLib.encode(SchemaType.UINT256, SchemaType.UINT256); -bytes memory loadedData = StoreCore.getRecord(tableId, key, schema); +Schema valueSchema = SchemaLib.encode(SchemaType.UINT256, SchemaType.UINT256); +bytes memory loadedData = StoreCore.getRecord(tableId, key, valueSchema); uint256 foo = (uint256(Bytes.slice4(loadedData, 0))); uint256 bar = (uint256(Bytes.slice4(loadedData, 32))); ``` diff --git a/docs/pages/store/using-without-world.mdx b/docs/pages/store/using-without-world.mdx index 497f389adf..c1fc921b73 100644 --- a/docs/pages/store/using-without-world.mdx +++ b/docs/pages/store/using-without-world.mdx @@ -42,7 +42,7 @@ import { mudConfig } from "@latticexyz/store/register"; export default mudConfig({ tables: { MyTable: { - schema: { + valueSchema: { field1: "uint256", field2: "uint256", }, @@ -78,18 +78,25 @@ contract Contract is Store { ```solidity import { Store } from "@latticexyz/store/src/Store.sol"; import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; +import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol"; +import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.sol"; contract Contract is Store { constructor() { + bytes32 tableId = bytes32("MyTable"); + + FieldLayout fieldLayout = FieldLayoutLib.encode(32, 32); Schema keySchema = SchemaLib.encode(SchemaType.UINT256); - Schema schema = SchemaLib.encode(SchemaType.UINT256, SchemaType.UINT256); - uint256 table = uint256(keccak256("MyTable")); - StoreCore.registerSchema(table, schema, keySchema); - // Setting metadata is optional. It helps off-chain actors name columns + Schema valueSchema = SchemaLib.encode(SchemaType.UINT256, SchemaType.UINT256); + + string[] memory keyNames = new string[](1); + keyNames[0] = "field1"; + string[] memory fieldNames = new string[](2); fieldNames[0] = "field1"; fieldNames[1] = "field2"; - StoreSwitch.setMetadata(table, "MyTable", fieldNames); + + StoreCore.registerTable(tableId, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); } } ``` diff --git a/docs/pages/tutorials/emojimon/a-wild-emojimon-appears.mdx b/docs/pages/tutorials/emojimon/a-wild-emojimon-appears.mdx index 633dbb113e..2972511adc 100644 --- a/docs/pages/tutorials/emojimon/a-wild-emojimon-appears.mdx +++ b/docs/pages/tutorials/emojimon/a-wild-emojimon-appears.mdx @@ -46,7 +46,7 @@ export default mudConfig({ keySchema: { player: "bytes32", }, - schema: { + valueSchema: { exists: "bool", monster: "bytes32", catchAttempts: "uint256", @@ -57,7 +57,7 @@ export default mudConfig({ MapConfig: { keySchema: {}, dataStruct: false, - schema: { + valueSchema: { width: "uint32", height: "uint32", terrain: "bytes", @@ -68,7 +68,7 @@ export default mudConfig({ Player: "bool", Position: { dataStruct: false, - schema: { + valueSchema: { x: "uint32", y: "uint32", }, @@ -523,7 +523,7 @@ export default mudConfig({ keySchema: { player: "bytes32", }, - schema: { + valueSchema: { exists: "bool", monster: "bytes32", catchAttempts: "uint256", @@ -534,7 +534,7 @@ export default mudConfig({ MapConfig: { keySchema: {}, dataStruct: false, - schema: { + valueSchema: { width: "uint32", height: "uint32", terrain: "bytes", @@ -546,7 +546,7 @@ export default mudConfig({ Player: "bool", Position: { dataStruct: false, - schema: { + valueSchema: { x: "uint32", y: "uint32", }, @@ -749,7 +749,7 @@ export default mudConfig({ keySchema: { player: "bytes32", }, - schema: { + valueSchema: { exists: "bool", monster: "bytes32", catchAttempts: "uint256", @@ -760,7 +760,7 @@ export default mudConfig({ MapConfig: { keySchema: {}, dataStruct: false, - schema: { + valueSchema: { width: "uint32", height: "uint32", terrain: "bytes", @@ -772,7 +772,7 @@ export default mudConfig({ keySchema: { encounter: "bytes32", }, - schema: { + valueSchema: { result: "MonsterCatchResult", }, }, @@ -783,7 +783,7 @@ export default mudConfig({ Player: "bool", Position: { dataStruct: false, - schema: { + valueSchema: { x: "uint32", y: "uint32", }, diff --git a/docs/pages/tutorials/emojimon/map-and-terrain.mdx b/docs/pages/tutorials/emojimon/map-and-terrain.mdx index 7d57928e29..d2f8b5e643 100644 --- a/docs/pages/tutorials/emojimon/map-and-terrain.mdx +++ b/docs/pages/tutorials/emojimon/map-and-terrain.mdx @@ -27,7 +27,7 @@ export default mudConfig({ MapConfig: { keySchema: {}, dataStruct: false, - schema: { + valueSchema: { width: "uint32", height: "uint32", terrain: "bytes", @@ -37,7 +37,7 @@ export default mudConfig({ Player: "bool", Position: { dataStruct: false, - schema: { + valueSchema: { x: "uint32", y: "uint32", }, @@ -205,7 +205,7 @@ export default mudConfig({ MapConfig: { keySchema: {}, dataStruct: false, - schema: { + valueSchema: { width: "uint32", height: "uint32", terrain: "bytes", @@ -216,7 +216,7 @@ export default mudConfig({ Player: "bool", Position: { dataStruct: false, - schema: { + valueSchema: { x: "uint32", y: "uint32", }, diff --git a/docs/pages/tutorials/emojimon/players-and-movement.mdx b/docs/pages/tutorials/emojimon/players-and-movement.mdx index acb1703a84..e17c7ffd94 100644 --- a/docs/pages/tutorials/emojimon/players-and-movement.mdx +++ b/docs/pages/tutorials/emojimon/players-and-movement.mdx @@ -16,7 +16,7 @@ We're going to start by defining three new tables: 1. `Player: 'bool'` → determine which entities are players (e.g. distinct wallet addresses) 2. `Movable: 'bool'` → determine whether or not an entity can move -3. `Position: { schema: { x: 'uint32', y: 'uint32' } }` → determine which position an entity is located on a 2D grid +3. `Position: { valueSchema: { x: 'uint32', y: 'uint32' } }` → determine which position an entity is located on a 2D grid The syntax is as follows: @@ -34,7 +34,7 @@ export default mudConfig({ Player: "bool", Position: { dataStruct: false, - schema: { + valueSchema: { x: "uint32", y: "uint32", }, diff --git a/docs/pages/tutorials/minimal/add-table.mdx b/docs/pages/tutorials/minimal/add-table.mdx index 39a35466a7..800f9b0267 100644 --- a/docs/pages/tutorials/minimal/add-table.mdx +++ b/docs/pages/tutorials/minimal/add-table.mdx @@ -22,13 +22,13 @@ For the sake of simplicity, we will implement this in the `increment` function r tables: { Counter: { keySchema: {}, - schema: "uint32", + valueSchema: "uint32", }, History: { keySchema: { counterValue: "uint32", }, - schema: { + valueSchema: { blockNumber: "uint256", time: "uint256", }, @@ -45,7 +45,7 @@ For the sake of simplicity, we will implement this in the `increment` function r A MUD table has two schemas: - `keySchema`, the key used to find entries -- `schema`, the value in the entry (soon to be renamed to `valueSchema`) +- `valueSchema`, the value in the entry Each schema is represented as a structure with field names as keys, and the appropriate [Solidity data types](https://docs.soliditylang.org/en/latest/types.html) as their values. diff --git a/docs/pages/tutorials/walkthrough/minimal-onchain.mdx b/docs/pages/tutorials/walkthrough/minimal-onchain.mdx index 2cdb489d95..10cb260605 100644 --- a/docs/pages/tutorials/walkthrough/minimal-onchain.mdx +++ b/docs/pages/tutorials/walkthrough/minimal-onchain.mdx @@ -29,13 +29,13 @@ export default mudConfig({ tables: { Counter: { keySchema: {}, - schema: "uint32", + valueSchema: "uint32", }, Users: { keySchema: { user: "address", }, - schema: { + valueSchema: { score: "uint32", name: "string", }, @@ -128,18 +128,18 @@ The default namespace is empty. ```solidity library Counter { - /** Get the table's schema */ - function getSchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](1); - _schema[0] = SchemaType.UINT32; + /** Get the table's value schema */ + function getValueSchema() internal pure returns (Schema) { + SchemaType[] memory _valueSchema = new SchemaType[](1); + _valueSchema[0] = SchemaType.UINT32; - return SchemaLib.encode(_schema); + return SchemaLib.encode(_valueSchema); } function getKeySchema() internal pure returns (Schema) { - SchemaType[] memory _schema = new SchemaType[](0); + SchemaType[] memory _keySchema = new SchemaType[](0); - return SchemaLib.encode(_schema); + return SchemaLib.encode(_keySchema); } ``` diff --git a/docs/pages/what-is-mud.mdx b/docs/pages/what-is-mud.mdx index 6f277d92e8..0a5e09b9b7 100644 --- a/docs/pages/what-is-mud.mdx +++ b/docs/pages/what-is-mud.mdx @@ -57,7 +57,7 @@ Allowance: { from: "address", to: "address", }, - schema: { + valueSchema: { amount: "uint256", }, } diff --git a/docs/pages/world/config.mdx b/docs/pages/world/config.mdx index e5af9a8bbe..ae021458b6 100644 --- a/docs/pages/world/config.mdx +++ b/docs/pages/world/config.mdx @@ -29,7 +29,7 @@ export default mudConfig({ }, tables: { CounterTable: { - schema: { + valueSchema: { value: "uint32", }, }, diff --git a/docs/pages/world/modules.mdx b/docs/pages/world/modules.mdx index 86b4b44dd6..5ae80689bb 100644 --- a/docs/pages/world/modules.mdx +++ b/docs/pages/world/modules.mdx @@ -96,7 +96,7 @@ Using `getKeysWithValue` to retrieve all NFTs owned by a specific address: ```solidity // assumes this ownership table: // Owners: { -// schema: "address", +// valueSchema: "address", // keySchema: { nftId: "uint256" } // } import { getKeysWithValue } from "@latticexyz/world/src/modules/keyswithvalue/getKeysWithValue.sol"; @@ -157,7 +157,7 @@ import { resolveTableId } from "@latticexyz/config"; export default mudConfig({ tables: { MyTable: { - schema: "uint32", + valueSchema: "uint32", }, }, modules: [ diff --git a/docs/pages/world/querying.mdx b/docs/pages/world/querying.mdx index 2cbe89a621..0a3cc1a53a 100644 --- a/docs/pages/world/querying.mdx +++ b/docs/pages/world/querying.mdx @@ -19,7 +19,7 @@ import { mudConfig } from "@latticexyz/world/register"; export default mudConfig({ tables: { Player: "bool", - Position: { schema: { x: "int32", y: "int32" } }, + Position: { valueSchema: { x: "int32", y: "int32" } }, }, }); ``` diff --git a/docs/pages/world/subsystems.mdx b/docs/pages/world/subsystems.mdx index 93e2561876..a1c2f1a481 100644 --- a/docs/pages/world/subsystems.mdx +++ b/docs/pages/world/subsystems.mdx @@ -28,11 +28,11 @@ export default mudConfig({ tables: { BalanceTable: { keySchema: { owner: "address"}, - schema: { amount: "uint256" }, + valueSchema: { amount: "uint256" }, }, OwnerTable: { keySchema: { token: "uint256" }, - schema: { owner: "address" }, + valueSchema: { owner: "address" }, }, }, }); diff --git a/docs/pages/world/world-101.mdx b/docs/pages/world/world-101.mdx index bd38836be7..84a3d247e8 100644 --- a/docs/pages/world/world-101.mdx +++ b/docs/pages/world/world-101.mdx @@ -126,7 +126,7 @@ export default mudConfig({ tables: { Counter: { keySchema: {}, - schema: "uint32", + valueSchema: "uint32", }, }, }); @@ -177,10 +177,10 @@ export default mudConfig({ tables: { Counter: { keySchema: {}, - schema: "uint32", + valueSchema: "uint32", }, Dog: { - schema: { + valueSchema: { owner: "address", name: "string", color: "string", From 1dd1b4810ae2408ceb5695f194beea5d273bc562 Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 16:34:40 +0100 Subject: [PATCH 09/28] feat: rename table to tableId --- docs/pages/store/advanced-features.mdx | 22 +- packages/block-logs-stream/README.md | 8 +- packages/store-sync/src/blockLogsToStorage.ts | 10 +- packages/store/gas-report.json | 20 +- packages/store/src/IStore.sol | 42 +- packages/store/src/IStoreHook.sol | 17 +- packages/store/src/StoreCore.sol | 8 +- packages/store/src/StoreRead.sol | 20 +- packages/store/src/StoreSwitch.sol | 102 ++--- packages/store/test/EchoSubscriber.sol | 24 +- packages/store/test/MirrorSubscriber.sol | 24 +- packages/store/test/StoreCore.t.sol | 362 +++++++++--------- packages/store/test/StoreCoreDynamic.t.sol | 8 +- packages/store/test/StoreCoreGas.t.sol | 188 ++++----- packages/store/test/StoreMock.sol | 40 +- packages/store/ts/storeEvents.ts | 8 +- .../modules/keysintable/KeysInTableHook.sol | 36 +- 17 files changed, 478 insertions(+), 461 deletions(-) diff --git a/docs/pages/store/advanced-features.mdx b/docs/pages/store/advanced-features.mdx index 1a859967df..caaa9c365d 100644 --- a/docs/pages/store/advanced-features.mdx +++ b/docs/pages/store/advanced-features.mdx @@ -82,25 +82,25 @@ This is an example of a Mirror hook which mirrors a table into another one: uint256 constant indexerTableId = uint256(keccak256("indexer.table")); contract MirrorSubscriber is IStoreHook { - uint256 _table; + bytes32 _tableId; constructor(uint256 table, 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 = keccak256("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.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/gas-report.json b/packages/store/gas-report.json index 06772c450b..b0519b048d 100644 --- a/packages/store/gas-report.json +++ b/packages/store/gas-report.json @@ -626,13 +626,13 @@ { "file": "test/StoreCoreGas.t.sol", "test": "testHasFieldLayout", - "name": "Check for existence of table (existent)", + "name": "Check for existence of tableId (existent)", "gasUsed": 4465 }, { "file": "test/StoreCoreGas.t.sol", "test": "testHasFieldLayout", - "name": "check for existence of table (non-existent)", + "name": "check for existence of tableId (non-existent)", "gasUsed": 6468 }, { @@ -644,19 +644,19 @@ { "file": "test/StoreCoreGas.t.sol", "test": "testHooks", - "name": "set record on table with subscriber", + "name": "set record on tableId with subscriber", "gasUsed": 73748 }, { "file": "test/StoreCoreGas.t.sol", "test": "testHooks", - "name": "set static field on table with subscriber", + "name": "set static field on tableId with subscriber", "gasUsed": 25441 }, { "file": "test/StoreCoreGas.t.sol", "test": "testHooks", - "name": "delete record on table with subscriber", + "name": "delete record on tableId with subscriber", "gasUsed": 21483 }, { @@ -668,20 +668,20 @@ { "file": "test/StoreCoreGas.t.sol", "test": "testHooksDynamicData", - "name": "set (dynamic) record on table with subscriber", + "name": "set (dynamic) record on tableId with subscriber", "gasUsed": 167808 }, { "file": "test/StoreCoreGas.t.sol", "test": "testHooksDynamicData", - "name": "set (dynamic) field on table with subscriber", + "name": "set (dynamic) field on tableId with subscriber", "gasUsed": 28269 }, { "file": "test/StoreCoreGas.t.sol", "test": "testHooksDynamicData", - "name": "delete (dynamic) record on table with subscriber", - "gasUsed": 22901 + "name": "delete (dynamic) record on tableId with subscriber", + "gasUsed": 22905 }, { "file": "test/StoreCoreGas.t.sol", @@ -698,7 +698,7 @@ { "file": "test/StoreCoreGas.t.sol", "test": "testRegisterAndGetFieldLayout", - "name": "StoreCore: register table", + "name": "StoreCore: register tableId", "gasUsed": 620356 }, { 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..112ab25a0f 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. 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..2737f417f2 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, @@ -148,17 +160,17 @@ contract StoreCoreTest is Test, StoreMock { string[] memory fourNames = new string[](4); string[] memory oneName = new string[](1); - // Register table with invalid key names + // Register tableId 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 + // Register tableId 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( @@ -169,40 +181,40 @@ contract StoreCoreTest is Test, StoreMock { SchemaType.UINT32_ARRAY ); - // Register table - IStore(this).registerTable(table, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](5)); + // Register tableId + 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); } function testSetAndGetStaticData() public { - // Register table + // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(1, 2, 1, 2, 0); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT8, @@ -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,18 +234,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 testFailSetAndGetStaticData() public { - // Register table + // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(1, 2, 1, 2, 0); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT8, @@ -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 + // Register tableId 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,27 +284,27 @@ 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 + // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, 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,9 +370,9 @@ contract StoreCoreTest is Test, StoreMock { } function testSetAndGetField() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); - // Register table + // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, @@ -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,16 +510,16 @@ contract StoreCoreTest is Test, StoreMock { } function testDeleteData() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); - // Register table + // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, 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,9 +594,9 @@ 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 + // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT256, @@ -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,9 +734,9 @@ contract StoreCoreTest is Test, StoreMock { "" ); - data.table = keccak256("some.table"); + data.tableId = keccak256("some.tableId"); - // Register table + // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT256, @@ -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 + // Register tableId 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,36 +912,36 @@ 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 + // Get data from indexed tableId - the indexer should have mirrored the data there bytes memory indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); assertEq(keccak256(data), keccak256(indexedData)); 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 + // Get data from indexed tableId - 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 + // Get data from indexed tableId - the indexer should have mirrored the data there indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); assertEq(keccak256(indexedData), keccak256(abi.encodePacked(bytes16(0)))); } 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 + // Register tableId'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 + // Register tableId 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,9 +1063,9 @@ 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 + // Get data from indexed tableId - the indexer should have mirrored the data there bytes memory indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); assertEq(keccak256(data), keccak256(indexedData)); @@ -1063,15 +1075,15 @@ 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 + // Get data from indexed tableId - 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 + // Get data from indexed tableId - the indexer should have mirrored the data there indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); assertEq(keccak256(indexedData), keccak256(abi.encodePacked(bytes16(0)))); } diff --git a/packages/store/test/StoreCoreDynamic.t.sol b/packages/store/test/StoreCoreDynamic.t.sol index a29d56eaa5..dc0e2cf37c 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 _table = keccak256("some.tableId"); bytes32 internal firstDataBytes; uint32[] internal secondData; @@ -27,17 +27,17 @@ 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 { - // Register table's value schema + // Register tableId's value schema FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT256, diff --git a/packages/store/test/StoreCoreGas.t.sol b/packages/store/test/StoreCoreGas.t.sol index d09dc15539..122e0127cf 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"; @@ -52,20 +52,20 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { fieldNames[2] = "value3"; fieldNames[3] = "value4"; - startGasReport("StoreCore: register table"); - StoreCore.registerTable(table, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); + startGasReport("StoreCore: register tableId"); + 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 table2 = 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); + startGasReport("Check for existence of tableId (existent)"); + StoreCore.hasTable(tableId); endGasReport(); - startGasReport("check for existence of table (non-existent)"); + startGasReport("check for existence of tableId (non-existent)"); StoreCore.hasTable(table2); endGasReport(); } function testSetAndGetDynamicDataLength() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT8, @@ -103,8 +103,8 @@ 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)); + // Register tableId + StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](5)); // Create some key bytes32[] memory key = new bytes32[](1); @@ -112,22 +112,22 @@ 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(); } function testSetAndGetStaticData() public { - // Register table + // Register tableId Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT8, SchemaType.UINT16, @@ -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,21 +144,21 @@ 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(); } function testSetAndGetStaticDataSpanningWords() public { - // Register table + // Register tableId 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,26 +170,26 @@ 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 + // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, 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,9 +256,9 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { } function testSetAndGetField() public { - bytes32 table = keccak256("some.table"); + bytes32 tableId = keccak256("some.tableId"); - // Register table + // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, @@ -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,36 +326,36 @@ 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 + // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, 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,25 +394,25 @@ 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 + // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT256, 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,16 +490,16 @@ 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 + // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT256, 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 + // Register tableId 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, @@ -634,34 +634,34 @@ 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); + startGasReport("set record on tableId with subscriber"); + 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); + startGasReport("set static field on tableId with subscriber"); + StoreCore.setField(tableId, key, 0, data, fieldLayout); endGasReport(); - startGasReport("delete record on table with subscriber"); - StoreCore.deleteRecord(table, key, fieldLayout); + startGasReport("delete record on tableId with subscriber"); + 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 + // Register tableId 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, @@ -692,8 +692,8 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes memory staticData = abi.encodePacked(bytes16(0x0102030405060708090a0b0c0d0e0f10)); bytes memory data = abi.encodePacked(staticData, dynamicData); - startGasReport("set (dynamic) record on table with subscriber"); - StoreCore.setRecord(table, key, data, fieldLayout); + startGasReport("set (dynamic) record on tableId with subscriber"); + StoreCore.setRecord(tableId, key, data, fieldLayout); endGasReport(); // Update dynamic data @@ -702,12 +702,12 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { dynamicData = abi.encodePacked(encodedArrayDataLength.unwrap(), arrayDataBytes); data = abi.encodePacked(staticData, dynamicData); - startGasReport("set (dynamic) field on table with subscriber"); - StoreCore.setField(table, key, 1, arrayDataBytes, fieldLayout); + startGasReport("set (dynamic) field on tableId with subscriber"); + StoreCore.setField(tableId, key, 1, arrayDataBytes, fieldLayout); endGasReport(); - startGasReport("delete (dynamic) record on table with subscriber"); - StoreCore.deleteRecord(table, key, fieldLayout); + startGasReport("delete (dynamic) record on tableId with subscriber"); + 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..e1ece311dc 100644 --- a/packages/world/src/modules/keysintable/KeysInTableHook.sol +++ b/packages/world/src/modules/keysintable/KeysInTableHook.sol @@ -8,17 +8,17 @@ import { KeysInTable } from "./tables/KeysInTable.sol"; import { UsedKeysIndex } from "./tables/UsedKeysIndex.sol"; /** - * Note: if a table with composite keys is used, only the first key is indexed + * Note: if a tableId with composite keys is used, only the first key is indexed */ contract KeysInTableHook is StoreHook { function handleSet(bytes32 tableId, bytes32[] memory key) internal { bytes32 keysHash = keccak256(abi.encode(key)); - // If the key has not yet been set in the table... + // If the key has not yet been set in the tableId... if (!UsedKeysIndex.getHas(tableId, keysHash)) { uint40 length = uint40(KeysInTable.lengthKeys0(tableId)); - // Push the key to the list of keys in this table + // Push the key to the list of keys in this tableId if (key.length > 0) { KeysInTable.pushKeys0(tableId, key[0]); if (key.length > 1) { @@ -40,35 +40,35 @@ 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 { bytes32 keysHash = keccak256(abi.encode(key)); (bool has, uint40 index) = UsedKeysIndex.get(tableId, keysHash); - // If the key was part of the table... + // If the key was part of the tableId... if (has) { - // Delete the index as the key is not in the table + // Delete the index as the key is not in the tableId UsedKeysIndex.deleteRecord(tableId, keysHash); uint40 length = uint40(KeysInTable.lengthKeys0(tableId)); if (length == 1) { - // Delete the list of keys in this table + // Delete the list of keys in this tableId KeysInTable.deleteRecord(tableId); } else { if (key.length > 0) { @@ -77,7 +77,7 @@ 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 + // Remove the key from the list of keys in this tableId KeysInTable.updateKeys0(tableId, index, lastKey); KeysInTable.popKeys0(tableId); @@ -85,7 +85,7 @@ contract KeysInTableHook is StoreHook { lastKey = KeysInTable.getItemKeys1(tableId, length - 1); lastKeyTuple[1] = lastKey; - // Remove the key from the list of keys in this table + // Remove the key from the list of keys in this tableId KeysInTable.updateKeys1(tableId, index, lastKey); KeysInTable.popKeys1(tableId); @@ -93,7 +93,7 @@ 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 + // Swap and pop the key from the list of keys in this tableId KeysInTable.updateKeys2(tableId, index, lastKey); KeysInTable.popKeys2(tableId); @@ -101,7 +101,7 @@ contract KeysInTableHook is StoreHook { lastKey = KeysInTable.getItemKeys3(tableId, length - 1); lastKeyTuple[3] = lastKey; - // Remove the key from the list of keys in this table + // Remove the key from the list of keys in this tableId KeysInTable.updateKeys3(tableId, index, lastKey); KeysInTable.popKeys3(tableId); @@ -109,7 +109,7 @@ contract KeysInTableHook is StoreHook { lastKey = KeysInTable.getItemKeys4(tableId, length - 1); lastKeyTuple[4] = lastKey; - // Remove the key from the list of keys in this table + // Remove the key from the list of keys in this tableId KeysInTable.updateKeys4(tableId, index, lastKey); KeysInTable.popKeys4(tableId); } @@ -125,7 +125,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 } } From da8a13ea7805ded324964e1400f1c9b250b97bba Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 17:10:50 +0100 Subject: [PATCH 10/28] fix some tests --- packages/store-sync/src/blockLogsToStorage.test.ts | 8 ++++---- packages/store-sync/src/postgres/postgresStorage.test.ts | 4 ++-- packages/store-sync/src/sqlite/createSqliteTable.test.ts | 4 +++- packages/store-sync/src/sqlite/sqliteStorage.test.ts | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) 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/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/createSqliteTable.test.ts b/packages/store-sync/src/sqlite/createSqliteTable.test.ts index 756055c09d..c67dbed045 100644 --- a/packages/store-sync/src/sqlite/createSqliteTable.test.ts +++ b/packages/store-sync/src/sqlite/createSqliteTable.test.ts @@ -2,7 +2,7 @@ import { describe, it, expect } from "vitest"; import { createSqliteTable } from "./createSqliteTable"; describe("createSqliteTable", () => { - it("should create table from schema", async () => { + it.only("should create table from schema", async () => { const table = createSqliteTable({ address: "0xffffffffffffffffffffffffffffffffffffffff", namespace: "test", @@ -11,6 +11,8 @@ describe("createSqliteTable", () => { valueSchema: { name: "string", addr: "address" }, }); + console.log("table", table); + expect(table).toMatchInlineSnapshot(` SQLiteTable { "__isDeleted": SQLiteBoolean { 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", }, From df00ceb1a323b6f86c286c7f06c1e79e9d868849 Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 17:11:14 +0100 Subject: [PATCH 11/28] remove debug log --- packages/store-sync/src/sqlite/createSqliteTable.test.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/store-sync/src/sqlite/createSqliteTable.test.ts b/packages/store-sync/src/sqlite/createSqliteTable.test.ts index c67dbed045..756055c09d 100644 --- a/packages/store-sync/src/sqlite/createSqliteTable.test.ts +++ b/packages/store-sync/src/sqlite/createSqliteTable.test.ts @@ -2,7 +2,7 @@ import { describe, it, expect } from "vitest"; import { createSqliteTable } from "./createSqliteTable"; describe("createSqliteTable", () => { - it.only("should create table from schema", async () => { + it("should create table from schema", async () => { const table = createSqliteTable({ address: "0xffffffffffffffffffffffffffffffffffffffff", namespace: "test", @@ -11,8 +11,6 @@ describe("createSqliteTable", () => { valueSchema: { name: "string", addr: "address" }, }); - console.log("table", table); - expect(table).toMatchInlineSnapshot(` SQLiteTable { "__isDeleted": SQLiteBoolean { From abf5712ea4b015c6eeb98a55a904da65a92b3fda Mon Sep 17 00:00:00 2001 From: alvarius Date: Thu, 14 Sep 2023 18:08:16 +0100 Subject: [PATCH 12/28] Create metal-hounds-drum.md --- .changeset/metal-hounds-drum.md | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .changeset/metal-hounds-drum.md 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 +); +``` From a4d55f44ddfc6698fbd0df0481e38af366ffa077 Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 21:29:59 +0100 Subject: [PATCH 13/28] catch some more table id --- docs/pages/store/advanced-features.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/pages/store/advanced-features.mdx b/docs/pages/store/advanced-features.mdx index caaa9c365d..6784d64b7b 100644 --- a/docs/pages/store/advanced-features.mdx +++ b/docs/pages/store/advanced-features.mdx @@ -79,12 +79,12 @@ 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 { bytes32 _tableId; - constructor(uint256 table, Schema keySchema, Schema valueSchema) { + constructor(bytes32 tableId, Schema keySchema, Schema valueSchema) { IStore(msg.sender).registerSchema(indexerTableId, valueSchema, keySchema); _tableId = tableId; } @@ -109,7 +109,7 @@ contract MirrorSubscriber is IStoreHook { Registering the hook can be done using the low-level Store API: ```solidity -bytes32 tableId = keccak256("table"); +bytes32 tableId = bytes32("table"); Schema valueSchema = SchemaLib.encode(SchemaType.UINT256, SchemaType.UINT256); Schema keySchema = SchemaLib.encode(SchemaType.UINT256); MirrorSubscriber subscriber = new MirrorSubscriber(tableId, keySchema, valueSchema); From 09755c6ec2df34d27a7aee8c9b4eeae19dc4fdf8 Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 21:44:29 +0100 Subject: [PATCH 14/28] remove invalid comments --- packages/store/test/StoreCoreDynamic.t.sol | 70 +++++++++---------- .../modules/keysintable/KeysInTableHook.sol | 15 ++-- 2 files changed, 40 insertions(+), 45 deletions(-) diff --git a/packages/store/test/StoreCoreDynamic.t.sol b/packages/store/test/StoreCoreDynamic.t.sol index dc0e2cf37c..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.tableId"); + bytes32 internal _tableId = keccak256("some.tableId"); bytes32 internal firstDataBytes; uint32[] internal secondData; @@ -37,14 +37,14 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { } function setUp() public { - // Register tableId's value schema + // Register table's value schema FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT256, 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/world/src/modules/keysintable/KeysInTableHook.sol b/packages/world/src/modules/keysintable/KeysInTableHook.sol index e1ece311dc..1953bea6ea 100644 --- a/packages/world/src/modules/keysintable/KeysInTableHook.sol +++ b/packages/world/src/modules/keysintable/KeysInTableHook.sol @@ -14,11 +14,11 @@ contract KeysInTableHook is StoreHook { function handleSet(bytes32 tableId, bytes32[] memory key) internal { bytes32 keysHash = keccak256(abi.encode(key)); - // If the key has not yet been set in the tableId... + // If the key has not yet been set in the table... if (!UsedKeysIndex.getHas(tableId, keysHash)) { uint40 length = uint40(KeysInTable.lengthKeys0(tableId)); - // Push the key to the list of keys in this tableId + // Push the key to the list of keys in this table if (key.length > 0) { KeysInTable.pushKeys0(tableId, key[0]); if (key.length > 1) { @@ -60,15 +60,15 @@ contract KeysInTableHook is StoreHook { bytes32 keysHash = keccak256(abi.encode(key)); (bool has, uint40 index) = UsedKeysIndex.get(tableId, keysHash); - // If the key was part of the tableId... + // If the key was part of the table... if (has) { - // Delete the index as the key is not in the tableId + // Delete the index as the key is not in the table UsedKeysIndex.deleteRecord(tableId, keysHash); uint40 length = uint40(KeysInTable.lengthKeys0(tableId)); if (length == 1) { - // Delete the list of keys in this tableId + // Delete the list of keys in this table KeysInTable.deleteRecord(tableId); } else { if (key.length > 0) { @@ -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 tableId 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 tableId 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 tableId 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 tableId 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 tableId KeysInTable.updateKeys4(tableId, index, lastKey); KeysInTable.popKeys4(tableId); } From 90d3e7468ab5185ebe6088c2d785c7b1f247b73d Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 22:31:23 +0100 Subject: [PATCH 15/28] fix tests --- test-data/world-logs.json | 604 +++++++++++++++++++------------------- 1 file changed, 309 insertions(+), 295 deletions(-) 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", From 4c85bd3483ebbf222409b784da50fe3564662c61 Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 20:38:36 +0100 Subject: [PATCH 16/28] feat: rename key to keyTuple --- docs/pages/store/advanced-features.mdx | 12 +- docs/pages/store/reading-and-writing.mdx | 60 +- docs/pages/store/spec.mdx | 6 +- docs/pages/world/modules.mdx | 6 +- packages/block-logs-stream/README.md | 8 +- .../EchoSubscriber.abi.json | 202 +++ .../EchoSubscriber.abi.json.d.ts | 203 +++ packages/store/abi/IStore.sol/IStore.abi.json | 717 ++++++++++ .../store/abi/IStore.sol/IStore.abi.json.d.ts | 718 ++++++++++ .../store/abi/IStore.sol/IStoreData.abi.json | 463 +++++++ .../abi/IStore.sol/IStoreData.abi.json.d.ts | 464 +++++++ .../abi/IStore.sol/IStoreEphemeral.abi.json | 55 + .../IStore.sol/IStoreEphemeral.abi.json.d.ts | 56 + .../store/abi/IStore.sol/IStoreRead.abi.json | 200 +++ .../abi/IStore.sol/IStoreRead.abi.json.d.ts | 201 +++ .../store/abi/IStore.sol/IStoreWrite.abi.json | 265 ++++ .../abi/IStore.sol/IStoreWrite.abi.json.d.ts | 266 ++++ .../abi/IStoreHook.sol/IStoreHook.abi.json | 189 +++ .../IStoreHook.sol/IStoreHook.abi.json.d.ts | 190 +++ .../MirrorSubscriber.abi.json | 294 ++++ .../MirrorSubscriber.abi.json.d.ts | 295 ++++ .../abi/StoreCore.sol/StoreCore.abi.json | 102 ++ .../abi/StoreCore.sol/StoreCore.abi.json.d.ts | 103 ++ .../abi/StoreHook.sol/StoreHook.abi.json | 189 +++ .../abi/StoreHook.sol/StoreHook.abi.json.d.ts | 190 +++ .../abi/StoreMock.sol/StoreMock.abi.json | 791 +++++++++++ .../abi/StoreMock.sol/StoreMock.abi.json.d.ts | 792 +++++++++++ .../abi/StoreRead.sol/StoreRead.abi.json | 242 ++++ .../abi/StoreRead.sol/StoreRead.abi.json.d.ts | 243 ++++ packages/store/src/IStore.sol | 35 +- packages/store/src/IStoreHook.sol | 17 +- packages/store/src/StoreCore.sol | 182 +-- packages/store/src/StoreRead.sol | 16 +- packages/store/src/StoreSwitch.sol | 66 +- packages/store/test/EchoSubscriber.sol | 34 +- packages/store/test/MirrorSubscriber.sol | 26 +- packages/store/test/StoreCore.t.sol | 276 ++-- packages/store/test/StoreCoreDynamic.t.sol | 6 +- packages/store/test/StoreCoreGas.t.sol | 138 +- packages/store/test/StoreMock.sol | 28 +- packages/store/ts/storeEvents.ts | 8 +- .../abi/CoreSystem.sol/CoreSystem.abi.json | 757 ++++++++++ .../CoreSystem.sol/CoreSystem.abi.json.d.ts | 758 ++++++++++ .../EphemeralRecordSystem.abi.json | 166 +++ .../EphemeralRecordSystem.abi.json.d.ts | 167 +++ .../abi/IBaseWorld.sol/IBaseWorld.abi.json | 1231 ++++++++++++++++ .../IBaseWorld.sol/IBaseWorld.abi.json.d.ts | 1232 +++++++++++++++++ packages/world/abi/IStore.sol/IStore.abi.json | 717 ++++++++++ .../world/abi/IStore.sol/IStore.abi.json.d.ts | 718 ++++++++++ .../world/abi/IStore.sol/IStoreData.abi.json | 463 +++++++ .../abi/IStore.sol/IStoreData.abi.json.d.ts | 464 +++++++ .../abi/IStore.sol/IStoreEphemeral.abi.json | 55 + .../IStore.sol/IStoreEphemeral.abi.json.d.ts | 56 + .../world/abi/IStore.sol/IStoreRead.abi.json | 200 +++ .../abi/IStore.sol/IStoreRead.abi.json.d.ts | 201 +++ .../world/abi/IStore.sol/IStoreWrite.abi.json | 265 ++++ .../abi/IStore.sol/IStoreWrite.abi.json.d.ts | 266 ++++ .../abi/IStoreHook.sol/IStoreHook.abi.json | 189 +++ .../IStoreHook.sol/IStoreHook.abi.json.d.ts | 190 +++ .../KeysInTableHook.abi.json | 279 ++++ .../KeysInTableHook.abi.json.d.ts | 280 ++++ .../KeysWithValueHook.abi.json | 263 ++++ .../KeysWithValueHook.abi.json.d.ts | 264 ++++ .../abi/StoreCore.sol/StoreCore.abi.json | 102 ++ .../abi/StoreCore.sol/StoreCore.abi.json.d.ts | 103 ++ .../abi/StoreHook.sol/StoreHook.abi.json | 189 +++ .../abi/StoreHook.sol/StoreHook.abi.json.d.ts | 190 +++ .../abi/StoreRead.sol/StoreRead.abi.json | 242 ++++ .../abi/StoreRead.sol/StoreRead.abi.json.d.ts | 243 ++++ packages/world/abi/World.sol/World.abi.json | 820 +++++++++++ .../world/abi/World.sol/World.abi.json.d.ts | 821 +++++++++++ .../world/abi/src/IStore.sol/IStore.abi.json | 717 ++++++++++ .../abi/src/IStore.sol/IStore.abi.json.d.ts | 718 ++++++++++ .../abi/src/IStore.sol/IStoreData.abi.json | 463 +++++++ .../src/IStore.sol/IStoreData.abi.json.d.ts | 464 +++++++ .../src/IStore.sol/IStoreEphemeral.abi.json | 55 + .../IStore.sol/IStoreEphemeral.abi.json.d.ts | 56 + .../abi/src/IStore.sol/IStoreRead.abi.json | 200 +++ .../src/IStore.sol/IStoreRead.abi.json.d.ts | 201 +++ .../abi/src/IStore.sol/IStoreWrite.abi.json | 265 ++++ .../src/IStore.sol/IStoreWrite.abi.json.d.ts | 266 ++++ .../src/IStoreHook.sol/IStoreHook.abi.json | 189 +++ .../IStoreHook.sol/IStoreHook.abi.json.d.ts | 190 +++ .../abi/src/StoreCore.sol/StoreCore.abi.json | 102 ++ .../src/StoreCore.sol/StoreCore.abi.json.d.ts | 103 ++ .../abi/src/StoreHook.sol/StoreHook.abi.json | 189 +++ .../src/StoreHook.sol/StoreHook.abi.json.d.ts | 190 +++ packages/world/src/World.sol | 24 +- .../implementations/EphemeralRecordSystem.sol | 4 +- .../modules/keysintable/KeysInTableHook.sol | 69 +- .../world/src/modules/keysintable/hasKey.sol | 12 +- .../keyswithvalue/KeysWithValueHook.sol | 32 +- packages/world/test/World.t.sol | 6 +- packages/world/test/query.t.sol | 12 +- 94 files changed, 24250 insertions(+), 522 deletions(-) create mode 100644 packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json create mode 100644 packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json.d.ts create mode 100644 packages/store/abi/IStore.sol/IStore.abi.json create mode 100644 packages/store/abi/IStore.sol/IStore.abi.json.d.ts create mode 100644 packages/store/abi/IStore.sol/IStoreData.abi.json create mode 100644 packages/store/abi/IStore.sol/IStoreData.abi.json.d.ts create mode 100644 packages/store/abi/IStore.sol/IStoreEphemeral.abi.json create mode 100644 packages/store/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts create mode 100644 packages/store/abi/IStore.sol/IStoreRead.abi.json create mode 100644 packages/store/abi/IStore.sol/IStoreRead.abi.json.d.ts create mode 100644 packages/store/abi/IStore.sol/IStoreWrite.abi.json create mode 100644 packages/store/abi/IStore.sol/IStoreWrite.abi.json.d.ts create mode 100644 packages/store/abi/IStoreHook.sol/IStoreHook.abi.json create mode 100644 packages/store/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts create mode 100644 packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json create mode 100644 packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json.d.ts create mode 100644 packages/store/abi/StoreCore.sol/StoreCore.abi.json create mode 100644 packages/store/abi/StoreCore.sol/StoreCore.abi.json.d.ts create mode 100644 packages/store/abi/StoreHook.sol/StoreHook.abi.json create mode 100644 packages/store/abi/StoreHook.sol/StoreHook.abi.json.d.ts create mode 100644 packages/store/abi/StoreMock.sol/StoreMock.abi.json create mode 100644 packages/store/abi/StoreMock.sol/StoreMock.abi.json.d.ts create mode 100644 packages/store/abi/StoreRead.sol/StoreRead.abi.json create mode 100644 packages/store/abi/StoreRead.sol/StoreRead.abi.json.d.ts create mode 100644 packages/world/abi/CoreSystem.sol/CoreSystem.abi.json create mode 100644 packages/world/abi/CoreSystem.sol/CoreSystem.abi.json.d.ts create mode 100644 packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json create mode 100644 packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json.d.ts create mode 100644 packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json create mode 100644 packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json.d.ts create mode 100644 packages/world/abi/IStore.sol/IStore.abi.json create mode 100644 packages/world/abi/IStore.sol/IStore.abi.json.d.ts create mode 100644 packages/world/abi/IStore.sol/IStoreData.abi.json create mode 100644 packages/world/abi/IStore.sol/IStoreData.abi.json.d.ts create mode 100644 packages/world/abi/IStore.sol/IStoreEphemeral.abi.json create mode 100644 packages/world/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts create mode 100644 packages/world/abi/IStore.sol/IStoreRead.abi.json create mode 100644 packages/world/abi/IStore.sol/IStoreRead.abi.json.d.ts create mode 100644 packages/world/abi/IStore.sol/IStoreWrite.abi.json create mode 100644 packages/world/abi/IStore.sol/IStoreWrite.abi.json.d.ts create mode 100644 packages/world/abi/IStoreHook.sol/IStoreHook.abi.json create mode 100644 packages/world/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts create mode 100644 packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json create mode 100644 packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json.d.ts create mode 100644 packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json create mode 100644 packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json.d.ts create mode 100644 packages/world/abi/StoreCore.sol/StoreCore.abi.json create mode 100644 packages/world/abi/StoreCore.sol/StoreCore.abi.json.d.ts create mode 100644 packages/world/abi/StoreHook.sol/StoreHook.abi.json create mode 100644 packages/world/abi/StoreHook.sol/StoreHook.abi.json.d.ts create mode 100644 packages/world/abi/StoreRead.sol/StoreRead.abi.json create mode 100644 packages/world/abi/StoreRead.sol/StoreRead.abi.json.d.ts create mode 100644 packages/world/abi/World.sol/World.abi.json create mode 100644 packages/world/abi/World.sol/World.abi.json.d.ts create mode 100644 packages/world/abi/src/IStore.sol/IStore.abi.json create mode 100644 packages/world/abi/src/IStore.sol/IStore.abi.json.d.ts create mode 100644 packages/world/abi/src/IStore.sol/IStoreData.abi.json create mode 100644 packages/world/abi/src/IStore.sol/IStoreData.abi.json.d.ts create mode 100644 packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json create mode 100644 packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json.d.ts create mode 100644 packages/world/abi/src/IStore.sol/IStoreRead.abi.json create mode 100644 packages/world/abi/src/IStore.sol/IStoreRead.abi.json.d.ts create mode 100644 packages/world/abi/src/IStore.sol/IStoreWrite.abi.json create mode 100644 packages/world/abi/src/IStore.sol/IStoreWrite.abi.json.d.ts create mode 100644 packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json create mode 100644 packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json.d.ts create mode 100644 packages/world/abi/src/StoreCore.sol/StoreCore.abi.json create mode 100644 packages/world/abi/src/StoreCore.sol/StoreCore.abi.json.d.ts create mode 100644 packages/world/abi/src/StoreHook.sol/StoreHook.abi.json create mode 100644 packages/world/abi/src/StoreHook.sol/StoreHook.abi.json.d.ts diff --git a/docs/pages/store/advanced-features.mdx b/docs/pages/store/advanced-features.mdx index 6784d64b7b..c04efbdaa7 100644 --- a/docs/pages/store/advanced-features.mdx +++ b/docs/pages/store/advanced-features.mdx @@ -89,19 +89,19 @@ contract MirrorSubscriber is IStoreHook { _tableId = tableId; } - function onSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory data) public { + function onSetRecord(bytes32 tableId, bytes32[] memory keyTuple, bytes memory data) public { if (_tableId != tableId) revert("invalid tableId"); - StoreSwitch.setRecord(indexerTableId, key, data); + StoreSwitch.setRecord(indexerTableId, keyTuple, data); } - function onSetField(bytes32 tableId, bytes32[] memory key, uint8 schemaIndex, bytes memory data) public { + function onSetField(bytes32 tableId, bytes32[] memory keyTuple, uint8 schemaIndex, bytes memory data) public { if (_tableId != tableId) revert("invalid tableId"); - StoreSwitch.setField(indexerTableId, key, schemaIndex, data); + StoreSwitch.setField(indexerTableId, keyTuple, schemaIndex, data); } - function onDeleteRecord(bytes32 tableId, bytes32[] memory key) public { + function onDeleteRecord(bytes32 tableId, bytes32[] memory keyTuple) public { if (_tableId != tableId) revert("invalid tableId"); - StoreSwitch.deleteRecord(indexerTableId, key); + StoreSwitch.deleteRecord(indexerTableId, keyTuple); } } ``` diff --git a/docs/pages/store/reading-and-writing.mdx b/docs/pages/store/reading-and-writing.mdx index a2471147c2..e8bebae0c1 100644 --- a/docs/pages/store/reading-and-writing.mdx +++ b/docs/pages/store/reading-and-writing.mdx @@ -40,56 +40,56 @@ uint256[2] memory barArray; barArray[0] = 69; barArray[1] = 85; fooArray[0] = 42; -// args: key, foo, bar, fooArray, staticArray -MyTable.set(keccak256("some.key"), 45, false, fooArray, barArray); +// args: keyTuple, foo, bar, fooArray, staticArray +MyTable.set(keccak256("some.keyTuple"), 45, false, fooArray, barArray); ``` **Setting a field** ```solidity // Setting foo -MyTable.setFoo(keccak256("some.key"), 33); +MyTable.setFoo(keccak256("some.keyTuple"), 33); // Setting bar -MyTable.setBar(keccak256("some.key"), false); +MyTable.setBar(keccak256("some.keyTuple"), false); // Setting fooArray uint256[] memory fooArray = new uint256[](3); fooArray[0] = 42; fooArray[1] = 15; fooArray[2] = 3; -MyTable.setFooArray(keccak256("some.key"), fooArray); +MyTable.setFooArray(keccak256("some.keyTuple"), fooArray); ``` **Operations on dynamic arrays** ```solidity -MyTable.pushFooArray(keccak256("some.key"), 4242); // adds 4242 at end of fooArray -MyTable.popFooArray(keccak256("some.key")); // pop fooArray -MyTable.setItemFooArray(keccak256("some.key"), 0, 123); // set fooArray[0] to 123 +MyTable.pushFooArray(keccak256("some.keyTuple"), 4242); // adds 4242 at end of fooArray +MyTable.popFooArray(keccak256("some.keyTuple")); // pop fooArray +MyTable.setItemFooArray(keccak256("some.keyTuple"), 0, 123); // set fooArray[0] to 123 ``` **Retrieving a record** ```solidity // Retrieving a record -MyTable.get(keccak256("some.key")); +MyTable.get(keccak256("some.keyTuple")); ``` **Retrieving a field** ```solidity // Retrieve foo -MyTable.getFoo(keccak256("some.key")); +MyTable.getFoo(keccak256("some.keyTuple")); // Retrieve bar -MyTable.getBar(keccak256("some.key")); +MyTable.getBar(keccak256("some.keyTuple")); // Retrieve an element of fooArray -MyTable.getItemFooArray(keccak256("some.key"), 0); // get fooArray[0] +MyTable.getItemFooArray(keccak256("some.keyTuple"), 0); // get fooArray[0] ``` **Deleting a record** ```solidity // Deleting a record -MyTable.deleteRecord(keccak256("some.key")); +MyTable.deleteRecord(keccak256("some.keyTuple")); ``` ### Access to Store via low-level API @@ -120,10 +120,10 @@ tables: { uint256 tableId = uint256(keccak256("MyTable")); uint256 foo = 10; uint256 bar = 24; -bytes32[] memory key = new bytes32[](1); -key[0] = keccak256("some.key"); +bytes32[] memory keyTuple = new bytes32[](1); +keyTuple[0] = keccak256("some.keyTuple"); // Setting a record -StoreSwitch.setRecord(tableId, key, abi.encodePacked((foo, bar))); +StoreSwitch.setRecord(tableId, keyTuple, abi.encodePacked((foo, bar))); ``` **Setting a field** @@ -132,23 +132,23 @@ StoreSwitch.setRecord(tableId, key, abi.encodePacked((foo, bar))); uint256 tableId = uint256(keccak256("MyTable")); uint256 foo = 45; uint256 foo = 67; -bytes32[] memory key = new bytes32[](1); -key[0] = keccak256("some.key"); +bytes32[] memory keyTuple = new bytes32[](1); +keyTuple[0] = keccak256("some.keyTuple"); // Setting foo -StoreSwitch.setField(tableId, key, 0, abi.encodePacked((foo))); +StoreSwitch.setField(tableId, keyTuple, 0, abi.encodePacked((foo))); // Setting bar -StoreSwitch.setField(tableId, key, 1, abi.encodePacked((bar))); +StoreSwitch.setField(tableId, keyTuple, 1, abi.encodePacked((bar))); ``` **Retrieving a record** ```solidity uint256 tableId = uint256(keccak256("MyTable")); -bytes32[] memory key = new bytes32[](1); -key[0] = keccak256("some.key"); +bytes32[] memory keyTuple = new bytes32[](1); +keyTuple[0] = keccak256("some.keyTuple"); // Retrieve a record Schema valueSchema = SchemaLib.encode(SchemaType.UINT256, SchemaType.UINT256); -bytes memory loadedData = StoreCore.getRecord(tableId, key, valueSchema); +bytes memory loadedData = StoreCore.getRecord(tableId, keyTuple, valueSchema); uint256 foo = (uint256(Bytes.slice4(loadedData, 0))); uint256 bar = (uint256(Bytes.slice4(loadedData, 32))); ``` @@ -157,13 +157,13 @@ uint256 bar = (uint256(Bytes.slice4(loadedData, 32))); ```solidity uint256 tableId = uint256(keccak256("MyTable")); -bytes32[] memory key = new bytes32[](1); -key[0] = keccak256("some.key"); +bytes32[] memory keyTuple = new bytes32[](1); +keyTuple[0] = keccak256("some.keyTuple"); // Retrieve foo -bytes memory loadedDatafoo = StoreCore.getField(tableId, key, 0); +bytes memory loadedDatafoo = StoreCore.getField(tableId, keyTuple, 0); int32 foo = (uint32(Bytes.slice4(loadedDatafoo, 0))); // Retrieve bar -bytes memory loadedDatabar = StoreCore.getField(tableId, key, 1); +bytes memory loadedDatabar = StoreCore.getField(tableId, keyTuple, 1); int32 bar = (uint32(Bytes.slice4(loadedData, 0))); ``` @@ -171,8 +171,8 @@ int32 bar = (uint32(Bytes.slice4(loadedData, 0))); ```solidity uint256 tableId = uint256(keccak256("MyTable")); -bytes32[] memory key = new bytes32[](1); -key[0] = keccak256("some.key"); +bytes32[] memory keyTuple = new bytes32[](1); +keyTuple[0] = keccak256("some.keyTuple"); // Deleting a record -StoreCore.deleteRecord(tableId, key); +StoreCore.deleteRecord(tableId, keyTuple); ``` diff --git a/docs/pages/store/spec.mdx b/docs/pages/store/spec.mdx index cda5631000..41456d460a 100644 --- a/docs/pages/store/spec.mdx +++ b/docs/pages/store/spec.mdx @@ -7,9 +7,9 @@ import { Aside } from "../../components/Aside"; When a record or a single field is edited, or when a record is deleted, Store emits a standard event with enough information for off-chain actors to reconstruct the new version of the Store with event-sourcing. ```solidity -event StoreSetRecord(uint256 tableId, bytes32[] key, bytes data); -event StoreSetField(uint256 tableId, bytes32[] key, uint8 schemaIndex, bytes data); -event StoreDeleteRecord(uint256 tableId, bytes32[] key); +event StoreSetRecord(uint256 tableId, bytes32[] keyTuple, bytes data); +event StoreSetField(uint256 tableId, bytes32[] keyTuple, uint8 schemaIndex, bytes data); +event StoreDeleteRecord(uint256 tableId, bytes32[] keyTuple); ``` Each event includes the table ID and each key encoded as `bytes32`. diff --git a/docs/pages/world/modules.mdx b/docs/pages/world/modules.mdx index 5ae80689bb..f47a0a128f 100644 --- a/docs/pages/world/modules.mdx +++ b/docs/pages/world/modules.mdx @@ -48,7 +48,7 @@ For example, it can be used to fetch all keys in the "Position" table (if the ta It offers two methods: - `getKeysInTable(bytes32 tableId)` returns all keys in a table -- `hasKey(bytes32 tableId, bytes32[] memory key)` returns whether a given key is in a table (with O(1) gas) +- `hasKey(bytes32 tableId, bytes32[] memory keyTuple)` returns whether a given keyTuple is in a table (with O(1) gas) Using `getKeysInTable` to retrieve all keys in the Player table: @@ -62,7 +62,7 @@ import { Player, PlayerTableId } from "../codegen/tables/Player.sol"; bytes32[][] memory players = getKeysInTable(world, PlayerTableId); ``` -Using `hasKey` to check if a key is in the Player table: +Using `hasKey` to check if a keyTuple is in the Player table: ```solidity // assumes a boolean flag indicates a player: @@ -79,7 +79,7 @@ bool memory isPlayer = hasKey(world, PlayerTableId, keyTuple); Internally, it works by installing a [hook](https://v2.mud.dev/store/advanced-features#storage-hooks) that maintains: - an array of all keys in the table -- an index or "**reverse mapping**" of whether a given key is in the table +- an index or "**reverse mapping**" of whether a given keyTuple is in the table #### **`KeysWithValueModule`** diff --git a/packages/block-logs-stream/README.md b/packages/block-logs-stream/README.md index 692c02423f..14691644a6 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 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)", + "event StoreDeleteRecord(bytes32 tableId, bytes32[] keyTuple)", + "event StoreSetField(bytes32 tableId, bytes32[] keyTuple, uint8 schemaIndex, bytes data)", + "event StoreSetRecord(bytes32 tableId, bytes32[] keyTuple, bytes data)", + "event StoreEphemeralRecord(bytes32 tableId, bytes32[] keyTuple, bytes data)", ]), }), mergeMap(({ logs }) => from(groupLogsByBlockNumber(logs))) diff --git a/packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json b/packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json new file mode 100644 index 0000000000..e63888908d --- /dev/null +++ b/packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json @@ -0,0 +1,202 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "HookCalled", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json.d.ts b/packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json.d.ts new file mode 100644 index 0000000000..dacb0ff8c4 --- /dev/null +++ b/packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json.d.ts @@ -0,0 +1,203 @@ +declare const abi: [ + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes"; + name: ""; + type: "bytes"; + } + ]; + name: "HookCalled"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "interfaceId"; + type: "bytes4"; + } + ]; + name: "supportsInterface"; + outputs: [ + { + internalType: "bool"; + name: ""; + type: "bool"; + } + ]; + stateMutability: "pure"; + type: "function"; + } +]; +export default abi; diff --git a/packages/store/abi/IStore.sol/IStore.abi.json b/packages/store/abi/IStore.sol/IStore.abi.json new file mode 100644 index 0000000000..974e2e74fa --- /dev/null +++ b/packages/store/abi/IStore.sol/IStore.abi.json @@ -0,0 +1,717 @@ +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_DataIndexOverflow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidDataLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidFieldNamesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidKeyNamesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidValueSchemaLength", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotDynamicField", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableNotFound", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreEphemeralRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "deleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "emitEphemeralRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "byteLengthToPop", + "type": "uint256" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "popFromField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "dataToPush", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "pushToField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "contract IStoreHook", + "name": "hookAddress", + "type": "address" + }, + { + "internalType": "uint8", + "name": "enabledHooksBitmap", + "type": "uint8" + } + ], + "name": "registerStoreHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "keyNames", + "type": "string[]" + }, + { + "internalType": "string[]", + "name": "fieldNames", + "type": "string[]" + } + ], + "name": "registerTable", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "contract IStoreHook", + "name": "hookAddress", + "type": "address" + } + ], + "name": "unregisterStoreHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "startByteIndex", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "dataToSet", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "updateInField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/store/abi/IStore.sol/IStore.abi.json.d.ts b/packages/store/abi/IStore.sol/IStore.abi.json.d.ts new file mode 100644 index 0000000000..e939bc04ed --- /dev/null +++ b/packages/store/abi/IStore.sol/IStore.abi.json.d.ts @@ -0,0 +1,718 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_DataIndexOverflow"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidDataLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidFieldNamesLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidKeyNamesLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidValueSchemaLength"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotDynamicField"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotImplemented"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableAlreadyExists"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableNotFound"; + type: "error"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreEphemeralRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "deleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "emitEphemeralRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "byteLengthToPop"; + type: "uint256"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "popFromField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "dataToPush"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "pushToField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "contract IStoreHook"; + name: "hookAddress"; + type: "address"; + }, + { + internalType: "uint8"; + name: "enabledHooksBitmap"; + type: "uint8"; + } + ]; + name: "registerStoreHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + }, + { + internalType: "string[]"; + name: "keyNames"; + type: "string[]"; + }, + { + internalType: "string[]"; + name: "fieldNames"; + type: "string[]"; + } + ]; + name: "registerTable"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "contract IStoreHook"; + name: "hookAddress"; + type: "address"; + } + ]; + name: "unregisterStoreHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "startByteIndex"; + type: "uint256"; + }, + { + internalType: "bytes"; + name: "dataToSet"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "updateInField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/store/abi/IStore.sol/IStoreData.abi.json b/packages/store/abi/IStore.sol/IStoreData.abi.json new file mode 100644 index 0000000000..f6db946f1c --- /dev/null +++ b/packages/store/abi/IStore.sol/IStoreData.abi.json @@ -0,0 +1,463 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "deleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "byteLengthToPop", + "type": "uint256" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "popFromField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "dataToPush", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "pushToField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "startByteIndex", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "dataToSet", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "updateInField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/store/abi/IStore.sol/IStoreData.abi.json.d.ts b/packages/store/abi/IStore.sol/IStoreData.abi.json.d.ts new file mode 100644 index 0000000000..077b246517 --- /dev/null +++ b/packages/store/abi/IStore.sol/IStoreData.abi.json.d.ts @@ -0,0 +1,464 @@ +declare const abi: [ + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "deleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "byteLengthToPop"; + type: "uint256"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "popFromField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "dataToPush"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "pushToField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "startByteIndex"; + type: "uint256"; + }, + { + internalType: "bytes"; + name: "dataToSet"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "updateInField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/store/abi/IStore.sol/IStoreEphemeral.abi.json b/packages/store/abi/IStore.sol/IStoreEphemeral.abi.json new file mode 100644 index 0000000000..f591aa2757 --- /dev/null +++ b/packages/store/abi/IStore.sol/IStoreEphemeral.abi.json @@ -0,0 +1,55 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreEphemeralRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "emitEphemeralRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/store/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts b/packages/store/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts new file mode 100644 index 0000000000..9b9186d587 --- /dev/null +++ b/packages/store/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts @@ -0,0 +1,56 @@ +declare const abi: [ + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreEphemeralRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "emitEphemeralRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/store/abi/IStore.sol/IStoreRead.abi.json b/packages/store/abi/IStore.sol/IStoreRead.abi.json new file mode 100644 index 0000000000..5fb8e1bc53 --- /dev/null +++ b/packages/store/abi/IStore.sol/IStoreRead.abi.json @@ -0,0 +1,200 @@ +[ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/store/abi/IStore.sol/IStoreRead.abi.json.d.ts b/packages/store/abi/IStore.sol/IStoreRead.abi.json.d.ts new file mode 100644 index 0000000000..9ca275d41b --- /dev/null +++ b/packages/store/abi/IStore.sol/IStoreRead.abi.json.d.ts @@ -0,0 +1,201 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + } +]; +export default abi; diff --git a/packages/store/abi/IStore.sol/IStoreWrite.abi.json b/packages/store/abi/IStore.sol/IStoreWrite.abi.json new file mode 100644 index 0000000000..352fb8196a --- /dev/null +++ b/packages/store/abi/IStore.sol/IStoreWrite.abi.json @@ -0,0 +1,265 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "deleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "byteLengthToPop", + "type": "uint256" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "popFromField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "dataToPush", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "pushToField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "startByteIndex", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "dataToSet", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "updateInField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/store/abi/IStore.sol/IStoreWrite.abi.json.d.ts b/packages/store/abi/IStore.sol/IStoreWrite.abi.json.d.ts new file mode 100644 index 0000000000..04ce5d76ab --- /dev/null +++ b/packages/store/abi/IStore.sol/IStoreWrite.abi.json.d.ts @@ -0,0 +1,266 @@ +declare const abi: [ + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "deleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "byteLengthToPop"; + type: "uint256"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "popFromField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "dataToPush"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "pushToField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "startByteIndex"; + type: "uint256"; + }, + { + internalType: "bytes"; + name: "dataToSet"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "updateInField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/store/abi/IStoreHook.sol/IStoreHook.abi.json b/packages/store/abi/IStoreHook.sol/IStoreHook.abi.json new file mode 100644 index 0000000000..9782a97c93 --- /dev/null +++ b/packages/store/abi/IStoreHook.sol/IStoreHook.abi.json @@ -0,0 +1,189 @@ +[ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/store/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts b/packages/store/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts new file mode 100644 index 0000000000..d3e9224ef8 --- /dev/null +++ b/packages/store/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts @@ -0,0 +1,190 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "interfaceID"; + type: "bytes4"; + } + ]; + name: "supportsInterface"; + outputs: [ + { + internalType: "bool"; + name: ""; + type: "bool"; + } + ]; + stateMutability: "view"; + type: "function"; + } +]; +export default abi; diff --git a/packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json b/packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json new file mode 100644 index 0000000000..750e79f3bb --- /dev/null +++ b/packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json @@ -0,0 +1,294 @@ +[ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "keyNames", + "type": "string[]" + }, + { + "internalType": "string[]", + "name": "fieldNames", + "type": "string[]" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "FieldLayoutLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthIsZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "PackedCounter_InvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "Slice_OutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidDataLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "", + "type": "bytes32" + } + ], + "name": "onAfterSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json.d.ts b/packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json.d.ts new file mode 100644 index 0000000000..6bd3d612aa --- /dev/null +++ b/packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json.d.ts @@ -0,0 +1,295 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + }, + { + internalType: "string[]"; + name: "keyNames"; + type: "string[]"; + }, + { + internalType: "string[]"; + name: "fieldNames"; + type: "string[]"; + } + ]; + stateMutability: "nonpayable"; + type: "constructor"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "FieldLayoutLib_InvalidLength"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthIsZero"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "PackedCounter_InvalidLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "Slice_OutOfBounds"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidDataLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: ""; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: ""; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: ""; + type: "uint8"; + }, + { + internalType: "bytes"; + name: ""; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: ""; + type: "bytes32"; + } + ]; + name: "onAfterSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "interfaceId"; + type: "bytes4"; + } + ]; + name: "supportsInterface"; + outputs: [ + { + internalType: "bool"; + name: ""; + type: "bool"; + } + ]; + stateMutability: "pure"; + type: "function"; + } +]; +export default abi; diff --git a/packages/store/abi/StoreCore.sol/StoreCore.abi.json b/packages/store/abi/StoreCore.sol/StoreCore.abi.json new file mode 100644 index 0000000000..3808909d9a --- /dev/null +++ b/packages/store/abi/StoreCore.sol/StoreCore.abi.json @@ -0,0 +1,102 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreEphemeralRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "fieldIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + } +] \ No newline at end of file diff --git a/packages/store/abi/StoreCore.sol/StoreCore.abi.json.d.ts b/packages/store/abi/StoreCore.sol/StoreCore.abi.json.d.ts new file mode 100644 index 0000000000..fa9de440d1 --- /dev/null +++ b/packages/store/abi/StoreCore.sol/StoreCore.abi.json.d.ts @@ -0,0 +1,103 @@ +declare const abi: [ + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreEphemeralRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "fieldIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + } +]; +export default abi; diff --git a/packages/store/abi/StoreHook.sol/StoreHook.abi.json b/packages/store/abi/StoreHook.sol/StoreHook.abi.json new file mode 100644 index 0000000000..59ef8376aa --- /dev/null +++ b/packages/store/abi/StoreHook.sol/StoreHook.abi.json @@ -0,0 +1,189 @@ +[ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/store/abi/StoreHook.sol/StoreHook.abi.json.d.ts b/packages/store/abi/StoreHook.sol/StoreHook.abi.json.d.ts new file mode 100644 index 0000000000..4091c781ed --- /dev/null +++ b/packages/store/abi/StoreHook.sol/StoreHook.abi.json.d.ts @@ -0,0 +1,190 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "interfaceId"; + type: "bytes4"; + } + ]; + name: "supportsInterface"; + outputs: [ + { + internalType: "bool"; + name: ""; + type: "bool"; + } + ]; + stateMutability: "pure"; + type: "function"; + } +]; +export default abi; diff --git a/packages/store/abi/StoreMock.sol/StoreMock.abi.json b/packages/store/abi/StoreMock.sol/StoreMock.abi.json new file mode 100644 index 0000000000..7cd7dccb82 --- /dev/null +++ b/packages/store/abi/StoreMock.sol/StoreMock.abi.json @@ -0,0 +1,791 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "FieldLayoutLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthIsZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "PackedCounter_InvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "SchemaLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SchemaLib_StaticTypeAfterDynamicType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "Slice_OutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_DataIndexOverflow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidDataLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidFieldNamesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidKeyNamesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidValueSchemaLength", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotDynamicField", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableNotFound", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreEphemeralRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "deleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "emitEphemeralRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "byteLengthToPop", + "type": "uint256" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "popFromField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "dataToPush", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "pushToField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "contract IStoreHook", + "name": "hookAddress", + "type": "address" + }, + { + "internalType": "uint8", + "name": "enabledHooksBitmap", + "type": "uint8" + } + ], + "name": "registerStoreHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "keyNames", + "type": "string[]" + }, + { + "internalType": "string[]", + "name": "fieldNames", + "type": "string[]" + } + ], + "name": "registerTable", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "contract IStoreHook", + "name": "hookAddress", + "type": "address" + } + ], + "name": "unregisterStoreHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "startByteIndex", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "dataToSet", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "updateInField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/store/abi/StoreMock.sol/StoreMock.abi.json.d.ts b/packages/store/abi/StoreMock.sol/StoreMock.abi.json.d.ts new file mode 100644 index 0000000000..0f24437cb3 --- /dev/null +++ b/packages/store/abi/StoreMock.sol/StoreMock.abi.json.d.ts @@ -0,0 +1,792 @@ +declare const abi: [ + { + inputs: []; + stateMutability: "nonpayable"; + type: "constructor"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "FieldLayoutLib_InvalidLength"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthIsZero"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "PackedCounter_InvalidLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "SchemaLib_InvalidLength"; + type: "error"; + }, + { + inputs: []; + name: "SchemaLib_StaticTypeAfterDynamicType"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "Slice_OutOfBounds"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_DataIndexOverflow"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidDataLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidFieldNamesLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidKeyNamesLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidValueSchemaLength"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotDynamicField"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotImplemented"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableAlreadyExists"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableNotFound"; + type: "error"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreEphemeralRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "deleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "emitEphemeralRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: ""; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "byteLengthToPop"; + type: "uint256"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "popFromField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "dataToPush"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "pushToField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "contract IStoreHook"; + name: "hookAddress"; + type: "address"; + }, + { + internalType: "uint8"; + name: "enabledHooksBitmap"; + type: "uint8"; + } + ]; + name: "registerStoreHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + }, + { + internalType: "string[]"; + name: "keyNames"; + type: "string[]"; + }, + { + internalType: "string[]"; + name: "fieldNames"; + type: "string[]"; + } + ]; + name: "registerTable"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "contract IStoreHook"; + name: "hookAddress"; + type: "address"; + } + ]; + name: "unregisterStoreHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "startByteIndex"; + type: "uint256"; + }, + { + internalType: "bytes"; + name: "dataToSet"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "updateInField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/store/abi/StoreRead.sol/StoreRead.abi.json b/packages/store/abi/StoreRead.sol/StoreRead.abi.json new file mode 100644 index 0000000000..7ac3c66a02 --- /dev/null +++ b/packages/store/abi/StoreRead.sol/StoreRead.abi.json @@ -0,0 +1,242 @@ +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "FieldLayoutLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthIsZero", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotDynamicField", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/store/abi/StoreRead.sol/StoreRead.abi.json.d.ts b/packages/store/abi/StoreRead.sol/StoreRead.abi.json.d.ts new file mode 100644 index 0000000000..8a28178333 --- /dev/null +++ b/packages/store/abi/StoreRead.sol/StoreRead.abi.json.d.ts @@ -0,0 +1,243 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "FieldLayoutLib_InvalidLength"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthIsZero"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotDynamicField"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableNotFound"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: ""; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + } +]; +export default abi; diff --git a/packages/store/src/IStore.sol b/packages/store/src/IStore.sol index 86031f0c32..68df303f9e 100644 --- a/packages/store/src/IStore.sol +++ b/packages/store/src/IStore.sol @@ -16,14 +16,14 @@ interface IStoreRead { // Get full record (including full array) function getRecord( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, FieldLayout fieldLayout ) external view returns (bytes memory data); // Get partial data at schema index function getField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, FieldLayout fieldLayout ) external view returns (bytes memory data); @@ -31,7 +31,7 @@ interface IStoreRead { // Get field length at schema index function getFieldLength( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, FieldLayout fieldLayout ) external view returns (uint256); @@ -39,7 +39,7 @@ interface IStoreRead { // Get start:end slice of the field at schema index function getFieldSlice( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, FieldLayout fieldLayout, uint256 start, @@ -48,17 +48,22 @@ interface IStoreRead { } interface IStoreWrite { - event StoreSetRecord(bytes32 tableId, bytes32[] key, bytes data); - event StoreSetField(bytes32 tableId, bytes32[] key, uint8 schemaIndex, bytes data); - event StoreDeleteRecord(bytes32 tableId, bytes32[] key); + event StoreSetRecord(bytes32 tableId, bytes32[] keyTuple, bytes data); + event StoreSetField(bytes32 tableId, bytes32[] keyTuple, uint8 schemaIndex, bytes data); + event StoreDeleteRecord(bytes32 tableId, bytes32[] keyTuple); // Set full record (including full dynamic data) - function setRecord(bytes32 tableId, bytes32[] calldata key, bytes calldata data, FieldLayout fieldLayout) external; + function setRecord( + bytes32 tableId, + bytes32[] calldata keyTuple, + bytes calldata data, + FieldLayout fieldLayout + ) external; // Set partial data at schema index function setField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, bytes calldata data, FieldLayout fieldLayout @@ -67,7 +72,7 @@ interface IStoreWrite { // Push encoded items to the dynamic field at schema index function pushToField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, bytes calldata dataToPush, FieldLayout fieldLayout @@ -76,7 +81,7 @@ interface IStoreWrite { // Pop byte length from the dynamic field at schema index function popFromField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, uint256 byteLengthToPop, FieldLayout fieldLayout @@ -85,7 +90,7 @@ interface IStoreWrite { // Change encoded items within the dynamic field at schema index function updateInField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, uint256 startByteIndex, bytes calldata dataToSet, @@ -93,16 +98,16 @@ interface IStoreWrite { ) external; // Set full record (including full dynamic data) - function deleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) external; + function deleteRecord(bytes32 tableId, bytes32[] memory keyTuple, FieldLayout fieldLayout) external; } interface IStoreEphemeral { - event StoreEphemeralRecord(bytes32 tableId, bytes32[] key, bytes data); + event StoreEphemeralRecord(bytes32 tableId, bytes32[] keyTuple, bytes data); // Emit the ephemeral event without modifying storage function emitEphemeralRecord( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, bytes calldata data, FieldLayout fieldLayout ) external; diff --git a/packages/store/src/IStoreHook.sol b/packages/store/src/IStoreHook.sol index dd75547967..fa65ff4cff 100644 --- a/packages/store/src/IStoreHook.sol +++ b/packages/store/src/IStoreHook.sol @@ -16,16 +16,21 @@ bytes4 constant STORE_HOOK_INTERFACE_ID = IStoreHook.onBeforeSetRecord.selector interface IStoreHook is IERC165 { function onBeforeSetRecord( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, bytes memory data, FieldLayout fieldLayout ) external; - function onAfterSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) external; + function onAfterSetRecord( + bytes32 tableId, + bytes32[] memory keyTuple, + bytes memory data, + FieldLayout fieldLayout + ) external; function onBeforeSetField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, bytes memory data, FieldLayout fieldLayout @@ -33,13 +38,13 @@ interface IStoreHook is IERC165 { function onAfterSetField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, bytes memory data, FieldLayout fieldLayout ) external; - function onBeforeDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) external; + function onBeforeDeleteRecord(bytes32 tableId, bytes32[] memory keyTuple, FieldLayout fieldLayout) external; - function onAfterDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) external; + function onAfterDeleteRecord(bytes32 tableId, bytes32[] memory keyTuple, FieldLayout fieldLayout) external; } diff --git a/packages/store/src/StoreCore.sol b/packages/store/src/StoreCore.sol index 112ab25a0f..c21a87125d 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 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); + event StoreSetRecord(bytes32 tableId, bytes32[] keyTuple, bytes data); + event StoreSetField(bytes32 tableId, bytes32[] keyTuple, uint8 fieldIndex, bytes data); + event StoreDeleteRecord(bytes32 tableId, bytes32[] keyTuple); + event StoreEphemeralRecord(bytes32 tableId, bytes32[] keyTuple, bytes data); /** * Intialize the store address to use in StoreSwitch. @@ -89,7 +89,7 @@ library StoreCore { } /** - * Register a new table with key field layout, value field layout, key names, and value names + * Register a new table the given config */ function registerTable( bytes32 tableId, @@ -164,7 +164,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 { + function setRecord(bytes32 tableId, bytes32[] memory keyTuple, bytes memory data, FieldLayout fieldLayout) internal { // verify the value has the correct length for the tableId (based on the tableId's field layout) // to prevent invalid data from being stored @@ -172,19 +172,19 @@ library StoreCore { (uint256 staticLength, PackedCounter dynamicLength) = StoreCoreInternal._validateDataLength(fieldLayout, data); // Emit event to notify indexers - emit StoreSetRecord(tableId, key, data); + emit StoreSetRecord(tableId, keyTuple, data); // Call onBeforeSetRecord hooks (before actually modifying the state, so observers have access to the previous state if needed) bytes21[] memory hooks = StoreHooks.get(tableId); for (uint256 i; i < hooks.length; i++) { Hook hook = Hook.wrap(hooks[i]); if (hook.isEnabled(uint8(StoreHookType.BEFORE_SET_RECORD))) { - IStoreHook(hook.getAddress()).onBeforeSetRecord(tableId, key, data, fieldLayout); + IStoreHook(hook.getAddress()).onBeforeSetRecord(tableId, keyTuple, data, fieldLayout); } } // Store the static data at the static data location - uint256 staticDataLocation = StoreCoreInternal._getStaticDataLocation(tableId, key); + uint256 staticDataLocation = StoreCoreInternal._getStaticDataLocation(tableId, keyTuple); uint256 memoryPointer = Memory.dataPointer(data); Storage.store({ storagePointer: staticDataLocation, @@ -197,14 +197,14 @@ library StoreCore { // Set the dynamic data if there are dynamic fields if (fieldLayout.numDynamicFields() > 0) { // Store the dynamic data length at the dynamic data length location - uint256 dynamicDataLengthLocation = StoreCoreInternal._getDynamicDataLengthLocation(tableId, key); + uint256 dynamicDataLengthLocation = StoreCoreInternal._getDynamicDataLengthLocation(tableId, keyTuple); Storage.store({ storagePointer: dynamicDataLengthLocation, data: dynamicLength.unwrap() }); // For every dynamic element, slice off the dynamic data and store it at the dynamic location uint256 dynamicDataLocation; uint256 dynamicDataLength; for (uint8 i; i < fieldLayout.numDynamicFields(); ) { - dynamicDataLocation = StoreCoreInternal._getDynamicDataLocation(tableId, key, i); + dynamicDataLocation = StoreCoreInternal._getDynamicDataLocation(tableId, keyTuple, i); dynamicDataLength = dynamicLength.atIndex(i); Storage.store({ storagePointer: dynamicDataLocation, @@ -223,7 +223,7 @@ library StoreCore { for (uint256 i; i < hooks.length; i++) { Hook hook = Hook.wrap(hooks[i]); if (hook.isEnabled(uint8(StoreHookType.AFTER_SET_RECORD))) { - IStoreHook(hook.getAddress()).onAfterSetRecord(tableId, key, data, fieldLayout); + IStoreHook(hook.getAddress()).onAfterSetRecord(tableId, keyTuple, data, fieldLayout); } } } @@ -233,34 +233,34 @@ library StoreCore { */ function setField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, bytes memory data, FieldLayout fieldLayout ) internal { // Emit event to notify indexers - emit StoreSetField(tableId, key, schemaIndex, data); + emit StoreSetField(tableId, keyTuple, schemaIndex, data); // Call onBeforeSetField hooks (before modifying the state) bytes21[] memory hooks = StoreHooks.get(tableId); for (uint256 i; i < hooks.length; i++) { Hook hook = Hook.wrap(hooks[i]); if (hook.isEnabled(uint8(StoreHookType.BEFORE_SET_FIELD))) { - IStoreHook(hook.getAddress()).onBeforeSetField(tableId, key, schemaIndex, data, fieldLayout); + IStoreHook(hook.getAddress()).onBeforeSetField(tableId, keyTuple, schemaIndex, data, fieldLayout); } } if (schemaIndex < fieldLayout.numStaticFields()) { - StoreCoreInternal._setStaticField(tableId, key, fieldLayout, schemaIndex, data); + StoreCoreInternal._setStaticField(tableId, keyTuple, fieldLayout, schemaIndex, data); } else { - StoreCoreInternal._setDynamicField(tableId, key, fieldLayout, schemaIndex, data); + StoreCoreInternal._setDynamicField(tableId, keyTuple, fieldLayout, schemaIndex, data); } // Call onAfterSetField hooks (after modifying the state) for (uint256 i; i < hooks.length; i++) { Hook hook = Hook.wrap(hooks[i]); if (hook.isEnabled(uint8(StoreHookType.AFTER_SET_FIELD))) { - IStoreHook(hook.getAddress()).onAfterSetField(tableId, key, schemaIndex, data, fieldLayout); + IStoreHook(hook.getAddress()).onAfterSetField(tableId, keyTuple, schemaIndex, data, fieldLayout); } } } @@ -268,26 +268,26 @@ library StoreCore { /** * Delete a record for the given tableId, key tuple and value field layout */ - function deleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) internal { + function deleteRecord(bytes32 tableId, bytes32[] memory keyTuple, FieldLayout fieldLayout) internal { // Emit event to notify indexers - emit StoreDeleteRecord(tableId, key); + emit StoreDeleteRecord(tableId, keyTuple); // Call onBeforeDeleteRecord hooks (before actually modifying the state, so observers have access to the previous state if needed) bytes21[] memory hooks = StoreHooks.get(tableId); for (uint256 i; i < hooks.length; i++) { Hook hook = Hook.wrap(hooks[i]); if (hook.isEnabled(uint8(StoreHookType.BEFORE_DELETE_RECORD))) { - IStoreHook(hook.getAddress()).onBeforeDeleteRecord(tableId, key, fieldLayout); + IStoreHook(hook.getAddress()).onBeforeDeleteRecord(tableId, keyTuple, fieldLayout); } } // Delete static data - uint256 staticDataLocation = StoreCoreInternal._getStaticDataLocation(tableId, key); + uint256 staticDataLocation = StoreCoreInternal._getStaticDataLocation(tableId, keyTuple); Storage.store({ storagePointer: staticDataLocation, offset: 0, data: new bytes(fieldLayout.staticDataLength()) }); // If there are dynamic fields, delete the dynamic data length if (fieldLayout.numDynamicFields() > 0) { - uint256 dynamicDataLengthLocation = StoreCoreInternal._getDynamicDataLengthLocation(tableId, key); + uint256 dynamicDataLengthLocation = StoreCoreInternal._getDynamicDataLengthLocation(tableId, keyTuple); Storage.store({ storagePointer: dynamicDataLengthLocation, data: bytes32(0) }); } @@ -295,17 +295,17 @@ library StoreCore { for (uint256 i; i < hooks.length; i++) { Hook hook = Hook.wrap(hooks[i]); if (hook.isEnabled(uint8(StoreHookType.AFTER_DELETE_RECORD))) { - IStoreHook(hook.getAddress()).onAfterDeleteRecord(tableId, key, fieldLayout); + IStoreHook(hook.getAddress()).onAfterDeleteRecord(tableId, keyTuple, fieldLayout); } } } /** - * Push data to a field in a table with the given tableId, key tuple and value field layout + * Push data to a field in a table with the given tableId, keyTuple tuple and value field layout */ function pushToField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, bytes memory dataToPush, FieldLayout fieldLayout @@ -316,29 +316,29 @@ library StoreCore { // TODO add push-specific event and hook to avoid the storage read? (https://github.com/latticexyz/mud/issues/444) bytes memory fullData = abi.encodePacked( - StoreCoreInternal._getDynamicField(tableId, key, schemaIndex, fieldLayout), + StoreCoreInternal._getDynamicField(tableId, keyTuple, schemaIndex, fieldLayout), dataToPush ); // Emit event to notify indexers - emit StoreSetField(tableId, key, schemaIndex, fullData); + emit StoreSetField(tableId, keyTuple, schemaIndex, fullData); // Call onBeforeSetField hooks (before modifying the state) bytes21[] memory hooks = StoreHooks.get(tableId); for (uint256 i; i < hooks.length; i++) { Hook hook = Hook.wrap(hooks[i]); if (hook.isEnabled(uint8(StoreHookType.BEFORE_SET_FIELD))) { - IStoreHook(hook.getAddress()).onBeforeSetField(tableId, key, schemaIndex, fullData, fieldLayout); + IStoreHook(hook.getAddress()).onBeforeSetField(tableId, keyTuple, schemaIndex, fullData, fieldLayout); } } - StoreCoreInternal._pushToDynamicField(tableId, key, fieldLayout, schemaIndex, dataToPush); + StoreCoreInternal._pushToDynamicField(tableId, keyTuple, fieldLayout, schemaIndex, dataToPush); // Call onAfterSetField hooks (after modifying the state) for (uint256 i; i < hooks.length; i++) { Hook hook = Hook.wrap(hooks[i]); if (hook.isEnabled(uint8(StoreHookType.AFTER_SET_FIELD))) { - IStoreHook(hook.getAddress()).onAfterSetField(tableId, key, schemaIndex, fullData, fieldLayout); + IStoreHook(hook.getAddress()).onAfterSetField(tableId, keyTuple, schemaIndex, fullData, fieldLayout); } } } @@ -348,7 +348,7 @@ library StoreCore { */ function popFromField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, uint256 byteLengthToPop, FieldLayout fieldLayout @@ -360,29 +360,29 @@ library StoreCore { // TODO add pop-specific event and hook to avoid the storage read? (https://github.com/latticexyz/mud/issues/444) bytes memory fullData; { - bytes memory oldData = StoreCoreInternal._getDynamicField(tableId, key, schemaIndex, fieldLayout); + bytes memory oldData = StoreCoreInternal._getDynamicField(tableId, keyTuple, schemaIndex, fieldLayout); fullData = SliceLib.getSubslice(oldData, 0, oldData.length - byteLengthToPop).toBytes(); } // Emit event to notify indexers - emit StoreSetField(tableId, key, schemaIndex, fullData); + emit StoreSetField(tableId, keyTuple, schemaIndex, fullData); // Call onBeforeSetField hooks (before modifying the state) bytes21[] memory hooks = StoreHooks.get(tableId); for (uint256 i; i < hooks.length; i++) { Hook hook = Hook.wrap(hooks[i]); if (hook.isEnabled(uint8(StoreHookType.BEFORE_SET_FIELD))) { - IStoreHook(hook.getAddress()).onBeforeSetField(tableId, key, schemaIndex, fullData, fieldLayout); + IStoreHook(hook.getAddress()).onBeforeSetField(tableId, keyTuple, schemaIndex, fullData, fieldLayout); } } - StoreCoreInternal._popFromDynamicField(tableId, key, fieldLayout, schemaIndex, byteLengthToPop); + StoreCoreInternal._popFromDynamicField(tableId, keyTuple, fieldLayout, schemaIndex, byteLengthToPop); // Call onAfterSetField hooks (after modifying the state) for (uint256 i; i < hooks.length; i++) { Hook hook = Hook.wrap(hooks[i]); if (hook.isEnabled(uint8(StoreHookType.AFTER_SET_FIELD))) { - IStoreHook(hook.getAddress()).onAfterSetField(tableId, key, schemaIndex, fullData, fieldLayout); + IStoreHook(hook.getAddress()).onAfterSetField(tableId, keyTuple, schemaIndex, fullData, fieldLayout); } } } @@ -392,7 +392,7 @@ library StoreCore { */ function updateInField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, uint256 startByteIndex, bytes memory dataToSet, @@ -410,7 +410,7 @@ library StoreCore { // TODO add setItem-specific event and hook to avoid the storage read? (https://github.com/latticexyz/mud/issues/444) bytes memory fullData; { - bytes memory oldData = StoreCoreInternal._getDynamicField(tableId, key, schemaIndex, fieldLayout); + bytes memory oldData = StoreCoreInternal._getDynamicField(tableId, keyTuple, schemaIndex, fieldLayout); fullData = abi.encodePacked( SliceLib.getSubslice(oldData, 0, startByteIndex).toBytes(), dataToSet, @@ -419,24 +419,24 @@ library StoreCore { } // Emit event to notify indexers - emit StoreSetField(tableId, key, schemaIndex, fullData); + emit StoreSetField(tableId, keyTuple, schemaIndex, fullData); // Call onBeforeSetField hooks (before modifying the state) bytes21[] memory hooks = StoreHooks.get(tableId); for (uint256 i; i < hooks.length; i++) { Hook hook = Hook.wrap(hooks[i]); if (hook.isEnabled(uint8(StoreHookType.BEFORE_SET_FIELD))) { - IStoreHook(hook.getAddress()).onBeforeSetField(tableId, key, schemaIndex, fullData, fieldLayout); + IStoreHook(hook.getAddress()).onBeforeSetField(tableId, keyTuple, schemaIndex, fullData, fieldLayout); } } - StoreCoreInternal._setDynamicFieldItem(tableId, key, fieldLayout, schemaIndex, startByteIndex, dataToSet); + StoreCoreInternal._setDynamicFieldItem(tableId, keyTuple, fieldLayout, schemaIndex, startByteIndex, dataToSet); // Call onAfterSetField hooks (after modifying the state) for (uint256 i; i < hooks.length; i++) { Hook hook = Hook.wrap(hooks[i]); if (hook.isEnabled(uint8(StoreHookType.AFTER_SET_FIELD))) { - IStoreHook(hook.getAddress()).onAfterSetField(tableId, key, schemaIndex, fullData, fieldLayout); + IStoreHook(hook.getAddress()).onAfterSetField(tableId, keyTuple, schemaIndex, fullData, fieldLayout); } } } @@ -452,7 +452,7 @@ library StoreCore { */ function emitEphemeralRecord( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, bytes memory data, FieldLayout fieldLayout ) internal { @@ -460,7 +460,7 @@ library StoreCore { StoreCoreInternal._validateDataLength(fieldLayout, data); // Emit event to notify indexers - emit StoreEphemeralRecord(tableId, key, data); + emit StoreEphemeralRecord(tableId, keyTuple, data); } /************************************************************************ @@ -474,7 +474,7 @@ library StoreCore { */ function getRecord( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, FieldLayout fieldLayout ) internal view returns (bytes memory) { // Get the static data length @@ -485,7 +485,7 @@ library StoreCore { PackedCounter dynamicDataLength; uint256 numDynamicFields = fieldLayout.numDynamicFields(); if (numDynamicFields > 0) { - dynamicDataLength = StoreCoreInternal._loadEncodedDynamicDataLength(tableId, key); + dynamicDataLength = StoreCoreInternal._loadEncodedDynamicDataLength(tableId, keyTuple); // TODO should total output include dynamic data length even if it's 0? if (dynamicDataLength.total() > 0) { outputLength += 32 + dynamicDataLength.total(); // encoded length + data @@ -497,7 +497,7 @@ library StoreCore { uint256 memoryPointer = Memory.dataPointer(data); // Load the static data from storage - StoreCoreInternal._getStaticData(tableId, key, staticLength, memoryPointer); + StoreCoreInternal._getStaticData(tableId, keyTuple, staticLength, memoryPointer); // Early return if there are no dynamic fields if (dynamicDataLength.total() == 0) return data; @@ -513,7 +513,7 @@ library StoreCore { // Append dynamic data for (uint8 i; i < numDynamicFields; i++) { - uint256 dynamicDataLocation = StoreCoreInternal._getDynamicDataLocation(tableId, key, i); + uint256 dynamicDataLocation = StoreCoreInternal._getDynamicDataLocation(tableId, keyTuple, i); uint256 length = dynamicDataLength.atIndex(i); Storage.load({ storagePointer: dynamicDataLocation, length: length, offset: 0, memoryPointer: memoryPointer }); // Advance memoryPointer by the length of this dynamic field @@ -529,14 +529,14 @@ library StoreCore { */ function getField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, FieldLayout fieldLayout ) internal view returns (bytes memory) { if (schemaIndex < fieldLayout.numStaticFields()) { - return StoreCoreInternal._getStaticField(tableId, key, schemaIndex, fieldLayout); + return StoreCoreInternal._getStaticField(tableId, keyTuple, schemaIndex, fieldLayout); } else { - return StoreCoreInternal._getDynamicField(tableId, key, schemaIndex, fieldLayout); + return StoreCoreInternal._getDynamicField(tableId, keyTuple, schemaIndex, fieldLayout); } } @@ -545,7 +545,7 @@ library StoreCore { */ function getFieldLength( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, FieldLayout fieldLayout ) internal view returns (uint256) { @@ -555,7 +555,7 @@ library StoreCore { } else { // Get the length and storage location of the dynamic field uint8 dynamicFieldLayoutIndex = schemaIndex - numStaticFields; - return StoreCoreInternal._loadEncodedDynamicDataLength(tableId, key).atIndex(dynamicFieldLayoutIndex); + return StoreCoreInternal._loadEncodedDynamicDataLength(tableId, keyTuple).atIndex(dynamicFieldLayoutIndex); } } @@ -565,7 +565,7 @@ library StoreCore { */ function getFieldSlice( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, FieldLayout fieldLayout, uint256 start, @@ -578,7 +578,7 @@ library StoreCore { // Get the length and storage location of the dynamic field uint8 dynamicSchemaIndex = schemaIndex - numStaticFields; - uint256 location = StoreCoreInternal._getDynamicDataLocation(tableId, key, dynamicSchemaIndex); + uint256 location = StoreCoreInternal._getDynamicDataLocation(tableId, keyTuple, dynamicSchemaIndex); return Storage.load({ storagePointer: location, length: end - start, offset: start }); } @@ -595,7 +595,7 @@ library StoreCoreInternal { function _setStaticField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, FieldLayout fieldLayout, uint8 schemaIndex, bytes memory data @@ -607,14 +607,14 @@ library StoreCoreInternal { } // Store the provided value in storage - uint256 location = _getStaticDataLocation(tableId, key); + uint256 location = _getStaticDataLocation(tableId, keyTuple); uint256 offset = _getStaticDataOffset(fieldLayout, schemaIndex); Storage.store({ storagePointer: location, offset: offset, data: data }); } function _setDynamicField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, FieldLayout fieldLayout, uint8 schemaIndex, bytes memory data @@ -622,16 +622,16 @@ library StoreCoreInternal { uint8 dynamicSchemaIndex = schemaIndex - uint8(fieldLayout.numStaticFields()); // Update the dynamic data length - _setDynamicDataLengthAtIndex(tableId, key, dynamicSchemaIndex, data.length); + _setDynamicDataLengthAtIndex(tableId, keyTuple, dynamicSchemaIndex, data.length); // Store the provided value in storage - uint256 dynamicDataLocation = _getDynamicDataLocation(tableId, key, dynamicSchemaIndex); + uint256 dynamicDataLocation = _getDynamicDataLocation(tableId, keyTuple, dynamicSchemaIndex); Storage.store({ storagePointer: dynamicDataLocation, offset: 0, data: data }); } function _pushToDynamicField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, FieldLayout fieldLayout, uint8 schemaIndex, bytes memory dataToPush @@ -639,7 +639,7 @@ library StoreCoreInternal { uint8 dynamicSchemaIndex = schemaIndex - uint8(fieldLayout.numStaticFields()); // Load dynamic data length from storage - uint256 dynamicDataLengthSlot = _getDynamicDataLengthLocation(tableId, key); + uint256 dynamicDataLengthSlot = _getDynamicDataLengthLocation(tableId, keyTuple); PackedCounter encodedLengths = PackedCounter.wrap(Storage.load({ storagePointer: dynamicDataLengthSlot })); // Update the encoded length @@ -650,12 +650,12 @@ library StoreCoreInternal { Storage.store({ storagePointer: dynamicDataLengthSlot, data: encodedLengths.unwrap() }); // Append `dataToPush` to the end of the data in storage - _setPartialDynamicData(tableId, key, dynamicSchemaIndex, oldFieldLength, dataToPush); + _setPartialDynamicData(tableId, keyTuple, dynamicSchemaIndex, oldFieldLength, dataToPush); } function _popFromDynamicField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, FieldLayout fieldLayout, uint8 schemaIndex, uint256 byteLengthToPop @@ -663,7 +663,7 @@ library StoreCoreInternal { uint8 dynamicSchemaIndex = schemaIndex - uint8(fieldLayout.numStaticFields()); // Load dynamic data length from storage - uint256 dynamicDataLengthSlot = _getDynamicDataLengthLocation(tableId, key); + uint256 dynamicDataLengthSlot = _getDynamicDataLengthLocation(tableId, keyTuple); PackedCounter encodedLengths = PackedCounter.wrap(Storage.load({ storagePointer: dynamicDataLengthSlot })); // Update the encoded length @@ -679,7 +679,7 @@ library StoreCoreInternal { // startOffset is measured in bytes function _setDynamicFieldItem( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, FieldLayout fieldLayout, uint8 schemaIndex, uint256 startByteIndex, @@ -688,7 +688,7 @@ library StoreCoreInternal { uint8 dynamicSchemaIndex = schemaIndex - uint8(fieldLayout.numStaticFields()); // Set `dataToSet` at the given index - _setPartialDynamicData(tableId, key, dynamicSchemaIndex, startByteIndex, dataToSet); + _setPartialDynamicData(tableId, keyTuple, dynamicSchemaIndex, startByteIndex, dataToSet); } /************************************************************************ @@ -700,11 +700,16 @@ library StoreCoreInternal { /** * Get full static data for the given tableId and key tuple, with the given static length */ - function _getStaticData(bytes32 tableId, bytes32[] memory key, uint256 length, uint256 memoryPointer) internal view { + function _getStaticData( + bytes32 tableId, + bytes32[] memory keyTuple, + uint256 length, + uint256 memoryPointer + ) internal view { if (length == 0) return; // Load the data from storage - uint256 location = _getStaticDataLocation(tableId, key); + uint256 location = _getStaticDataLocation(tableId, keyTuple); Storage.load({ storagePointer: location, length: length, offset: 0, memoryPointer: memoryPointer }); } @@ -713,13 +718,13 @@ library StoreCoreInternal { */ function _getStaticField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, FieldLayout fieldLayout ) internal view returns (bytes memory) { // Get the length, storage location and offset of the static field uint256 staticByteLength = fieldLayout.atIndex(schemaIndex); - uint256 location = _getStaticDataLocation(tableId, key); + uint256 location = _getStaticDataLocation(tableId, keyTuple); uint256 offset = _getStaticDataOffset(fieldLayout, schemaIndex); // Load the data from storage @@ -732,14 +737,14 @@ library StoreCoreInternal { */ function _getDynamicField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, FieldLayout fieldLayout ) internal view returns (bytes memory) { // Get the length and storage location of the dynamic field uint8 dynamicSchemaIndex = schemaIndex - uint8(fieldLayout.numStaticFields()); - uint256 location = _getDynamicDataLocation(tableId, key, dynamicSchemaIndex); - uint256 dataLength = _loadEncodedDynamicDataLength(tableId, key).atIndex(dynamicSchemaIndex); + uint256 location = _getDynamicDataLocation(tableId, keyTuple, dynamicSchemaIndex); + uint256 dataLength = _loadEncodedDynamicDataLength(tableId, keyTuple).atIndex(dynamicSchemaIndex); return Storage.load({ storagePointer: location, length: dataLength, offset: 0 }); } @@ -779,8 +784,8 @@ library StoreCoreInternal { /** * Compute the storage location based on tableId id and index tuple */ - function _getStaticDataLocation(bytes32 tableId, bytes32[] memory key) internal pure returns (uint256) { - return uint256(keccak256(abi.encode(SLOT, tableId, key))); + function _getStaticDataLocation(bytes32 tableId, bytes32[] memory keyTuple) internal pure returns (uint256) { + return uint256(keccak256(abi.encode(SLOT, tableId, keyTuple))); } /** @@ -803,25 +808,28 @@ library StoreCoreInternal { */ function _getDynamicDataLocation( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex ) internal pure returns (uint256) { - return uint256(keccak256(abi.encode(SLOT, tableId, key, schemaIndex))); + return uint256(keccak256(abi.encode(SLOT, tableId, keyTuple, schemaIndex))); } /** * Compute the storage location for the length of the dynamic data */ - function _getDynamicDataLengthLocation(bytes32 tableId, bytes32[] memory key) internal pure returns (uint256) { - return uint256(keccak256(abi.encode(SLOT, tableId, key, "length"))); + function _getDynamicDataLengthLocation(bytes32 tableId, bytes32[] memory keyTuple) internal pure returns (uint256) { + return uint256(keccak256(abi.encode(SLOT, tableId, keyTuple, "length"))); } /** * Get the length of the dynamic data for the given value field layout and index */ - function _loadEncodedDynamicDataLength(bytes32 tableId, bytes32[] memory key) internal view returns (PackedCounter) { + function _loadEncodedDynamicDataLength( + bytes32 tableId, + bytes32[] memory keyTuple + ) internal view returns (PackedCounter) { // Load dynamic data length from storage - uint256 dynamicDataLengthSlot = _getDynamicDataLengthLocation(tableId, key); + uint256 dynamicDataLengthSlot = _getDynamicDataLengthLocation(tableId, keyTuple); return PackedCounter.wrap(Storage.load({ storagePointer: dynamicDataLengthSlot })); } @@ -830,12 +838,12 @@ library StoreCoreInternal { */ function _setDynamicDataLengthAtIndex( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 dynamicSchemaIndex, // schemaIndex - numStaticFields uint256 newLengthAtIndex ) internal { // Load dynamic data length from storage - uint256 dynamicDataLengthSlot = _getDynamicDataLengthLocation(tableId, key); + uint256 dynamicDataLengthSlot = _getDynamicDataLengthLocation(tableId, keyTuple); PackedCounter encodedLengths = PackedCounter.wrap(Storage.load({ storagePointer: dynamicDataLengthSlot })); // Update the encoded lengths @@ -850,12 +858,12 @@ library StoreCoreInternal { */ function _setPartialDynamicData( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 dynamicSchemaIndex, uint256 startByteIndex, bytes memory partialData ) internal { - uint256 dynamicDataLocation = _getDynamicDataLocation(tableId, key, dynamicSchemaIndex); + uint256 dynamicDataLocation = _getDynamicDataLocation(tableId, keyTuple, dynamicSchemaIndex); // start index is in bytes, whereas storage slots are in 32-byte words dynamicDataLocation += startByteIndex / 32; // partial storage slot offset (there is no inherent offset, as each dynamic field starts at its own storage slot) diff --git a/packages/store/src/StoreRead.sol b/packages/store/src/StoreRead.sol index a4c35672b9..ced24eb297 100644 --- a/packages/store/src/StoreRead.sol +++ b/packages/store/src/StoreRead.sol @@ -22,39 +22,39 @@ contract StoreRead is IStoreRead { // Get full record (static and dynamic data) function getRecord( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, FieldLayout fieldLayout ) public view virtual returns (bytes memory data) { - data = StoreCore.getRecord(tableId, key, fieldLayout); + data = StoreCore.getRecord(tableId, keyTuple, fieldLayout); } // Get partial data at schema index function getField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, FieldLayout fieldLayout ) public view virtual returns (bytes memory data) { - data = StoreCore.getField(tableId, key, schemaIndex, fieldLayout); + data = StoreCore.getField(tableId, keyTuple, schemaIndex, fieldLayout); } function getFieldLength( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, FieldLayout fieldLayout ) public view virtual returns (uint256) { - return StoreCore.getFieldLength(tableId, key, schemaIndex, fieldLayout); + return StoreCore.getFieldLength(tableId, keyTuple, schemaIndex, fieldLayout); } function getFieldSlice( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, FieldLayout fieldLayout, uint256 start, uint256 end ) public view virtual returns (bytes memory) { - return StoreCore.getFieldSlice(tableId, key, schemaIndex, fieldLayout, start, end); + return StoreCore.getFieldSlice(tableId, keyTuple, schemaIndex, fieldLayout, start, end); } } diff --git a/packages/store/src/StoreSwitch.sol b/packages/store/src/StoreSwitch.sol index 86ddb3b22e..86aa1e311d 100644 --- a/packages/store/src/StoreSwitch.sol +++ b/packages/store/src/StoreSwitch.sol @@ -107,63 +107,63 @@ library StoreSwitch { } } - function setRecord(bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) internal { + function setRecord(bytes32 tableId, bytes32[] memory keyTuple, bytes memory data, FieldLayout fieldLayout) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.setRecord(tableId, key, data, fieldLayout); + StoreCore.setRecord(tableId, keyTuple, data, fieldLayout); } else { - IStore(_storeAddress).setRecord(tableId, key, data, fieldLayout); + IStore(_storeAddress).setRecord(tableId, keyTuple, data, fieldLayout); } } function setField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 fieldIndex, bytes memory data, FieldLayout fieldLayout ) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.setField(tableId, key, fieldIndex, data, fieldLayout); + StoreCore.setField(tableId, keyTuple, fieldIndex, data, fieldLayout); } else { - IStore(_storeAddress).setField(tableId, key, fieldIndex, data, fieldLayout); + IStore(_storeAddress).setField(tableId, keyTuple, fieldIndex, data, fieldLayout); } } function pushToField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 fieldIndex, bytes memory dataToPush, FieldLayout fieldLayout ) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.pushToField(tableId, key, fieldIndex, dataToPush, fieldLayout); + StoreCore.pushToField(tableId, keyTuple, fieldIndex, dataToPush, fieldLayout); } else { - IStore(_storeAddress).pushToField(tableId, key, fieldIndex, dataToPush, fieldLayout); + IStore(_storeAddress).pushToField(tableId, keyTuple, fieldIndex, dataToPush, fieldLayout); } } function popFromField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 fieldIndex, uint256 byteLengthToPop, FieldLayout fieldLayout ) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.popFromField(tableId, key, fieldIndex, byteLengthToPop, fieldLayout); + StoreCore.popFromField(tableId, keyTuple, fieldIndex, byteLengthToPop, fieldLayout); } else { - IStore(_storeAddress).popFromField(tableId, key, fieldIndex, byteLengthToPop, fieldLayout); + IStore(_storeAddress).popFromField(tableId, keyTuple, fieldIndex, byteLengthToPop, fieldLayout); } } function updateInField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 fieldIndex, uint256 startByteIndex, bytes memory dataToSet, @@ -171,79 +171,79 @@ library StoreSwitch { ) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.updateInField(tableId, key, fieldIndex, startByteIndex, dataToSet, fieldLayout); + StoreCore.updateInField(tableId, keyTuple, fieldIndex, startByteIndex, dataToSet, fieldLayout); } else { - IStore(_storeAddress).updateInField(tableId, key, fieldIndex, startByteIndex, dataToSet, fieldLayout); + IStore(_storeAddress).updateInField(tableId, keyTuple, fieldIndex, startByteIndex, dataToSet, fieldLayout); } } - function deleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) internal { + function deleteRecord(bytes32 tableId, bytes32[] memory keyTuple, FieldLayout fieldLayout) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.deleteRecord(tableId, key, fieldLayout); + StoreCore.deleteRecord(tableId, keyTuple, fieldLayout); } else { - IStore(_storeAddress).deleteRecord(tableId, key, fieldLayout); + IStore(_storeAddress).deleteRecord(tableId, keyTuple, fieldLayout); } } function emitEphemeralRecord( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, bytes memory data, FieldLayout fieldLayout ) internal { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - StoreCore.emitEphemeralRecord(tableId, key, data, fieldLayout); + StoreCore.emitEphemeralRecord(tableId, keyTuple, data, fieldLayout); } else { - IStore(_storeAddress).emitEphemeralRecord(tableId, key, data, fieldLayout); + IStore(_storeAddress).emitEphemeralRecord(tableId, keyTuple, data, fieldLayout); } } function getRecord( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, FieldLayout fieldLayout ) internal view returns (bytes memory) { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - return StoreCore.getRecord(tableId, key, fieldLayout); + return StoreCore.getRecord(tableId, keyTuple, fieldLayout); } else { - return IStore(_storeAddress).getRecord(tableId, key, fieldLayout); + return IStore(_storeAddress).getRecord(tableId, keyTuple, fieldLayout); } } function getField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 fieldIndex, FieldLayout fieldLayout ) internal view returns (bytes memory) { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - return StoreCore.getField(tableId, key, fieldIndex, fieldLayout); + return StoreCore.getField(tableId, keyTuple, fieldIndex, fieldLayout); } else { - return IStore(_storeAddress).getField(tableId, key, fieldIndex, fieldLayout); + return IStore(_storeAddress).getField(tableId, keyTuple, fieldIndex, fieldLayout); } } function getFieldLength( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 fieldIndex, FieldLayout fieldLayout ) internal view returns (uint256) { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - return StoreCore.getFieldLength(tableId, key, fieldIndex, fieldLayout); + return StoreCore.getFieldLength(tableId, keyTuple, fieldIndex, fieldLayout); } else { - return IStore(_storeAddress).getFieldLength(tableId, key, fieldIndex, fieldLayout); + return IStore(_storeAddress).getFieldLength(tableId, keyTuple, fieldIndex, fieldLayout); } } function getFieldSlice( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 fieldIndex, FieldLayout fieldLayout, uint256 start, @@ -251,9 +251,9 @@ library StoreSwitch { ) internal view returns (bytes memory) { address _storeAddress = getStoreAddress(); if (_storeAddress == address(this)) { - return StoreCore.getFieldSlice(tableId, key, fieldIndex, fieldLayout, start, end); + return StoreCore.getFieldSlice(tableId, keyTuple, fieldIndex, fieldLayout, start, end); } else { - return IStore(_storeAddress).getFieldSlice(tableId, key, fieldIndex, fieldLayout, start, end); + return IStore(_storeAddress).getFieldSlice(tableId, keyTuple, fieldIndex, fieldLayout, start, end); } } } diff --git a/packages/store/test/EchoSubscriber.sol b/packages/store/test/EchoSubscriber.sol index b9e23c6b41..505502dcde 100644 --- a/packages/store/test/EchoSubscriber.sol +++ b/packages/store/test/EchoSubscriber.sol @@ -7,39 +7,49 @@ import { StoreHook } from "../src/StoreHook.sol"; contract EchoSubscriber is StoreHook { event HookCalled(bytes); - function onBeforeSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) public { - emit HookCalled(abi.encode(tableId, key, data, fieldLayout)); + function onBeforeSetRecord( + bytes32 tableId, + bytes32[] memory keyTuple, + bytes memory data, + FieldLayout fieldLayout + ) public { + emit HookCalled(abi.encode(tableId, keyTuple, data, fieldLayout)); } - function onAfterSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) public { - emit HookCalled(abi.encode(tableId, key, data, fieldLayout)); + function onAfterSetRecord( + bytes32 tableId, + bytes32[] memory keyTuple, + bytes memory data, + FieldLayout fieldLayout + ) public { + emit HookCalled(abi.encode(tableId, keyTuple, data, fieldLayout)); } function onBeforeSetField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, bytes memory data, FieldLayout fieldLayout ) public { - emit HookCalled(abi.encode(tableId, key, schemaIndex, data, fieldLayout)); + emit HookCalled(abi.encode(tableId, keyTuple, schemaIndex, data, fieldLayout)); } function onAfterSetField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, bytes memory data, FieldLayout fieldLayout ) public { - emit HookCalled(abi.encode(tableId, key, schemaIndex, data, fieldLayout)); + emit HookCalled(abi.encode(tableId, keyTuple, schemaIndex, data, fieldLayout)); } - function onBeforeDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) public { - emit HookCalled(abi.encode(tableId, key, fieldLayout)); + function onBeforeDeleteRecord(bytes32 tableId, bytes32[] memory keyTuple, FieldLayout fieldLayout) public { + emit HookCalled(abi.encode(tableId, keyTuple, fieldLayout)); } - function onAfterDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) public { - emit HookCalled(abi.encode(tableId, key, fieldLayout)); + function onAfterDeleteRecord(bytes32 tableId, bytes32[] memory keyTuple, FieldLayout fieldLayout) public { + emit HookCalled(abi.encode(tableId, keyTuple, fieldLayout)); } } diff --git a/packages/store/test/MirrorSubscriber.sol b/packages/store/test/MirrorSubscriber.sol index d30b615679..34d6179682 100644 --- a/packages/store/test/MirrorSubscriber.sol +++ b/packages/store/test/MirrorSubscriber.sol @@ -24,36 +24,46 @@ contract MirrorSubscriber is StoreHook { _tableId = tableId; } - function onBeforeSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) public { + function onBeforeSetRecord( + bytes32 tableId, + bytes32[] memory keyTuple, + bytes memory data, + FieldLayout fieldLayout + ) public { if (tableId != tableId) revert("invalid tableId"); - StoreSwitch.setRecord(indexerTableId, key, data, fieldLayout); + StoreSwitch.setRecord(indexerTableId, keyTuple, data, fieldLayout); } - function onAfterSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory data, FieldLayout fieldLayout) public { + function onAfterSetRecord( + bytes32 tableId, + bytes32[] memory keyTuple, + bytes memory data, + FieldLayout fieldLayout + ) public { // NOOP } function onBeforeSetField( bytes32 tableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8 schemaIndex, bytes memory data, FieldLayout fieldLayout ) public { if (tableId != tableId) revert("invalid tableId"); - StoreSwitch.setField(indexerTableId, key, schemaIndex, data, fieldLayout); + StoreSwitch.setField(indexerTableId, keyTuple, schemaIndex, data, fieldLayout); } function onAfterSetField(bytes32, bytes32[] memory, uint8, bytes memory, FieldLayout) public { // NOOP } - function onBeforeDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) public { + function onBeforeDeleteRecord(bytes32 tableId, bytes32[] memory keyTuple, FieldLayout fieldLayout) public { if (tableId != tableId) revert("invalid tableId"); - StoreSwitch.deleteRecord(indexerTableId, key, fieldLayout); + StoreSwitch.deleteRecord(indexerTableId, keyTuple, fieldLayout); } - function onAfterDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) public { + function onAfterDeleteRecord(bytes32 tableId, bytes32[] memory keyTuple, FieldLayout fieldLayout) public { // NOOP } } diff --git a/packages/store/test/StoreCore.t.sol b/packages/store/test/StoreCore.t.sol index 2737f417f2..8599ff755b 100644 --- a/packages/store/test/StoreCore.t.sol +++ b/packages/store/test/StoreCore.t.sol @@ -58,12 +58,12 @@ contract StoreCoreTest is Test, StoreMock { bytes32 tableId = keccak256("some.tableId"); // Expect a StoreSetRecord event to be emitted - bytes32[] memory key = new bytes32[](1); - key[0] = bytes32(tableId); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32(tableId); vm.expectEmit(true, true, true, true); emit StoreSetRecord( TablesTableId, - key, + keyTuple, Tables.encode( fieldLayout.unwrap(), keySchema.unwrap(), @@ -91,7 +91,7 @@ contract StoreCoreTest is Test, StoreMock { IStore(this).registerTable( 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 keyTuple schema")), Schema.wrap(keccak256("random bytes as value schema")), keyNames, fieldNames @@ -160,7 +160,7 @@ contract StoreCoreTest is Test, StoreMock { string[] memory fourNames = new string[](4); string[] memory oneName = new string[](1); - // Register tableId with invalid key names + // Register tableId with invalid keyTuple names vm.expectRevert(abi.encodeWithSelector(IStoreErrors.StoreCore_InvalidKeyNamesLength.selector, 4, 1)); IStore(this).registerTable(tableId, fieldLayout, keySchema, valueSchema, oneName, oneName); @@ -184,30 +184,30 @@ contract StoreCoreTest is Test, StoreMock { // Register tableId 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"); + // Create some keyTuple + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32("some keyTuple"); // Set dynamic data length of dynamic index 0 - StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, key, 0, 10); + StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, keyTuple, 0, 10); - PackedCounter encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(tableId, key); + PackedCounter encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(tableId, keyTuple); assertEq(encodedLength.atIndex(0), 10); assertEq(encodedLength.atIndex(1), 0); assertEq(encodedLength.total(), 10); // Set dynamic data length of dynamic index 1 - StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, key, 1, 99); + StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, keyTuple, 1, 99); - encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(tableId, key); + encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(tableId, keyTuple); 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(tableId, key, 0, 5); + StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, keyTuple, 0, 5); - encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(tableId, key); + encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(tableId, keyTuple); assertEq(encodedLength.atIndex(0), 5); assertEq(encodedLength.atIndex(1), 99); assertEq(encodedLength.total(), 104); @@ -229,17 +229,17 @@ contract StoreCoreTest is Test, StoreMock { // Set data bytes memory data = abi.encodePacked(bytes1(0x01), bytes2(0x0203), bytes1(0x04), bytes2(0x0506)); - bytes32[] memory key = new bytes32[](1); - key[0] = keccak256("some.key"); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = keccak256("some.keyTuple"); // Expect a StoreSetRecord event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetRecord(tableId, key, data); + emit StoreSetRecord(tableId, keyTuple, data); - IStore(this).setRecord(tableId, key, data, fieldLayout); + IStore(this).setRecord(tableId, keyTuple, data, fieldLayout); // Get data - bytes memory loadedData = IStore(this).getRecord(tableId, key, fieldLayout); + bytes memory loadedData = IStore(this).getRecord(tableId, keyTuple, fieldLayout); assertTrue(Bytes.equals(data, loadedData)); } @@ -259,11 +259,11 @@ contract StoreCoreTest is Test, StoreMock { // Set data bytes memory data = abi.encodePacked(bytes1(0x01), bytes2(0x0203), bytes1(0x04)); - bytes32[] memory key = new bytes32[](1); - key[0] = keccak256("some.key"); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = keccak256("some.keyTuple"); // This should fail because the data is not 6 bytes long - IStore(this).setRecord(tableId, key, data, fieldLayout); + IStore(this).setRecord(tableId, keyTuple, data, fieldLayout); } function testSetAndGetStaticDataSpanningWords() public { @@ -279,17 +279,17 @@ contract StoreCoreTest is Test, StoreMock { bytes32(0x1112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f30) ); - bytes32[] memory key = new bytes32[](1); - key[0] = keccak256("some.key"); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = keccak256("some.keyTuple"); // Expect a StoreSetRecord event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetRecord(tableId, key, data); + emit StoreSetRecord(tableId, keyTuple, data); - IStore(this).setRecord(tableId, key, data, fieldLayout); + IStore(this).setRecord(tableId, keyTuple, data, fieldLayout); // Get data - bytes memory loadedData = IStore(this).getRecord(tableId, key, fieldLayout); + bytes memory loadedData = IStore(this).getRecord(tableId, keyTuple, fieldLayout); assertTrue(Bytes.equals(data, loadedData)); } @@ -338,19 +338,19 @@ contract StoreCoreTest is Test, StoreMock { thirdDataBytes ); - // Create key - bytes32[] memory key = new bytes32[](1); - key[0] = bytes32("some.key"); + // Create keyTuple + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32("some.keyTuple"); // Expect a StoreSetRecord event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetRecord(tableId, key, data); + emit StoreSetRecord(tableId, keyTuple, data); // Set data - IStore(this).setRecord(tableId, key, data, fieldLayout); + IStore(this).setRecord(tableId, keyTuple, data, fieldLayout); // Get data - bytes memory loadedData = IStore(this).getRecord(tableId, key, fieldLayout); + bytes memory loadedData = IStore(this).getRecord(tableId, keyTuple, fieldLayout); assertEq(loadedData.length, data.length); assertEq(keccak256(loadedData), keccak256(data)); @@ -384,32 +384,32 @@ contract StoreCoreTest is Test, StoreMock { bytes16 firstDataBytes = bytes16(0x0102030405060708090a0b0c0d0e0f10); - // Create key - bytes32[] memory key = new bytes32[](1); - key[0] = bytes32("some.key"); + // Create keyTuple + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32("some.keyTuple"); bytes memory firstDataPacked = abi.encodePacked(firstDataBytes); // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(tableId, key, 0, firstDataPacked); + emit StoreSetField(tableId, keyTuple, 0, firstDataPacked); // Set first field - IStore(this).setField(tableId, key, 0, firstDataPacked, fieldLayout); + IStore(this).setField(tableId, keyTuple, 0, firstDataPacked, fieldLayout); //////////////// // Static data //////////////// // Get first field - bytes memory loadedData = IStore(this).getField(tableId, key, 0, fieldLayout); + bytes memory loadedData = IStore(this).getField(tableId, keyTuple, 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(tableId, key, 1, fieldLayout))), 0); + assertEq(uint256(bytes32(IStore(this).getField(tableId, keyTuple, 1, fieldLayout))), 0); // Set second field bytes32 secondDataBytes = keccak256("some data"); @@ -418,27 +418,27 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(tableId, key, 1, secondDataPacked); + emit StoreSetField(tableId, keyTuple, 1, secondDataPacked); - IStore(this).setField(tableId, key, 1, secondDataPacked, fieldLayout); + IStore(this).setField(tableId, keyTuple, 1, secondDataPacked, fieldLayout); // Get second field - loadedData = IStore(this).getField(tableId, key, 1, fieldLayout); + loadedData = IStore(this).getField(tableId, keyTuple, 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(tableId, key, 0, fieldLayout)), bytes16(firstDataBytes)); + assertEq(bytes16(IStore(this).getField(tableId, keyTuple, 0, fieldLayout)), bytes16(firstDataBytes)); // Verify the full static data is correct 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(Bytes.slice16(IStore(this).getRecord(tableId, keyTuple, fieldLayout), 0), firstDataBytes); + assertEq(Bytes.slice32(IStore(this).getRecord(tableId, keyTuple, fieldLayout), 16), secondDataBytes); assertEq( - keccak256(SliceLib.getSubslice(IStore(this).getRecord(tableId, key, fieldLayout), 0, 48).toBytes()), + keccak256(SliceLib.getSubslice(IStore(this).getRecord(tableId, keyTuple, fieldLayout), 0, 48).toBytes()), keccak256(abi.encodePacked(firstDataBytes, secondDataBytes)) ); @@ -465,13 +465,13 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(tableId, key, 2, thirdDataBytes); + emit StoreSetField(tableId, keyTuple, 2, thirdDataBytes); // Set third field - IStore(this).setField(tableId, key, 2, thirdDataBytes, fieldLayout); + IStore(this).setField(tableId, keyTuple, 2, thirdDataBytes, fieldLayout); // Get third field - loadedData = IStore(this).getField(tableId, key, 2, fieldLayout); + loadedData = IStore(this).getField(tableId, keyTuple, 2, fieldLayout); // Verify loaded data is correct assertEq(SliceLib.fromBytes(loadedData).decodeArray_uint32().length, 2); @@ -479,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(tableId, key, 3, fieldLayout).length, 0); + assertEq(IStore(this).getField(tableId, keyTuple, 3, fieldLayout).length, 0); // Verify none of the previous fields were impacted - assertEq(bytes16(IStore(this).getField(tableId, key, 0, fieldLayout)), bytes16(firstDataBytes)); - assertEq(bytes32(IStore(this).getField(tableId, key, 1, fieldLayout)), bytes32(secondDataBytes)); + assertEq(bytes16(IStore(this).getField(tableId, keyTuple, 0, fieldLayout)), bytes16(firstDataBytes)); + assertEq(bytes32(IStore(this).getField(tableId, keyTuple, 1, fieldLayout)), bytes32(secondDataBytes)); // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(tableId, key, 3, fourthDataBytes); + emit StoreSetField(tableId, keyTuple, 3, fourthDataBytes); // Set fourth field - IStore(this).setField(tableId, key, 3, fourthDataBytes, fieldLayout); + IStore(this).setField(tableId, keyTuple, 3, fourthDataBytes, fieldLayout); // Get fourth field - loadedData = IStore(this).getField(tableId, key, 3, fieldLayout); + loadedData = IStore(this).getField(tableId, keyTuple, 3, fieldLayout); // Verify loaded data is correct assertEq(loadedData.length, fourthDataBytes.length); @@ -502,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(tableId, key, fieldLayout)), + keccak256(IStore(this).getRecord(tableId, keyTuple, fieldLayout)), keccak256( abi.encodePacked(firstDataBytes, secondDataBytes, encodedLengths.unwrap(), thirdDataBytes, fourthDataBytes) ) @@ -553,34 +553,34 @@ contract StoreCoreTest is Test, StoreMock { thirdDataBytes ); - // Create key - bytes32[] memory key = new bytes32[](1); - key[0] = bytes32("some.key"); + // Create keyTuple + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32("some.keyTuple"); // Set data - IStore(this).setRecord(tableId, key, data, fieldLayout); + IStore(this).setRecord(tableId, keyTuple, data, fieldLayout); // Get data - bytes memory loadedData = IStore(this).getRecord(tableId, key, fieldLayout); + bytes memory loadedData = IStore(this).getRecord(tableId, keyTuple, 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(tableId, key); + emit StoreDeleteRecord(tableId, keyTuple); // Delete data - IStore(this).deleteRecord(tableId, key, fieldLayout); + IStore(this).deleteRecord(tableId, keyTuple, fieldLayout); // Verify data is deleted - loadedData = IStore(this).getRecord(tableId, key, fieldLayout); + loadedData = IStore(this).getRecord(tableId, keyTuple, fieldLayout); assertEq(keccak256(loadedData), keccak256(new bytes(fieldLayout.staticDataLength()))); } struct TestPushToFieldData { bytes32 tableId; - bytes32[] key; + bytes32[] keyTuple; bytes32 firstDataBytes; bytes secondDataBytes; bytes thirdDataBytes; @@ -612,9 +612,9 @@ contract StoreCoreTest is Test, StoreMock { new string[](3) ); - // Create key - data.key = new bytes32[](1); - data.key[0] = bytes32("some.key"); + // Create keyTuple + data.keyTuple = new bytes32[](1); + data.keyTuple[0] = bytes32("some.keyTuple"); // Create data data.firstDataBytes = keccak256("some data"); @@ -634,10 +634,10 @@ contract StoreCoreTest is Test, StoreMock { } // Set fields - 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.keyTuple, 0, abi.encodePacked(data.firstDataBytes), fieldLayout); + IStore(this).setField(data.tableId, data.keyTuple, 1, data.secondDataBytes, fieldLayout); // Initialize a field with push - IStore(this).pushToField(data.tableId, data.key, 2, data.thirdDataBytes, fieldLayout); + IStore(this).pushToField(data.tableId, data.keyTuple, 2, data.thirdDataBytes, fieldLayout); // Create data to push { @@ -649,13 +649,13 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(data.tableId, data.key, 1, data.newSecondDataBytes); + emit StoreSetField(data.tableId, data.keyTuple, 1, data.newSecondDataBytes); // Push to second field - IStore(this).pushToField(data.tableId, data.key, 1, data.secondDataToPush, fieldLayout); + IStore(this).pushToField(data.tableId, data.keyTuple, 1, data.secondDataToPush, fieldLayout); // Get second field - data.loadedData = IStore(this).getField(data.tableId, data.key, 1, fieldLayout); + data.loadedData = IStore(this).getField(data.tableId, data.keyTuple, 1, fieldLayout); // Verify loaded data is correct assertEq(SliceLib.fromBytes(data.loadedData).decodeArray_uint32().length, 2 + 1); @@ -663,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.tableId, data.key, 0, fieldLayout)), data.firstDataBytes); - assertEq(IStore(this).getField(data.tableId, data.key, 2, fieldLayout), data.thirdDataBytes); + assertEq(bytes32(IStore(this).getField(data.tableId, data.keyTuple, 0, fieldLayout)), data.firstDataBytes); + assertEq(IStore(this).getField(data.tableId, data.keyTuple, 2, fieldLayout), data.thirdDataBytes); // Create data to push { @@ -685,13 +685,13 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(data.tableId, data.key, 2, data.newThirdDataBytes); + emit StoreSetField(data.tableId, data.keyTuple, 2, data.newThirdDataBytes); // Push to third field - IStore(this).pushToField(data.tableId, data.key, 2, data.thirdDataToPush, fieldLayout); + IStore(this).pushToField(data.tableId, data.keyTuple, 2, data.thirdDataToPush, fieldLayout); // Get third field - data.loadedData = IStore(this).getField(data.tableId, data.key, 2, fieldLayout); + data.loadedData = IStore(this).getField(data.tableId, data.keyTuple, 2, fieldLayout); // Verify loaded data is correct assertEq(SliceLib.fromBytes(data.loadedData).decodeArray_uint32().length, 3 + 10); @@ -699,13 +699,13 @@ contract StoreCoreTest is Test, StoreMock { assertEq(data.loadedData, data.newThirdDataBytes); // Verify none of the other fields were impacted - 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); + assertEq(bytes32(IStore(this).getField(data.tableId, data.keyTuple, 0, fieldLayout)), data.firstDataBytes); + assertEq(IStore(this).getField(data.tableId, data.keyTuple, 1, fieldLayout), data.newSecondDataBytes); } struct TestUpdateInFieldData { bytes32 tableId; - bytes32[] key; + bytes32[] keyTuple; bytes32 firstDataBytes; uint32[] secondData; bytes secondDataBytes; @@ -752,9 +752,9 @@ contract StoreCoreTest is Test, StoreMock { new string[](3) ); - // Create key - data.key = new bytes32[](1); - data.key[0] = bytes32("some.key"); + // Create keyTuple + data.keyTuple = new bytes32[](1); + data.keyTuple[0] = bytes32("some.keyTuple"); // Create data data.firstDataBytes = keccak256("some data"); @@ -773,9 +773,9 @@ contract StoreCoreTest is Test, StoreMock { data.thirdDataBytes = EncodeArray.encode(data.thirdData); // Set fields - 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); + IStore(this).setField(data.tableId, data.keyTuple, 0, abi.encodePacked(data.firstDataBytes), fieldLayout); + IStore(this).setField(data.tableId, data.keyTuple, 1, data.secondDataBytes, fieldLayout); + IStore(this).setField(data.tableId, data.keyTuple, 2, data.thirdDataBytes, fieldLayout); // Create data to use for the update { @@ -788,13 +788,13 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(data.tableId, data.key, 1, data.newSecondDataBytes); + emit StoreSetField(data.tableId, data.keyTuple, 1, data.newSecondDataBytes); // Update index 1 in second field (4 = byte length of uint32) - IStore(this).updateInField(data.tableId, data.key, 1, 4 * 1, data.secondDataForUpdate, fieldLayout); + IStore(this).updateInField(data.tableId, data.keyTuple, 1, 4 * 1, data.secondDataForUpdate, fieldLayout); // Get second field - data.loadedData = IStore(this).getField(data.tableId, data.key, 1, fieldLayout); + data.loadedData = IStore(this).getField(data.tableId, data.keyTuple, 1, fieldLayout); // Verify loaded data is correct assertEq(SliceLib.fromBytes(data.loadedData).decodeArray_uint32().length, data.secondData.length); @@ -802,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.tableId, data.key, 0, fieldLayout)), data.firstDataBytes); - assertEq(IStore(this).getField(data.tableId, data.key, 2, fieldLayout), data.thirdDataBytes); + assertEq(bytes32(IStore(this).getField(data.tableId, data.keyTuple, 0, fieldLayout)), data.firstDataBytes); + assertEq(IStore(this).getField(data.tableId, data.keyTuple, 2, fieldLayout), data.thirdDataBytes); // Create data for update { @@ -826,13 +826,13 @@ contract StoreCoreTest is Test, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(data.tableId, data.key, 2, data.newThirdDataBytes); + emit StoreSetField(data.tableId, data.keyTuple, 2, data.newThirdDataBytes); // Update indexes 1,2,3,4 in third field (8 = byte length of uint64) - IStore(this).updateInField(data.tableId, data.key, 2, 8 * 1, data.thirdDataForUpdate, fieldLayout); + IStore(this).updateInField(data.tableId, data.keyTuple, 2, 8 * 1, data.thirdDataForUpdate, fieldLayout); // Get third field - data.loadedData = IStore(this).getField(data.tableId, data.key, 2, fieldLayout); + data.loadedData = IStore(this).getField(data.tableId, data.keyTuple, 2, fieldLayout); // Verify loaded data is correct assertEq(SliceLib.fromBytes(data.loadedData).decodeArray_uint64().length, data.thirdData.length); @@ -840,14 +840,14 @@ contract StoreCoreTest is Test, StoreMock { assertEq(data.loadedData, data.newThirdDataBytes); // Verify none of the other fields were impacted - 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); + assertEq(bytes32(IStore(this).getField(data.tableId, data.keyTuple, 0, fieldLayout)), data.firstDataBytes); + assertEq(IStore(this).getField(data.tableId, data.keyTuple, 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.tableId, data.key, 2, type(uint56).max, data.thirdDataForUpdate, fieldLayout); + IStore(this).updateInField(data.tableId, data.keyTuple, 2, type(uint56).max, data.thirdDataForUpdate, fieldLayout); } function testAccessEmptyData() public { @@ -857,30 +857,30 @@ contract StoreCoreTest is Test, StoreMock { 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"); + // Create keyTuple + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32("some.keyTuple"); - bytes memory data1 = IStore(this).getRecord(tableId, key, fieldLayout); + bytes memory data1 = IStore(this).getRecord(tableId, keyTuple, fieldLayout); assertEq(data1.length, fieldLayout.staticDataLength()); - bytes memory data2 = IStore(this).getField(tableId, key, 0, fieldLayout); + bytes memory data2 = IStore(this).getField(tableId, keyTuple, 0, fieldLayout); assertEq(data2.length, fieldLayout.staticDataLength()); - bytes memory data3 = IStore(this).getField(tableId, key, 1, fieldLayout); + bytes memory data3 = IStore(this).getField(tableId, keyTuple, 1, fieldLayout); assertEq(data3.length, 0); - uint256 data3Length = IStore(this).getFieldLength(tableId, key, 1, fieldLayout); + uint256 data3Length = IStore(this).getFieldLength(tableId, keyTuple, 1, fieldLayout); assertEq(data3Length, 0); - bytes memory data3Slice = IStore(this).getFieldSlice(tableId, key, 1, fieldLayout, 0, 0); + bytes memory data3Slice = IStore(this).getFieldSlice(tableId, keyTuple, 1, fieldLayout, 0, 0); assertEq(data3Slice.length, 0); } function testRegisterHook() public { bytes32 tableId = keccak256("some.tableId"); - bytes32[] memory key = new bytes32[](1); - key[0] = keccak256("some key"); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = keccak256("some keyTuple"); // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 0); @@ -912,31 +912,31 @@ contract StoreCoreTest is Test, StoreMock { bytes memory data = abi.encodePacked(bytes16(0x0102030405060708090a0b0c0d0e0f10)); - IStore(this).setRecord(tableId, key, data, fieldLayout); + IStore(this).setRecord(tableId, keyTuple, data, fieldLayout); // Get data from indexed tableId - the indexer should have mirrored the data there - bytes memory indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); + bytes memory indexedData = IStore(this).getRecord(indexerTableId, keyTuple, fieldLayout); assertEq(keccak256(data), keccak256(indexedData)); data = abi.encodePacked(bytes16(0x1112131415161718191a1b1c1d1e1f20)); - IStore(this).setField(tableId, key, 0, data, fieldLayout); + IStore(this).setField(tableId, keyTuple, 0, data, fieldLayout); // Get data from indexed tableId - the indexer should have mirrored the data there - indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); + indexedData = IStore(this).getRecord(indexerTableId, keyTuple, fieldLayout); assertEq(keccak256(data), keccak256(indexedData)); - IStore(this).deleteRecord(tableId, key, fieldLayout); + IStore(this).deleteRecord(tableId, keyTuple, fieldLayout); // Get data from indexed tableId - the indexer should have mirrored the data there - indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); + indexedData = IStore(this).getRecord(indexerTableId, keyTuple, fieldLayout); assertEq(keccak256(indexedData), keccak256(abi.encodePacked(bytes16(0)))); } function testUnregisterHook() public { bytes32 tableId = keccak256("some.tableId"); - bytes32[] memory key = new bytes32[](1); - key[0] = keccak256("some key"); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = keccak256("some keyTuple"); // Register tableId's value schema FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 0); @@ -978,54 +978,54 @@ contract StoreCoreTest is Test, StoreMock { // Expect a revert when the RevertSubscriber's onBeforeSetRecord hook is called vm.expectRevert(bytes("onBeforeSetRecord")); - IStore(this).setRecord(tableId, key, data, fieldLayout); + IStore(this).setRecord(tableId, keyTuple, data, fieldLayout); // Expect a revert when the RevertSubscriber's onBeforeSetField hook is called vm.expectRevert(bytes("onBeforeSetField")); - IStore(this).setField(tableId, key, 0, data, fieldLayout); + IStore(this).setField(tableId, keyTuple, 0, data, fieldLayout); // Expect a revert when the RevertSubscriber's onBeforeDeleteRecord hook is called vm.expectRevert(bytes("onBeforeDeleteRecord")); - IStore(this).deleteRecord(tableId, key, fieldLayout); + IStore(this).deleteRecord(tableId, keyTuple, fieldLayout); // Unregister the 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(tableId, key, data, fieldLayout)); + emit HookCalled(abi.encode(tableId, keyTuple, 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(tableId, key, data, fieldLayout)); + emit HookCalled(abi.encode(tableId, keyTuple, data, fieldLayout)); - IStore(this).setRecord(tableId, key, data, fieldLayout); + IStore(this).setRecord(tableId, keyTuple, 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(tableId, key, uint8(0), data, fieldLayout)); + emit HookCalled(abi.encode(tableId, keyTuple, 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(tableId, key, uint8(0), data, fieldLayout)); + emit HookCalled(abi.encode(tableId, keyTuple, uint8(0), data, fieldLayout)); - IStore(this).setField(tableId, key, 0, data, fieldLayout); + IStore(this).setField(tableId, keyTuple, 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(tableId, key, fieldLayout)); + emit HookCalled(abi.encode(tableId, keyTuple, 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(tableId, key, fieldLayout)); + emit HookCalled(abi.encode(tableId, keyTuple, fieldLayout)); - IStore(this).deleteRecord(tableId, key, fieldLayout); + IStore(this).deleteRecord(tableId, keyTuple, fieldLayout); } function testHooksDynamicData() public { bytes32 tableId = keccak256("some.tableId"); - bytes32[] memory key = new bytes32[](1); - key[0] = keccak256("some key"); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = keccak256("some keyTuple"); // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 1); @@ -1063,10 +1063,10 @@ contract StoreCoreTest is Test, StoreMock { bytes memory staticData = abi.encodePacked(bytes16(0x0102030405060708090a0b0c0d0e0f10)); bytes memory data = abi.encodePacked(staticData, dynamicData); - IStore(this).setRecord(tableId, key, data, fieldLayout); + IStore(this).setRecord(tableId, keyTuple, data, fieldLayout); // Get data from indexed tableId - the indexer should have mirrored the data there - bytes memory indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); + bytes memory indexedData = IStore(this).getRecord(indexerTableId, keyTuple, fieldLayout); assertEq(keccak256(data), keccak256(indexedData)); // Update dynamic data @@ -1075,16 +1075,16 @@ contract StoreCoreTest is Test, StoreMock { dynamicData = abi.encodePacked(encodedArrayDataLength.unwrap(), arrayDataBytes); data = abi.encodePacked(staticData, dynamicData); - IStore(this).setField(tableId, key, 1, arrayDataBytes, fieldLayout); + IStore(this).setField(tableId, keyTuple, 1, arrayDataBytes, fieldLayout); // Get data from indexed tableId - the indexer should have mirrored the data there - indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); + indexedData = IStore(this).getRecord(indexerTableId, keyTuple, fieldLayout); assertEq(keccak256(data), keccak256(indexedData)); - IStore(this).deleteRecord(tableId, key, fieldLayout); + IStore(this).deleteRecord(tableId, keyTuple, fieldLayout); // Get data from indexed tableId - the indexer should have mirrored the data there - indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); + indexedData = IStore(this).getRecord(indexerTableId, keyTuple, fieldLayout); assertEq(keccak256(indexedData), keccak256(abi.encodePacked(bytes16(0)))); } } diff --git a/packages/store/test/StoreCoreDynamic.t.sol b/packages/store/test/StoreCoreDynamic.t.sol index c781320cf7..3af1a9bd01 100644 --- a/packages/store/test/StoreCoreDynamic.t.sol +++ b/packages/store/test/StoreCoreDynamic.t.sol @@ -28,12 +28,12 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { // Expose an external popFromField function for testing purposes of indexers (see testHooks) function popFromField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, uint256 byteLengthToPop, FieldLayout fieldLayout ) public override { - StoreCore.popFromField(tableId, key, schemaIndex, byteLengthToPop, fieldLayout); + StoreCore.popFromField(tableId, keyTuple, schemaIndex, byteLengthToPop, fieldLayout); } function setUp() public { @@ -46,7 +46,7 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { ); StoreCore.registerTable(_tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); - // Create key + // Create keyTuple _key = new bytes32[](1); _key[0] = bytes32("some.key"); diff --git a/packages/store/test/StoreCoreGas.t.sol b/packages/store/test/StoreCoreGas.t.sol index 122e0127cf..6c0eedc99d 100644 --- a/packages/store/test/StoreCoreGas.t.sol +++ b/packages/store/test/StoreCoreGas.t.sol @@ -64,7 +64,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { StoreCore.getValueSchema(tableId); endGasReport(); - startGasReport("StoreCore: get key schema (warm)"); + startGasReport("StoreCore: get keyTuple schema (warm)"); StoreCore.getKeySchema(tableId); endGasReport(); } @@ -107,22 +107,22 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { StoreCore.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"); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32("some key"); // Set dynamic data length of dynamic index 0 startGasReport("set dynamic length of dynamic index 0"); - StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, key, 0, 10); + StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, keyTuple, 0, 10); endGasReport(); // Set dynamic data length of dynamic index 1 startGasReport("set dynamic length of dynamic index 1"); - StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, key, 1, 99); + StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, keyTuple, 1, 99); endGasReport(); // Reduce dynamic data length of dynamic index 0 again startGasReport("reduce dynamic length of dynamic index 0"); - StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, key, 0, 5); + StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, keyTuple, 0, 5); endGasReport(); } @@ -140,16 +140,16 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Set data bytes memory data = abi.encodePacked(bytes1(0x01), bytes2(0x0203), bytes1(0x04), bytes2(0x0506)); - bytes32[] memory key = new bytes32[](1); - key[0] = keccak256("some.key"); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = keccak256("some.keyTuple"); startGasReport("set static record (1 slot)"); - StoreCore.setRecord(tableId, key, data, fieldLayout); + StoreCore.setRecord(tableId, keyTuple, data, fieldLayout); endGasReport(); // Get data startGasReport("get static record (1 slot)"); - StoreCore.getRecord(tableId, key, fieldLayout); + StoreCore.getRecord(tableId, keyTuple, fieldLayout); endGasReport(); } @@ -166,16 +166,16 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes32(0x1112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f30) ); - bytes32[] memory key = new bytes32[](1); - key[0] = keccak256("some.key"); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = keccak256("some.keyTuple"); startGasReport("set static record (2 slots)"); - StoreCore.setRecord(tableId, key, data, fieldLayout); + StoreCore.setRecord(tableId, keyTuple, data, fieldLayout); endGasReport(); // Get data startGasReport("get static record (2 slots)"); - StoreCore.getRecord(tableId, key, fieldLayout); + StoreCore.getRecord(tableId, keyTuple, fieldLayout); endGasReport(); } @@ -223,18 +223,18 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { thirdDataBytes ); - // Create key - bytes32[] memory key = new bytes32[](1); - key[0] = bytes32("some.key"); + // Create keyTuple + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32("some.keyTuple"); // Set data startGasReport("set complex record with dynamic data (4 slots)"); - StoreCore.setRecord(tableId, key, data, fieldLayout); + StoreCore.setRecord(tableId, keyTuple, data, fieldLayout); endGasReport(); // Get data startGasReport("get complex record with dynamic data (4 slots)"); - StoreCore.getRecord(tableId, key, fieldLayout); + StoreCore.getRecord(tableId, keyTuple, fieldLayout); endGasReport(); // Compare gas - setting the data as raw struct @@ -270,15 +270,15 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes16 firstDataBytes = bytes16(0x0102030405060708090a0b0c0d0e0f10); - // Create key - bytes32[] memory key = new bytes32[](1); - key[0] = bytes32("some.key"); + // Create keyTuple + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32("some.keyTuple"); bytes memory firstDataPacked = abi.encodePacked(firstDataBytes); // Set first field startGasReport("set static field (1 slot)"); - StoreCore.setField(tableId, key, 0, firstDataPacked, fieldLayout); + StoreCore.setField(tableId, keyTuple, 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(tableId, key, 0, fieldLayout); + StoreCore.getField(tableId, keyTuple, 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(tableId, key, 1, secondDataPacked, fieldLayout); + StoreCore.setField(tableId, keyTuple, 1, secondDataPacked, fieldLayout); endGasReport(); // Get second field startGasReport("get static field (overlap 2 slot)"); - StoreCore.getField(tableId, key, 1, fieldLayout); + StoreCore.getField(tableId, keyTuple, 1, fieldLayout); endGasReport(); //////////////// @@ -326,22 +326,22 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Set third field startGasReport("set dynamic field (1 slot, first dynamic field)"); - StoreCore.setField(tableId, key, 2, thirdDataBytes, fieldLayout); + StoreCore.setField(tableId, keyTuple, 2, thirdDataBytes, fieldLayout); endGasReport(); // Get third field startGasReport("get dynamic field (1 slot, first dynamic field)"); - StoreCore.getField(tableId, key, 2, fieldLayout); + StoreCore.getField(tableId, keyTuple, 2, fieldLayout); endGasReport(); // Set fourth field startGasReport("set dynamic field (1 slot, second dynamic field)"); - StoreCore.setField(tableId, key, 3, fourthDataBytes, fieldLayout); + StoreCore.setField(tableId, keyTuple, 3, fourthDataBytes, fieldLayout); endGasReport(); // Get fourth field startGasReport("get dynamic field (1 slot, second dynamic field)"); - StoreCore.getField(tableId, key, 3, fieldLayout); + StoreCore.getField(tableId, keyTuple, 3, fieldLayout); endGasReport(); } @@ -389,16 +389,16 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { thirdDataBytes ); - // Create key - bytes32[] memory key = new bytes32[](1); - key[0] = bytes32("some.key"); + // Create keyTuple + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32("some.keyTuple"); // Set data - StoreCore.setRecord(tableId, key, data, fieldLayout); + StoreCore.setRecord(tableId, keyTuple, data, fieldLayout); // Delete data startGasReport("delete record (complex data, 3 slots)"); - StoreCore.deleteRecord(tableId, key, fieldLayout); + StoreCore.deleteRecord(tableId, keyTuple, fieldLayout); endGasReport(); } @@ -414,9 +414,9 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { ); StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); - // Create key - bytes32[] memory key = new bytes32[](1); - key[0] = bytes32("some.key"); + // Create keyTuple + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32("some.keyTuple"); // Create data bytes32 firstDataBytes = keccak256("some data"); @@ -437,10 +437,10 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { } // Set fields - StoreCore.setField(tableId, key, 0, abi.encodePacked(firstDataBytes), fieldLayout); - StoreCore.setField(tableId, key, 1, secondDataBytes, fieldLayout); + StoreCore.setField(tableId, keyTuple, 0, abi.encodePacked(firstDataBytes), fieldLayout); + StoreCore.setField(tableId, keyTuple, 1, secondDataBytes, fieldLayout); // Initialize a field with push - StoreCore.pushToField(tableId, key, 2, thirdDataBytes, fieldLayout); + StoreCore.pushToField(tableId, keyTuple, 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(tableId, key, 1, secondDataToPush, fieldLayout); + StoreCore.pushToField(tableId, keyTuple, 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(tableId, key, 2, thirdDataToPush, fieldLayout); + StoreCore.pushToField(tableId, keyTuple, 2, thirdDataToPush, fieldLayout); endGasReport(); } @@ -501,9 +501,9 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { ); StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); - // Create key - bytes32[] memory key = new bytes32[](1); - key[0] = bytes32("some.key"); + // Create keyTuple + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32("some.keyTuple"); // Create data data.firstDataBytes = keccak256("some data"); @@ -522,9 +522,9 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { data.thirdDataBytes = EncodeArray.encode(thirdData); // Set fields - 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); + StoreCore.setField(tableId, keyTuple, 0, abi.encodePacked(data.firstDataBytes), fieldLayout); + StoreCore.setField(tableId, keyTuple, 1, data.secondDataBytes, fieldLayout); + StoreCore.setField(tableId, keyTuple, 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(tableId, key, 1, 4 * 1, data.secondDataForUpdate, fieldLayout); + StoreCore.updateInField(tableId, keyTuple, 1, 4 * 1, data.secondDataForUpdate, fieldLayout); endGasReport(); // Create data for update @@ -561,7 +561,7 @@ 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(tableId, key, 2, 8 * 1, data.thirdDataForUpdate, fieldLayout); + StoreCore.updateInField(tableId, keyTuple, 2, 8 * 1, data.thirdDataForUpdate, fieldLayout); endGasReport(); } @@ -572,35 +572,35 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { 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"); + // Create keyTuple + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32("some.keyTuple"); startGasReport("access non-existing record"); - StoreCore.getRecord(tableId, key, fieldLayout); + StoreCore.getRecord(tableId, keyTuple, fieldLayout); endGasReport(); startGasReport("access static field of non-existing record"); - StoreCore.getField(tableId, key, 0, fieldLayout); + StoreCore.getField(tableId, keyTuple, 0, fieldLayout); endGasReport(); startGasReport("access dynamic field of non-existing record"); - StoreCore.getField(tableId, key, 1, fieldLayout); + StoreCore.getField(tableId, keyTuple, 1, fieldLayout); endGasReport(); startGasReport("access length of dynamic field of non-existing record"); - StoreCore.getFieldLength(tableId, key, 1, fieldLayout); + StoreCore.getFieldLength(tableId, keyTuple, 1, fieldLayout); endGasReport(); startGasReport("access slice of dynamic field of non-existing record"); - StoreCore.getFieldSlice(tableId, key, 1, fieldLayout, 0, 0); + StoreCore.getFieldSlice(tableId, keyTuple, 1, fieldLayout, 0, 0); endGasReport(); } function testHooks() public { bytes32 tableId = keccak256("some.tableId"); - bytes32[] memory key = new bytes32[](1); - key[0] = keccak256("some key"); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = keccak256("some key"); // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 0); @@ -635,24 +635,24 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes memory data = abi.encodePacked(bytes16(0x0102030405060708090a0b0c0d0e0f10)); startGasReport("set record on tableId with subscriber"); - StoreCore.setRecord(tableId, key, data, fieldLayout); + StoreCore.setRecord(tableId, keyTuple, data, fieldLayout); endGasReport(); data = abi.encodePacked(bytes16(0x1112131415161718191a1b1c1d1e1f20)); startGasReport("set static field on tableId with subscriber"); - StoreCore.setField(tableId, key, 0, data, fieldLayout); + StoreCore.setField(tableId, keyTuple, 0, data, fieldLayout); endGasReport(); startGasReport("delete record on tableId with subscriber"); - StoreCore.deleteRecord(tableId, key, fieldLayout); + StoreCore.deleteRecord(tableId, keyTuple, fieldLayout); endGasReport(); } function testHooksDynamicData() public { bytes32 tableId = keccak256("some.tableId"); - bytes32[] memory key = new bytes32[](1); - key[0] = keccak256("some key"); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = keccak256("some key"); // Register tableId FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 1); @@ -693,7 +693,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes memory data = abi.encodePacked(staticData, dynamicData); startGasReport("set (dynamic) record on tableId with subscriber"); - StoreCore.setRecord(tableId, key, data, fieldLayout); + StoreCore.setRecord(tableId, keyTuple, 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 tableId with subscriber"); - StoreCore.setField(tableId, key, 1, arrayDataBytes, fieldLayout); + StoreCore.setField(tableId, keyTuple, 1, arrayDataBytes, fieldLayout); endGasReport(); startGasReport("delete (dynamic) record on tableId with subscriber"); - StoreCore.deleteRecord(tableId, key, fieldLayout); + StoreCore.deleteRecord(tableId, keyTuple, fieldLayout); endGasReport(); } } diff --git a/packages/store/test/StoreMock.sol b/packages/store/test/StoreMock.sol index 7f41e95ba7..96e23f6664 100644 --- a/packages/store/test/StoreMock.sol +++ b/packages/store/test/StoreMock.sol @@ -19,71 +19,71 @@ contract StoreMock is IStore, StoreRead { // Set full record (including full dynamic data) function setRecord( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, bytes calldata data, FieldLayout fieldLayout ) public virtual { - StoreCore.setRecord(tableId, key, data, fieldLayout); + StoreCore.setRecord(tableId, keyTuple, data, fieldLayout); } // Set partial data at schema index function setField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, bytes calldata data, FieldLayout fieldLayout ) public virtual { - StoreCore.setField(tableId, key, schemaIndex, data, fieldLayout); + StoreCore.setField(tableId, keyTuple, schemaIndex, data, fieldLayout); } // Push encoded items to the dynamic field at schema index function pushToField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, bytes calldata dataToPush, FieldLayout fieldLayout ) public virtual { - StoreCore.pushToField(tableId, key, schemaIndex, dataToPush, fieldLayout); + StoreCore.pushToField(tableId, keyTuple, schemaIndex, dataToPush, fieldLayout); } // Pop byte length from the dynamic field at schema index function popFromField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, uint256 byteLengthToPop, FieldLayout fieldLayout ) public virtual { - StoreCore.popFromField(tableId, key, schemaIndex, byteLengthToPop, fieldLayout); + StoreCore.popFromField(tableId, keyTuple, schemaIndex, byteLengthToPop, fieldLayout); } // Change encoded items within the dynamic field at schema index function updateInField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, uint256 startByteIndex, bytes calldata dataToSet, FieldLayout fieldLayout ) public virtual { - StoreCore.updateInField(tableId, key, schemaIndex, startByteIndex, dataToSet, fieldLayout); + StoreCore.updateInField(tableId, keyTuple, schemaIndex, startByteIndex, dataToSet, fieldLayout); } // Set full record (including full dynamic data) - function deleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) public virtual { - StoreCore.deleteRecord(tableId, key, fieldLayout); + function deleteRecord(bytes32 tableId, bytes32[] memory keyTuple, FieldLayout fieldLayout) public virtual { + StoreCore.deleteRecord(tableId, keyTuple, fieldLayout); } // Emit the ephemeral event without modifying storage function emitEphemeralRecord( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, bytes calldata data, FieldLayout fieldLayout ) public virtual { - StoreCore.emitEphemeralRecord(tableId, key, data, fieldLayout); + StoreCore.emitEphemeralRecord(tableId, keyTuple, data, fieldLayout); } function registerTable( diff --git a/packages/store/ts/storeEvents.ts b/packages/store/ts/storeEvents.ts index c2cb00a604..77b308b8e2 100644 --- a/packages/store/ts/storeEvents.ts +++ b/packages/store/ts/storeEvents.ts @@ -1,6 +1,6 @@ export const storeEvents = [ - "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)", + "event StoreDeleteRecord(bytes32 tableId, bytes32[] keyTuple)", + "event StoreSetField(bytes32 tableId, bytes32[] keyTuple, uint8 schemaIndex, bytes data)", + "event StoreSetRecord(bytes32 tableId, bytes32[] keyTuple, bytes data)", + "event StoreEphemeralRecord(bytes32 tableId, bytes32[] keyTuple, bytes data)", ] as const; diff --git a/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json b/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json new file mode 100644 index 0000000000..b0b3c7ceed --- /dev/null +++ b/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json @@ -0,0 +1,757 @@ +[ + { + "inputs": [ + { + "internalType": "string", + "name": "resource", + "type": "string" + }, + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "AccessDenied", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "DelegationNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "FieldLayoutLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthIsZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "functionSelector", + "type": "bytes4" + } + ], + "name": "FunctionSelectorExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "functionSelector", + "type": "bytes4" + } + ], + "name": "FunctionSelectorNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "InterfaceNotSupported", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "resource", + "type": "string" + } + ], + "name": "InvalidSelector", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "PackedCounter_InvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "resource", + "type": "string" + } + ], + "name": "ResourceExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "resource", + "type": "string" + } + ], + "name": "ResourceNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "SchemaLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SchemaLib_StaticTypeAfterDynamicType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "Slice_OutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidDataLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidFieldNamesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidKeyNamesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidValueSchemaLength", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotDynamicField", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "system", + "type": "address" + } + ], + "name": "SystemExists", + "type": "error" + }, + { + "inputs": [], + "name": "WorldAlreadyInitialized", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreEphemeralRecord", + "type": "event" + }, + { + "inputs": [], + "name": "_msgSender", + "outputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_msgValue", + "outputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "_world", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "emitEphemeralRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "grantee", + "type": "address" + } + ], + "name": "grantAccess", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IModule", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "args", + "type": "bytes" + } + ], + "name": "installModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "delegationControlId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initFuncSelectorAndArgs", + "type": "bytes" + } + ], + "name": "registerDelegation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "systemFunctionName", + "type": "string" + }, + { + "internalType": "string", + "name": "systemFunctionArguments", + "type": "string" + } + ], + "name": "registerFunctionSelector", + "outputs": [ + { + "internalType": "bytes4", + "name": "worldFunctionSelector", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes16", + "name": "namespace", + "type": "bytes16" + } + ], + "name": "registerNamespace", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "bytes4", + "name": "worldFunctionSelector", + "type": "bytes4" + }, + { + "internalType": "bytes4", + "name": "systemFunctionSelector", + "type": "bytes4" + } + ], + "name": "registerRootFunctionSelector", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "contract IStoreHook", + "name": "hookAddress", + "type": "address" + }, + { + "internalType": "uint8", + "name": "enabledHooksBitmap", + "type": "uint8" + } + ], + "name": "registerStoreHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "contract WorldContextConsumer", + "name": "system", + "type": "address" + }, + { + "internalType": "bool", + "name": "publicAccess", + "type": "bool" + } + ], + "name": "registerSystem", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "contract ISystemHook", + "name": "hookAddress", + "type": "address" + }, + { + "internalType": "uint8", + "name": "enabledHooksBitmap", + "type": "uint8" + } + ], + "name": "registerSystemHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "keyNames", + "type": "string[]" + }, + { + "internalType": "string[]", + "name": "fieldNames", + "type": "string[]" + } + ], + "name": "registerTable", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "grantee", + "type": "address" + } + ], + "name": "revokeAccess", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes16", + "name": "fromNamespace", + "type": "bytes16" + }, + { + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferBalanceToAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes16", + "name": "fromNamespace", + "type": "bytes16" + }, + { + "internalType": "bytes16", + "name": "toNamespace", + "type": "bytes16" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferBalanceToNamespace", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes16", + "name": "namespace", + "type": "bytes16" + }, + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "contract IStoreHook", + "name": "hookAddress", + "type": "address" + } + ], + "name": "unregisterStoreHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "contract ISystemHook", + "name": "hookAddress", + "type": "address" + } + ], + "name": "unregisterSystemHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json.d.ts b/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json.d.ts new file mode 100644 index 0000000000..a4e49e5b2c --- /dev/null +++ b/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json.d.ts @@ -0,0 +1,758 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "string"; + name: "resource"; + type: "string"; + }, + { + internalType: "address"; + name: "caller"; + type: "address"; + } + ]; + name: "AccessDenied"; + type: "error"; + }, + { + inputs: [ + { + internalType: "address"; + name: "delegator"; + type: "address"; + }, + { + internalType: "address"; + name: "delegatee"; + type: "address"; + } + ]; + name: "DelegationNotFound"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "FieldLayoutLib_InvalidLength"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthIsZero"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "functionSelector"; + type: "bytes4"; + } + ]; + name: "FunctionSelectorExists"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "functionSelector"; + type: "bytes4"; + } + ]; + name: "FunctionSelectorNotFound"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "balance"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "amount"; + type: "uint256"; + } + ]; + name: "InsufficientBalance"; + type: "error"; + }, + { + inputs: [ + { + internalType: "address"; + name: "contractAddress"; + type: "address"; + }, + { + internalType: "bytes4"; + name: "interfaceId"; + type: "bytes4"; + } + ]; + name: "InterfaceNotSupported"; + type: "error"; + }, + { + inputs: [ + { + internalType: "string"; + name: "resource"; + type: "string"; + } + ]; + name: "InvalidSelector"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "PackedCounter_InvalidLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "string"; + name: "resource"; + type: "string"; + } + ]; + name: "ResourceExists"; + type: "error"; + }, + { + inputs: [ + { + internalType: "string"; + name: "resource"; + type: "string"; + } + ]; + name: "ResourceNotFound"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "SchemaLib_InvalidLength"; + type: "error"; + }, + { + inputs: []; + name: "SchemaLib_StaticTypeAfterDynamicType"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "Slice_OutOfBounds"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidDataLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidFieldNamesLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidKeyNamesLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidValueSchemaLength"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotDynamicField"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableAlreadyExists"; + type: "error"; + }, + { + inputs: [ + { + internalType: "address"; + name: "system"; + type: "address"; + } + ]; + name: "SystemExists"; + type: "error"; + }, + { + inputs: []; + name: "WorldAlreadyInitialized"; + type: "error"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreEphemeralRecord"; + type: "event"; + }, + { + inputs: []; + name: "_msgSender"; + outputs: [ + { + internalType: "address"; + name: "sender"; + type: "address"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: []; + name: "_msgValue"; + outputs: [ + { + internalType: "uint256"; + name: "value"; + type: "uint256"; + } + ]; + stateMutability: "pure"; + type: "function"; + }, + { + inputs: []; + name: "_world"; + outputs: [ + { + internalType: "address"; + name: ""; + type: "address"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "emitEphemeralRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "address"; + name: "grantee"; + type: "address"; + } + ]; + name: "grantAccess"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "contract IModule"; + name: "module"; + type: "address"; + }, + { + internalType: "bytes"; + name: "args"; + type: "bytes"; + } + ]; + name: "installModule"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "address"; + name: "delegatee"; + type: "address"; + }, + { + internalType: "bytes32"; + name: "delegationControlId"; + type: "bytes32"; + }, + { + internalType: "bytes"; + name: "initFuncSelectorAndArgs"; + type: "bytes"; + } + ]; + name: "registerDelegation"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "systemFunctionName"; + type: "string"; + }, + { + internalType: "string"; + name: "systemFunctionArguments"; + type: "string"; + } + ]; + name: "registerFunctionSelector"; + outputs: [ + { + internalType: "bytes4"; + name: "worldFunctionSelector"; + type: "bytes4"; + } + ]; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes16"; + name: "namespace"; + type: "bytes16"; + } + ]; + name: "registerNamespace"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "bytes4"; + name: "worldFunctionSelector"; + type: "bytes4"; + }, + { + internalType: "bytes4"; + name: "systemFunctionSelector"; + type: "bytes4"; + } + ]; + name: "registerRootFunctionSelector"; + outputs: [ + { + internalType: "bytes4"; + name: ""; + type: "bytes4"; + } + ]; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "contract IStoreHook"; + name: "hookAddress"; + type: "address"; + }, + { + internalType: "uint8"; + name: "enabledHooksBitmap"; + type: "uint8"; + } + ]; + name: "registerStoreHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "contract WorldContextConsumer"; + name: "system"; + type: "address"; + }, + { + internalType: "bool"; + name: "publicAccess"; + type: "bool"; + } + ]; + name: "registerSystem"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "contract ISystemHook"; + name: "hookAddress"; + type: "address"; + }, + { + internalType: "uint8"; + name: "enabledHooksBitmap"; + type: "uint8"; + } + ]; + name: "registerSystemHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + }, + { + internalType: "string[]"; + name: "keyNames"; + type: "string[]"; + }, + { + internalType: "string[]"; + name: "fieldNames"; + type: "string[]"; + } + ]; + name: "registerTable"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "address"; + name: "grantee"; + type: "address"; + } + ]; + name: "revokeAccess"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "interfaceId"; + type: "bytes4"; + } + ]; + name: "supportsInterface"; + outputs: [ + { + internalType: "bool"; + name: ""; + type: "bool"; + } + ]; + stateMutability: "pure"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes16"; + name: "fromNamespace"; + type: "bytes16"; + }, + { + internalType: "address"; + name: "toAddress"; + type: "address"; + }, + { + internalType: "uint256"; + name: "amount"; + type: "uint256"; + } + ]; + name: "transferBalanceToAddress"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes16"; + name: "fromNamespace"; + type: "bytes16"; + }, + { + internalType: "bytes16"; + name: "toNamespace"; + type: "bytes16"; + }, + { + internalType: "uint256"; + name: "amount"; + type: "uint256"; + } + ]; + name: "transferBalanceToNamespace"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes16"; + name: "namespace"; + type: "bytes16"; + }, + { + internalType: "address"; + name: "newOwner"; + type: "address"; + } + ]; + name: "transferOwnership"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "contract IStoreHook"; + name: "hookAddress"; + type: "address"; + } + ]; + name: "unregisterStoreHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "contract ISystemHook"; + name: "hookAddress"; + type: "address"; + } + ]; + name: "unregisterSystemHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json b/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json new file mode 100644 index 0000000000..367398d105 --- /dev/null +++ b/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json @@ -0,0 +1,166 @@ +[ + { + "inputs": [ + { + "internalType": "string", + "name": "resource", + "type": "string" + }, + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "AccessDenied", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "FieldLayoutLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthIsZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidDataLength", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreEphemeralRecord", + "type": "event" + }, + { + "inputs": [], + "name": "_msgSender", + "outputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_msgValue", + "outputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "_world", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "emitEphemeralRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json.d.ts b/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json.d.ts new file mode 100644 index 0000000000..4e436b91de --- /dev/null +++ b/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json.d.ts @@ -0,0 +1,167 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "string"; + name: "resource"; + type: "string"; + }, + { + internalType: "address"; + name: "caller"; + type: "address"; + } + ]; + name: "AccessDenied"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "FieldLayoutLib_InvalidLength"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthIsZero"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidDataLength"; + type: "error"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreEphemeralRecord"; + type: "event"; + }, + { + inputs: []; + name: "_msgSender"; + outputs: [ + { + internalType: "address"; + name: "sender"; + type: "address"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: []; + name: "_msgValue"; + outputs: [ + { + internalType: "uint256"; + name: "value"; + type: "uint256"; + } + ]; + stateMutability: "pure"; + type: "function"; + }, + { + inputs: []; + name: "_world"; + outputs: [ + { + internalType: "address"; + name: ""; + type: "address"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "emitEphemeralRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "interfaceId"; + type: "bytes4"; + } + ]; + name: "supportsInterface"; + outputs: [ + { + internalType: "bool"; + name: ""; + type: "bool"; + } + ]; + stateMutability: "pure"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json b/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json new file mode 100644 index 0000000000..f7915c9a9f --- /dev/null +++ b/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json @@ -0,0 +1,1231 @@ +[ + { + "inputs": [ + { + "internalType": "string", + "name": "resource", + "type": "string" + }, + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "AccessDenied", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "DelegationNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "functionSelector", + "type": "bytes4" + } + ], + "name": "FunctionSelectorExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "functionSelector", + "type": "bytes4" + } + ], + "name": "FunctionSelectorNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "InterfaceNotSupported", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "resource", + "type": "string" + } + ], + "name": "InvalidSelector", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "resource", + "type": "string" + } + ], + "name": "ResourceExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "resource", + "type": "string" + } + ], + "name": "ResourceNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_DataIndexOverflow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidDataLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidFieldNamesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidKeyNamesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidValueSchemaLength", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotDynamicField", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "system", + "type": "address" + } + ], + "name": "SystemExists", + "type": "error" + }, + { + "inputs": [], + "name": "WorldAlreadyInitialized", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "HelloWorld", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreEphemeralRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "funcSelectorAndArgs", + "type": "bytes" + } + ], + "name": "call", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "funcSelectorAndArgs", + "type": "bytes" + } + ], + "name": "callFrom", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "creator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "deleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "emitEphemeralRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "grantee", + "type": "address" + } + ], + "name": "grantAccess", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IModule", + "name": "coreModule", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IModule", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "args", + "type": "bytes" + } + ], + "name": "installModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IModule", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "args", + "type": "bytes" + } + ], + "name": "installRootModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "byteLengthToPop", + "type": "uint256" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "popFromField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "dataToPush", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "pushToField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "delegationControlId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initFuncSelectorAndArgs", + "type": "bytes" + } + ], + "name": "registerDelegation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "systemFunctionName", + "type": "string" + }, + { + "internalType": "string", + "name": "systemFunctionArguments", + "type": "string" + } + ], + "name": "registerFunctionSelector", + "outputs": [ + { + "internalType": "bytes4", + "name": "worldFunctionSelector", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes16", + "name": "namespace", + "type": "bytes16" + } + ], + "name": "registerNamespace", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "bytes4", + "name": "worldFunctionSelector", + "type": "bytes4" + }, + { + "internalType": "bytes4", + "name": "systemFunctionSelector", + "type": "bytes4" + } + ], + "name": "registerRootFunctionSelector", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "contract IStoreHook", + "name": "hookAddress", + "type": "address" + }, + { + "internalType": "uint8", + "name": "enabledHooksBitmap", + "type": "uint8" + } + ], + "name": "registerStoreHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "contract WorldContextConsumer", + "name": "system", + "type": "address" + }, + { + "internalType": "bool", + "name": "publicAccess", + "type": "bool" + } + ], + "name": "registerSystem", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "contract ISystemHook", + "name": "hookAddress", + "type": "address" + }, + { + "internalType": "uint8", + "name": "enabledHooksBitmap", + "type": "uint8" + } + ], + "name": "registerSystemHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "keyNames", + "type": "string[]" + }, + { + "internalType": "string[]", + "name": "fieldNames", + "type": "string[]" + } + ], + "name": "registerTable", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "grantee", + "type": "address" + } + ], + "name": "revokeAccess", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes16", + "name": "fromNamespace", + "type": "bytes16" + }, + { + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferBalanceToAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes16", + "name": "fromNamespace", + "type": "bytes16" + }, + { + "internalType": "bytes16", + "name": "toNamespace", + "type": "bytes16" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferBalanceToNamespace", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes16", + "name": "namespace", + "type": "bytes16" + }, + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "contract IStoreHook", + "name": "hookAddress", + "type": "address" + } + ], + "name": "unregisterStoreHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "contract ISystemHook", + "name": "hookAddress", + "type": "address" + } + ], + "name": "unregisterSystemHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "startByteIndex", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "dataToSet", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "updateInField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json.d.ts b/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json.d.ts new file mode 100644 index 0000000000..eebaf2c6b2 --- /dev/null +++ b/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json.d.ts @@ -0,0 +1,1232 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "string"; + name: "resource"; + type: "string"; + }, + { + internalType: "address"; + name: "caller"; + type: "address"; + } + ]; + name: "AccessDenied"; + type: "error"; + }, + { + inputs: [ + { + internalType: "address"; + name: "delegator"; + type: "address"; + }, + { + internalType: "address"; + name: "delegatee"; + type: "address"; + } + ]; + name: "DelegationNotFound"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "functionSelector"; + type: "bytes4"; + } + ]; + name: "FunctionSelectorExists"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "functionSelector"; + type: "bytes4"; + } + ]; + name: "FunctionSelectorNotFound"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "balance"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "amount"; + type: "uint256"; + } + ]; + name: "InsufficientBalance"; + type: "error"; + }, + { + inputs: [ + { + internalType: "address"; + name: "contractAddress"; + type: "address"; + }, + { + internalType: "bytes4"; + name: "interfaceId"; + type: "bytes4"; + } + ]; + name: "InterfaceNotSupported"; + type: "error"; + }, + { + inputs: [ + { + internalType: "string"; + name: "resource"; + type: "string"; + } + ]; + name: "InvalidSelector"; + type: "error"; + }, + { + inputs: [ + { + internalType: "string"; + name: "resource"; + type: "string"; + } + ]; + name: "ResourceExists"; + type: "error"; + }, + { + inputs: [ + { + internalType: "string"; + name: "resource"; + type: "string"; + } + ]; + name: "ResourceNotFound"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_DataIndexOverflow"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidDataLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidFieldNamesLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidKeyNamesLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidValueSchemaLength"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotDynamicField"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotImplemented"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableAlreadyExists"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableNotFound"; + type: "error"; + }, + { + inputs: [ + { + internalType: "address"; + name: "system"; + type: "address"; + } + ]; + name: "SystemExists"; + type: "error"; + }, + { + inputs: []; + name: "WorldAlreadyInitialized"; + type: "error"; + }, + { + anonymous: false; + inputs: []; + name: "HelloWorld"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreEphemeralRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "bytes"; + name: "funcSelectorAndArgs"; + type: "bytes"; + } + ]; + name: "call"; + outputs: [ + { + internalType: "bytes"; + name: ""; + type: "bytes"; + } + ]; + stateMutability: "payable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "address"; + name: "delegator"; + type: "address"; + }, + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "bytes"; + name: "funcSelectorAndArgs"; + type: "bytes"; + } + ]; + name: "callFrom"; + outputs: [ + { + internalType: "bytes"; + name: ""; + type: "bytes"; + } + ]; + stateMutability: "payable"; + type: "function"; + }, + { + inputs: []; + name: "creator"; + outputs: [ + { + internalType: "address"; + name: ""; + type: "address"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "deleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "emitEphemeralRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "address"; + name: "grantee"; + type: "address"; + } + ]; + name: "grantAccess"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "contract IModule"; + name: "coreModule"; + type: "address"; + } + ]; + name: "initialize"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "contract IModule"; + name: "module"; + type: "address"; + }, + { + internalType: "bytes"; + name: "args"; + type: "bytes"; + } + ]; + name: "installModule"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "contract IModule"; + name: "module"; + type: "address"; + }, + { + internalType: "bytes"; + name: "args"; + type: "bytes"; + } + ]; + name: "installRootModule"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "byteLengthToPop"; + type: "uint256"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "popFromField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "dataToPush"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "pushToField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "address"; + name: "delegatee"; + type: "address"; + }, + { + internalType: "bytes32"; + name: "delegationControlId"; + type: "bytes32"; + }, + { + internalType: "bytes"; + name: "initFuncSelectorAndArgs"; + type: "bytes"; + } + ]; + name: "registerDelegation"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "systemFunctionName"; + type: "string"; + }, + { + internalType: "string"; + name: "systemFunctionArguments"; + type: "string"; + } + ]; + name: "registerFunctionSelector"; + outputs: [ + { + internalType: "bytes4"; + name: "worldFunctionSelector"; + type: "bytes4"; + } + ]; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes16"; + name: "namespace"; + type: "bytes16"; + } + ]; + name: "registerNamespace"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "bytes4"; + name: "worldFunctionSelector"; + type: "bytes4"; + }, + { + internalType: "bytes4"; + name: "systemFunctionSelector"; + type: "bytes4"; + } + ]; + name: "registerRootFunctionSelector"; + outputs: [ + { + internalType: "bytes4"; + name: ""; + type: "bytes4"; + } + ]; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "contract IStoreHook"; + name: "hookAddress"; + type: "address"; + }, + { + internalType: "uint8"; + name: "enabledHooksBitmap"; + type: "uint8"; + } + ]; + name: "registerStoreHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "contract WorldContextConsumer"; + name: "system"; + type: "address"; + }, + { + internalType: "bool"; + name: "publicAccess"; + type: "bool"; + } + ]; + name: "registerSystem"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "contract ISystemHook"; + name: "hookAddress"; + type: "address"; + }, + { + internalType: "uint8"; + name: "enabledHooksBitmap"; + type: "uint8"; + } + ]; + name: "registerSystemHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + }, + { + internalType: "string[]"; + name: "keyNames"; + type: "string[]"; + }, + { + internalType: "string[]"; + name: "fieldNames"; + type: "string[]"; + } + ]; + name: "registerTable"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "address"; + name: "grantee"; + type: "address"; + } + ]; + name: "revokeAccess"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes16"; + name: "fromNamespace"; + type: "bytes16"; + }, + { + internalType: "address"; + name: "toAddress"; + type: "address"; + }, + { + internalType: "uint256"; + name: "amount"; + type: "uint256"; + } + ]; + name: "transferBalanceToAddress"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes16"; + name: "fromNamespace"; + type: "bytes16"; + }, + { + internalType: "bytes16"; + name: "toNamespace"; + type: "bytes16"; + }, + { + internalType: "uint256"; + name: "amount"; + type: "uint256"; + } + ]; + name: "transferBalanceToNamespace"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes16"; + name: "namespace"; + type: "bytes16"; + }, + { + internalType: "address"; + name: "newOwner"; + type: "address"; + } + ]; + name: "transferOwnership"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "contract IStoreHook"; + name: "hookAddress"; + type: "address"; + } + ]; + name: "unregisterStoreHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "contract ISystemHook"; + name: "hookAddress"; + type: "address"; + } + ]; + name: "unregisterSystemHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "startByteIndex"; + type: "uint256"; + }, + { + internalType: "bytes"; + name: "dataToSet"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "updateInField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/IStore.sol/IStore.abi.json b/packages/world/abi/IStore.sol/IStore.abi.json new file mode 100644 index 0000000000..974e2e74fa --- /dev/null +++ b/packages/world/abi/IStore.sol/IStore.abi.json @@ -0,0 +1,717 @@ +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_DataIndexOverflow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidDataLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidFieldNamesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidKeyNamesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidValueSchemaLength", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotDynamicField", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableNotFound", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreEphemeralRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "deleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "emitEphemeralRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "byteLengthToPop", + "type": "uint256" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "popFromField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "dataToPush", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "pushToField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "contract IStoreHook", + "name": "hookAddress", + "type": "address" + }, + { + "internalType": "uint8", + "name": "enabledHooksBitmap", + "type": "uint8" + } + ], + "name": "registerStoreHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "keyNames", + "type": "string[]" + }, + { + "internalType": "string[]", + "name": "fieldNames", + "type": "string[]" + } + ], + "name": "registerTable", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "contract IStoreHook", + "name": "hookAddress", + "type": "address" + } + ], + "name": "unregisterStoreHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "startByteIndex", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "dataToSet", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "updateInField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/IStore.sol/IStore.abi.json.d.ts b/packages/world/abi/IStore.sol/IStore.abi.json.d.ts new file mode 100644 index 0000000000..e939bc04ed --- /dev/null +++ b/packages/world/abi/IStore.sol/IStore.abi.json.d.ts @@ -0,0 +1,718 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_DataIndexOverflow"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidDataLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidFieldNamesLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidKeyNamesLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidValueSchemaLength"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotDynamicField"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotImplemented"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableAlreadyExists"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableNotFound"; + type: "error"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreEphemeralRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "deleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "emitEphemeralRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "byteLengthToPop"; + type: "uint256"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "popFromField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "dataToPush"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "pushToField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "contract IStoreHook"; + name: "hookAddress"; + type: "address"; + }, + { + internalType: "uint8"; + name: "enabledHooksBitmap"; + type: "uint8"; + } + ]; + name: "registerStoreHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + }, + { + internalType: "string[]"; + name: "keyNames"; + type: "string[]"; + }, + { + internalType: "string[]"; + name: "fieldNames"; + type: "string[]"; + } + ]; + name: "registerTable"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "contract IStoreHook"; + name: "hookAddress"; + type: "address"; + } + ]; + name: "unregisterStoreHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "startByteIndex"; + type: "uint256"; + }, + { + internalType: "bytes"; + name: "dataToSet"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "updateInField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/IStore.sol/IStoreData.abi.json b/packages/world/abi/IStore.sol/IStoreData.abi.json new file mode 100644 index 0000000000..f6db946f1c --- /dev/null +++ b/packages/world/abi/IStore.sol/IStoreData.abi.json @@ -0,0 +1,463 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "deleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "byteLengthToPop", + "type": "uint256" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "popFromField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "dataToPush", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "pushToField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "startByteIndex", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "dataToSet", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "updateInField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/IStore.sol/IStoreData.abi.json.d.ts b/packages/world/abi/IStore.sol/IStoreData.abi.json.d.ts new file mode 100644 index 0000000000..077b246517 --- /dev/null +++ b/packages/world/abi/IStore.sol/IStoreData.abi.json.d.ts @@ -0,0 +1,464 @@ +declare const abi: [ + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "deleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "byteLengthToPop"; + type: "uint256"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "popFromField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "dataToPush"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "pushToField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "startByteIndex"; + type: "uint256"; + }, + { + internalType: "bytes"; + name: "dataToSet"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "updateInField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json b/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json new file mode 100644 index 0000000000..f591aa2757 --- /dev/null +++ b/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json @@ -0,0 +1,55 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreEphemeralRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "emitEphemeralRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts b/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts new file mode 100644 index 0000000000..9b9186d587 --- /dev/null +++ b/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts @@ -0,0 +1,56 @@ +declare const abi: [ + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreEphemeralRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "emitEphemeralRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/IStore.sol/IStoreRead.abi.json b/packages/world/abi/IStore.sol/IStoreRead.abi.json new file mode 100644 index 0000000000..5fb8e1bc53 --- /dev/null +++ b/packages/world/abi/IStore.sol/IStoreRead.abi.json @@ -0,0 +1,200 @@ +[ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/IStore.sol/IStoreRead.abi.json.d.ts b/packages/world/abi/IStore.sol/IStoreRead.abi.json.d.ts new file mode 100644 index 0000000000..9ca275d41b --- /dev/null +++ b/packages/world/abi/IStore.sol/IStoreRead.abi.json.d.ts @@ -0,0 +1,201 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/IStore.sol/IStoreWrite.abi.json b/packages/world/abi/IStore.sol/IStoreWrite.abi.json new file mode 100644 index 0000000000..352fb8196a --- /dev/null +++ b/packages/world/abi/IStore.sol/IStoreWrite.abi.json @@ -0,0 +1,265 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "deleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "byteLengthToPop", + "type": "uint256" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "popFromField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "dataToPush", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "pushToField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "startByteIndex", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "dataToSet", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "updateInField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/IStore.sol/IStoreWrite.abi.json.d.ts b/packages/world/abi/IStore.sol/IStoreWrite.abi.json.d.ts new file mode 100644 index 0000000000..04ce5d76ab --- /dev/null +++ b/packages/world/abi/IStore.sol/IStoreWrite.abi.json.d.ts @@ -0,0 +1,266 @@ +declare const abi: [ + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "deleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "byteLengthToPop"; + type: "uint256"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "popFromField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "dataToPush"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "pushToField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "startByteIndex"; + type: "uint256"; + }, + { + internalType: "bytes"; + name: "dataToSet"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "updateInField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/IStoreHook.sol/IStoreHook.abi.json b/packages/world/abi/IStoreHook.sol/IStoreHook.abi.json new file mode 100644 index 0000000000..9782a97c93 --- /dev/null +++ b/packages/world/abi/IStoreHook.sol/IStoreHook.abi.json @@ -0,0 +1,189 @@ +[ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts b/packages/world/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts new file mode 100644 index 0000000000..d3e9224ef8 --- /dev/null +++ b/packages/world/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts @@ -0,0 +1,190 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "interfaceID"; + type: "bytes4"; + } + ]; + name: "supportsInterface"; + outputs: [ + { + internalType: "bool"; + name: ""; + type: "bool"; + } + ]; + stateMutability: "view"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json b/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json new file mode 100644 index 0000000000..710c1ed06c --- /dev/null +++ b/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json @@ -0,0 +1,279 @@ +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "FieldLayoutLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthIsZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "PackedCounter_InvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "Slice_OutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_DataIndexOverflow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidDataLength", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotDynamicField", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "", + "type": "bytes32" + } + ], + "name": "onAfterSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "", + "type": "bytes32" + } + ], + "name": "onAfterSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "", + "type": "bytes32" + } + ], + "name": "onBeforeDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "", + "type": "bytes32" + } + ], + "name": "onBeforeSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "", + "type": "bytes32" + } + ], + "name": "onBeforeSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json.d.ts b/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json.d.ts new file mode 100644 index 0000000000..d01f54b190 --- /dev/null +++ b/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json.d.ts @@ -0,0 +1,280 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "FieldLayoutLib_InvalidLength"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthIsZero"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "PackedCounter_InvalidLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "Slice_OutOfBounds"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_DataIndexOverflow"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidDataLength"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotDynamicField"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: ""; + type: "uint8"; + }, + { + internalType: "bytes"; + name: ""; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: ""; + type: "bytes32"; + } + ]; + name: "onAfterSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: ""; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: ""; + type: "bytes32"; + } + ]; + name: "onAfterSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: ""; + type: "bytes32"; + } + ]; + name: "onBeforeDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: ""; + type: "uint8"; + }, + { + internalType: "bytes"; + name: ""; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: ""; + type: "bytes32"; + } + ]; + name: "onBeforeSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: ""; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: ""; + type: "bytes32"; + } + ]; + name: "onBeforeSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "interfaceId"; + type: "bytes4"; + } + ]; + name: "supportsInterface"; + outputs: [ + { + internalType: "bool"; + name: ""; + type: "bool"; + } + ]; + stateMutability: "pure"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json b/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json new file mode 100644 index 0000000000..0760ed5cb7 --- /dev/null +++ b/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json @@ -0,0 +1,263 @@ +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "FieldLayoutLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthIsZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "PackedCounter_InvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "Slice_OutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidDataLength", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotDynamicField", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "sourceTableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "sourceTableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "sourceTableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "sourceTableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "sourceTableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "sourceTableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json.d.ts b/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json.d.ts new file mode 100644 index 0000000000..e5c0491a73 --- /dev/null +++ b/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json.d.ts @@ -0,0 +1,264 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "FieldLayoutLib_InvalidLength"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthIsZero"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "PackedCounter_InvalidLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "Slice_OutOfBounds"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidDataLength"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotDynamicField"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "sourceTableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "sourceTableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: ""; + type: "uint8"; + }, + { + internalType: "bytes"; + name: ""; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "sourceTableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "sourceTableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "sourceTableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: ""; + type: "uint8"; + }, + { + internalType: "bytes"; + name: ""; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "sourceTableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "interfaceId"; + type: "bytes4"; + } + ]; + name: "supportsInterface"; + outputs: [ + { + internalType: "bool"; + name: ""; + type: "bool"; + } + ]; + stateMutability: "pure"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/StoreCore.sol/StoreCore.abi.json b/packages/world/abi/StoreCore.sol/StoreCore.abi.json new file mode 100644 index 0000000000..3808909d9a --- /dev/null +++ b/packages/world/abi/StoreCore.sol/StoreCore.abi.json @@ -0,0 +1,102 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreEphemeralRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "fieldIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + } +] \ No newline at end of file diff --git a/packages/world/abi/StoreCore.sol/StoreCore.abi.json.d.ts b/packages/world/abi/StoreCore.sol/StoreCore.abi.json.d.ts new file mode 100644 index 0000000000..fa9de440d1 --- /dev/null +++ b/packages/world/abi/StoreCore.sol/StoreCore.abi.json.d.ts @@ -0,0 +1,103 @@ +declare const abi: [ + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreEphemeralRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "fieldIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + } +]; +export default abi; diff --git a/packages/world/abi/StoreHook.sol/StoreHook.abi.json b/packages/world/abi/StoreHook.sol/StoreHook.abi.json new file mode 100644 index 0000000000..59ef8376aa --- /dev/null +++ b/packages/world/abi/StoreHook.sol/StoreHook.abi.json @@ -0,0 +1,189 @@ +[ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/StoreHook.sol/StoreHook.abi.json.d.ts b/packages/world/abi/StoreHook.sol/StoreHook.abi.json.d.ts new file mode 100644 index 0000000000..4091c781ed --- /dev/null +++ b/packages/world/abi/StoreHook.sol/StoreHook.abi.json.d.ts @@ -0,0 +1,190 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "interfaceId"; + type: "bytes4"; + } + ]; + name: "supportsInterface"; + outputs: [ + { + internalType: "bool"; + name: ""; + type: "bool"; + } + ]; + stateMutability: "pure"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/StoreRead.sol/StoreRead.abi.json b/packages/world/abi/StoreRead.sol/StoreRead.abi.json new file mode 100644 index 0000000000..7ac3c66a02 --- /dev/null +++ b/packages/world/abi/StoreRead.sol/StoreRead.abi.json @@ -0,0 +1,242 @@ +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "FieldLayoutLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthIsZero", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotDynamicField", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/StoreRead.sol/StoreRead.abi.json.d.ts b/packages/world/abi/StoreRead.sol/StoreRead.abi.json.d.ts new file mode 100644 index 0000000000..8a28178333 --- /dev/null +++ b/packages/world/abi/StoreRead.sol/StoreRead.abi.json.d.ts @@ -0,0 +1,243 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "FieldLayoutLib_InvalidLength"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthIsZero"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotDynamicField"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableNotFound"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: ""; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/World.sol/World.abi.json b/packages/world/abi/World.sol/World.abi.json new file mode 100644 index 0000000000..23782fe93e --- /dev/null +++ b/packages/world/abi/World.sol/World.abi.json @@ -0,0 +1,820 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "resource", + "type": "string" + }, + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "AccessDenied", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "DelegationNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "FieldLayoutLib_InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", + "type": "error" + }, + { + "inputs": [], + "name": "FieldLayoutLib_StaticLengthIsZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "functionSelector", + "type": "bytes4" + } + ], + "name": "FunctionSelectorExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "functionSelector", + "type": "bytes4" + } + ], + "name": "FunctionSelectorNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "InterfaceNotSupported", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "resource", + "type": "string" + } + ], + "name": "InvalidSelector", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "PackedCounter_InvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "resource", + "type": "string" + } + ], + "name": "ResourceExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "resource", + "type": "string" + } + ], + "name": "ResourceNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "Slice_OutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_DataIndexOverflow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidDataLength", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotDynamicField", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "system", + "type": "address" + } + ], + "name": "SystemExists", + "type": "error" + }, + { + "inputs": [], + "name": "WorldAlreadyInitialized", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "HelloWorld", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "funcSelectorAndArgs", + "type": "bytes" + } + ], + "name": "call", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "resourceSelector", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "funcSelectorAndArgs", + "type": "bytes" + } + ], + "name": "callFrom", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "creator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "deleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IModule", + "name": "coreModule", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IModule", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "args", + "type": "bytes" + } + ], + "name": "installRootModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "byteLengthToPop", + "type": "uint256" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "popFromField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "dataToPush", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "pushToField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "startByteIndex", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "dataToSet", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "updateInField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] \ No newline at end of file diff --git a/packages/world/abi/World.sol/World.abi.json.d.ts b/packages/world/abi/World.sol/World.abi.json.d.ts new file mode 100644 index 0000000000..e5398caa53 --- /dev/null +++ b/packages/world/abi/World.sol/World.abi.json.d.ts @@ -0,0 +1,821 @@ +declare const abi: [ + { + inputs: []; + stateMutability: "nonpayable"; + type: "constructor"; + }, + { + inputs: [ + { + internalType: "string"; + name: "resource"; + type: "string"; + }, + { + internalType: "address"; + name: "caller"; + type: "address"; + } + ]; + name: "AccessDenied"; + type: "error"; + }, + { + inputs: [ + { + internalType: "address"; + name: "delegator"; + type: "address"; + }, + { + internalType: "address"; + name: "delegatee"; + type: "address"; + } + ]; + name: "DelegationNotFound"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "FieldLayoutLib_InvalidLength"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; + type: "error"; + }, + { + inputs: []; + name: "FieldLayoutLib_StaticLengthIsZero"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "functionSelector"; + type: "bytes4"; + } + ]; + name: "FunctionSelectorExists"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "functionSelector"; + type: "bytes4"; + } + ]; + name: "FunctionSelectorNotFound"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "balance"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "amount"; + type: "uint256"; + } + ]; + name: "InsufficientBalance"; + type: "error"; + }, + { + inputs: [ + { + internalType: "address"; + name: "contractAddress"; + type: "address"; + }, + { + internalType: "bytes4"; + name: "interfaceId"; + type: "bytes4"; + } + ]; + name: "InterfaceNotSupported"; + type: "error"; + }, + { + inputs: [ + { + internalType: "string"; + name: "resource"; + type: "string"; + } + ]; + name: "InvalidSelector"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + } + ]; + name: "PackedCounter_InvalidLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "string"; + name: "resource"; + type: "string"; + } + ]; + name: "ResourceExists"; + type: "error"; + }, + { + inputs: [ + { + internalType: "string"; + name: "resource"; + type: "string"; + } + ]; + name: "ResourceNotFound"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "Slice_OutOfBounds"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_DataIndexOverflow"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidDataLength"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotDynamicField"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableNotFound"; + type: "error"; + }, + { + inputs: [ + { + internalType: "address"; + name: "system"; + type: "address"; + } + ]; + name: "SystemExists"; + type: "error"; + }, + { + inputs: []; + name: "WorldAlreadyInitialized"; + type: "error"; + }, + { + anonymous: false; + inputs: []; + name: "HelloWorld"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + }, + { + stateMutability: "payable"; + type: "fallback"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "bytes"; + name: "funcSelectorAndArgs"; + type: "bytes"; + } + ]; + name: "call"; + outputs: [ + { + internalType: "bytes"; + name: ""; + type: "bytes"; + } + ]; + stateMutability: "payable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "address"; + name: "delegator"; + type: "address"; + }, + { + internalType: "bytes32"; + name: "resourceSelector"; + type: "bytes32"; + }, + { + internalType: "bytes"; + name: "funcSelectorAndArgs"; + type: "bytes"; + } + ]; + name: "callFrom"; + outputs: [ + { + internalType: "bytes"; + name: ""; + type: "bytes"; + } + ]; + stateMutability: "payable"; + type: "function"; + }, + { + inputs: []; + name: "creator"; + outputs: [ + { + internalType: "address"; + name: ""; + type: "address"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "deleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: ""; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "contract IModule"; + name: "coreModule"; + type: "address"; + } + ]; + name: "initialize"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "contract IModule"; + name: "module"; + type: "address"; + }, + { + internalType: "bytes"; + name: "args"; + type: "bytes"; + } + ]; + name: "installRootModule"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "byteLengthToPop"; + type: "uint256"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "popFromField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "dataToPush"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "pushToField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "startByteIndex"; + type: "uint256"; + }, + { + internalType: "bytes"; + name: "dataToSet"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "updateInField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + stateMutability: "payable"; + type: "receive"; + } +]; +export default abi; diff --git a/packages/world/abi/src/IStore.sol/IStore.abi.json b/packages/world/abi/src/IStore.sol/IStore.abi.json new file mode 100644 index 0000000000..974e2e74fa --- /dev/null +++ b/packages/world/abi/src/IStore.sol/IStore.abi.json @@ -0,0 +1,717 @@ +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_DataIndexOverflow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidDataLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidFieldNamesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidKeyNamesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "StoreCore_InvalidValueSchemaLength", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotDynamicField", + "type": "error" + }, + { + "inputs": [], + "name": "StoreCore_NotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "tableIdString", + "type": "string" + } + ], + "name": "StoreCore_TableNotFound", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreEphemeralRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "deleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "emitEphemeralRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "byteLengthToPop", + "type": "uint256" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "popFromField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "dataToPush", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "pushToField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "contract IStoreHook", + "name": "hookAddress", + "type": "address" + }, + { + "internalType": "uint8", + "name": "enabledHooksBitmap", + "type": "uint8" + } + ], + "name": "registerStoreHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + }, + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "keyNames", + "type": "string[]" + }, + { + "internalType": "string[]", + "name": "fieldNames", + "type": "string[]" + } + ], + "name": "registerTable", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "contract IStoreHook", + "name": "hookAddress", + "type": "address" + } + ], + "name": "unregisterStoreHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "startByteIndex", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "dataToSet", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "updateInField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/src/IStore.sol/IStore.abi.json.d.ts b/packages/world/abi/src/IStore.sol/IStore.abi.json.d.ts new file mode 100644 index 0000000000..e939bc04ed --- /dev/null +++ b/packages/world/abi/src/IStore.sol/IStore.abi.json.d.ts @@ -0,0 +1,718 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "uint256"; + name: "length"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_DataIndexOverflow"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidDataLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidFieldNamesLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidKeyNamesLength"; + type: "error"; + }, + { + inputs: [ + { + internalType: "uint256"; + name: "expected"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "received"; + type: "uint256"; + } + ]; + name: "StoreCore_InvalidValueSchemaLength"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotDynamicField"; + type: "error"; + }, + { + inputs: []; + name: "StoreCore_NotImplemented"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableAlreadyExists"; + type: "error"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "string"; + name: "tableIdString"; + type: "string"; + } + ]; + name: "StoreCore_TableNotFound"; + type: "error"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreEphemeralRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "deleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "emitEphemeralRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "byteLengthToPop"; + type: "uint256"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "popFromField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "dataToPush"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "pushToField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "contract IStoreHook"; + name: "hookAddress"; + type: "address"; + }, + { + internalType: "uint8"; + name: "enabledHooksBitmap"; + type: "uint8"; + } + ]; + name: "registerStoreHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + }, + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + }, + { + internalType: "string[]"; + name: "keyNames"; + type: "string[]"; + }, + { + internalType: "string[]"; + name: "fieldNames"; + type: "string[]"; + } + ]; + name: "registerTable"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "contract IStoreHook"; + name: "hookAddress"; + type: "address"; + } + ]; + name: "unregisterStoreHook"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "startByteIndex"; + type: "uint256"; + }, + { + internalType: "bytes"; + name: "dataToSet"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "updateInField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/src/IStore.sol/IStoreData.abi.json b/packages/world/abi/src/IStore.sol/IStoreData.abi.json new file mode 100644 index 0000000000..f6db946f1c --- /dev/null +++ b/packages/world/abi/src/IStore.sol/IStoreData.abi.json @@ -0,0 +1,463 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "deleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "byteLengthToPop", + "type": "uint256" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "popFromField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "dataToPush", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "pushToField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "startByteIndex", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "dataToSet", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "updateInField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/src/IStore.sol/IStoreData.abi.json.d.ts b/packages/world/abi/src/IStore.sol/IStoreData.abi.json.d.ts new file mode 100644 index 0000000000..077b246517 --- /dev/null +++ b/packages/world/abi/src/IStore.sol/IStoreData.abi.json.d.ts @@ -0,0 +1,464 @@ +declare const abi: [ + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "deleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "byteLengthToPop"; + type: "uint256"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "popFromField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "dataToPush"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "pushToField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "startByteIndex"; + type: "uint256"; + }, + { + internalType: "bytes"; + name: "dataToSet"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "updateInField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json b/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json new file mode 100644 index 0000000000..f591aa2757 --- /dev/null +++ b/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json @@ -0,0 +1,55 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreEphemeralRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "emitEphemeralRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json.d.ts b/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json.d.ts new file mode 100644 index 0000000000..9b9186d587 --- /dev/null +++ b/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json.d.ts @@ -0,0 +1,56 @@ +declare const abi: [ + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreEphemeralRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "emitEphemeralRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/src/IStore.sol/IStoreRead.abi.json b/packages/world/abi/src/IStore.sol/IStoreRead.abi.json new file mode 100644 index 0000000000..5fb8e1bc53 --- /dev/null +++ b/packages/world/abi/src/IStore.sol/IStoreRead.abi.json @@ -0,0 +1,200 @@ +[ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getField", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getFieldLayout", + "outputs": [ + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getFieldLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getFieldSlice", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getKeySchema", + "outputs": [ + { + "internalType": "Schema", + "name": "keySchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "getRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + } + ], + "name": "getValueSchema", + "outputs": [ + { + "internalType": "Schema", + "name": "valueSchema", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/src/IStore.sol/IStoreRead.abi.json.d.ts b/packages/world/abi/src/IStore.sol/IStoreRead.abi.json.d.ts new file mode 100644 index 0000000000..9ca275d41b --- /dev/null +++ b/packages/world/abi/src/IStore.sol/IStoreRead.abi.json.d.ts @@ -0,0 +1,201 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getField"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getFieldLayout"; + outputs: [ + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getFieldLength"; + outputs: [ + { + internalType: "uint256"; + name: ""; + type: "uint256"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + }, + { + internalType: "uint256"; + name: "start"; + type: "uint256"; + }, + { + internalType: "uint256"; + name: "end"; + type: "uint256"; + } + ]; + name: "getFieldSlice"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getKeySchema"; + outputs: [ + { + internalType: "Schema"; + name: "keySchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "getRecord"; + outputs: [ + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + stateMutability: "view"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + } + ]; + name: "getValueSchema"; + outputs: [ + { + internalType: "Schema"; + name: "valueSchema"; + type: "bytes32"; + } + ]; + stateMutability: "view"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json b/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json new file mode 100644 index 0000000000..352fb8196a --- /dev/null +++ b/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json @@ -0,0 +1,265 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "deleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "byteLengthToPop", + "type": "uint256" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "popFromField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "dataToPush", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "pushToField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "startByteIndex", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "dataToSet", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "updateInField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json.d.ts b/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json.d.ts new file mode 100644 index 0000000000..04ce5d76ab --- /dev/null +++ b/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json.d.ts @@ -0,0 +1,266 @@ +declare const abi: [ + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "deleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "byteLengthToPop"; + type: "uint256"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "popFromField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "dataToPush"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "pushToField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "setRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "uint256"; + name: "startByteIndex"; + type: "uint256"; + }, + { + internalType: "bytes"; + name: "dataToSet"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "updateInField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json b/packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json new file mode 100644 index 0000000000..9782a97c93 --- /dev/null +++ b/packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json @@ -0,0 +1,189 @@ +[ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json.d.ts b/packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json.d.ts new file mode 100644 index 0000000000..d3e9224ef8 --- /dev/null +++ b/packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json.d.ts @@ -0,0 +1,190 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "interfaceID"; + type: "bytes4"; + } + ]; + name: "supportsInterface"; + outputs: [ + { + internalType: "bool"; + name: ""; + type: "bool"; + } + ]; + stateMutability: "view"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/abi/src/StoreCore.sol/StoreCore.abi.json b/packages/world/abi/src/StoreCore.sol/StoreCore.abi.json new file mode 100644 index 0000000000..3808909d9a --- /dev/null +++ b/packages/world/abi/src/StoreCore.sol/StoreCore.abi.json @@ -0,0 +1,102 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + } + ], + "name": "StoreDeleteRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreEphemeralRecord", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "fieldIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetField", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "StoreSetRecord", + "type": "event" + } +] \ No newline at end of file diff --git a/packages/world/abi/src/StoreCore.sol/StoreCore.abi.json.d.ts b/packages/world/abi/src/StoreCore.sol/StoreCore.abi.json.d.ts new file mode 100644 index 0000000000..fa9de440d1 --- /dev/null +++ b/packages/world/abi/src/StoreCore.sol/StoreCore.abi.json.d.ts @@ -0,0 +1,103 @@ +declare const abi: [ + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + } + ]; + name: "StoreDeleteRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreEphemeralRecord"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "uint8"; + name: "fieldIndex"; + type: "uint8"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetField"; + type: "event"; + }, + { + anonymous: false; + inputs: [ + { + indexed: false; + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + indexed: false; + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + indexed: false; + internalType: "bytes"; + name: "data"; + type: "bytes"; + } + ]; + name: "StoreSetRecord"; + type: "event"; + } +]; +export default abi; diff --git a/packages/world/abi/src/StoreHook.sol/StoreHook.abi.json b/packages/world/abi/src/StoreHook.sol/StoreHook.abi.json new file mode 100644 index 0000000000..59ef8376aa --- /dev/null +++ b/packages/world/abi/src/StoreHook.sol/StoreHook.abi.json @@ -0,0 +1,189 @@ +[ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onAfterSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeDeleteRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "uint8", + "name": "schemaIndex", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetField", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tableId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "keyTuple", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "FieldLayout", + "name": "fieldLayout", + "type": "bytes32" + } + ], + "name": "onBeforeSetRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } +] \ No newline at end of file diff --git a/packages/world/abi/src/StoreHook.sol/StoreHook.abi.json.d.ts b/packages/world/abi/src/StoreHook.sol/StoreHook.abi.json.d.ts new file mode 100644 index 0000000000..4091c781ed --- /dev/null +++ b/packages/world/abi/src/StoreHook.sol/StoreHook.abi.json.d.ts @@ -0,0 +1,190 @@ +declare const abi: [ + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onAfterSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeDeleteRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "uint8"; + name: "schemaIndex"; + type: "uint8"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetField"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes32"; + name: "tableId"; + type: "bytes32"; + }, + { + internalType: "bytes32[]"; + name: "keyTuple"; + type: "bytes32[]"; + }, + { + internalType: "bytes"; + name: "data"; + type: "bytes"; + }, + { + internalType: "FieldLayout"; + name: "fieldLayout"; + type: "bytes32"; + } + ]; + name: "onBeforeSetRecord"; + outputs: []; + stateMutability: "nonpayable"; + type: "function"; + }, + { + inputs: [ + { + internalType: "bytes4"; + name: "interfaceId"; + type: "bytes4"; + } + ]; + name: "supportsInterface"; + outputs: [ + { + internalType: "bool"; + name: ""; + type: "bool"; + } + ]; + stateMutability: "pure"; + type: "function"; + } +]; +export default abi; diff --git a/packages/world/src/World.sol b/packages/world/src/World.sol index 9544c61608..3653102813 100644 --- a/packages/world/src/World.sol +++ b/packages/world/src/World.sol @@ -97,7 +97,7 @@ contract World is StoreRead, IStoreData, IWorldKernel { */ function setRecord( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, bytes calldata data, FieldLayout fieldLayout ) public virtual { @@ -105,7 +105,7 @@ contract World is StoreRead, IStoreData, IWorldKernel { AccessControl.requireAccess(tableId, msg.sender); // Set the record - StoreCore.setRecord(tableId, key, data, fieldLayout); + StoreCore.setRecord(tableId, keyTuple, data, fieldLayout); } /** @@ -114,7 +114,7 @@ contract World is StoreRead, IStoreData, IWorldKernel { */ function setField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, bytes calldata data, FieldLayout fieldLayout @@ -123,7 +123,7 @@ contract World is StoreRead, IStoreData, IWorldKernel { AccessControl.requireAccess(tableId, msg.sender); // Set the field - StoreCore.setField(tableId, key, schemaIndex, data, fieldLayout); + StoreCore.setField(tableId, keyTuple, schemaIndex, data, fieldLayout); } /** @@ -132,7 +132,7 @@ contract World is StoreRead, IStoreData, IWorldKernel { */ function pushToField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, bytes calldata dataToPush, FieldLayout fieldLayout @@ -141,7 +141,7 @@ contract World is StoreRead, IStoreData, IWorldKernel { AccessControl.requireAccess(tableId, msg.sender); // Push to the field - StoreCore.pushToField(tableId, key, schemaIndex, dataToPush, fieldLayout); + StoreCore.pushToField(tableId, keyTuple, schemaIndex, dataToPush, fieldLayout); } /** @@ -150,7 +150,7 @@ contract World is StoreRead, IStoreData, IWorldKernel { */ function popFromField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, uint256 byteLengthToPop, FieldLayout fieldLayout @@ -159,7 +159,7 @@ contract World is StoreRead, IStoreData, IWorldKernel { AccessControl.requireAccess(tableId, msg.sender); // Push to the field - StoreCore.popFromField(tableId, key, schemaIndex, byteLengthToPop, fieldLayout); + StoreCore.popFromField(tableId, keyTuple, schemaIndex, byteLengthToPop, fieldLayout); } /** @@ -168,7 +168,7 @@ contract World is StoreRead, IStoreData, IWorldKernel { */ function updateInField( bytes32 tableId, - bytes32[] calldata key, + bytes32[] calldata keyTuple, uint8 schemaIndex, uint256 startByteIndex, bytes calldata dataToSet, @@ -178,19 +178,19 @@ contract World is StoreRead, IStoreData, IWorldKernel { AccessControl.requireAccess(tableId, msg.sender); // Update data in the field - StoreCore.updateInField(tableId, key, schemaIndex, startByteIndex, dataToSet, fieldLayout); + StoreCore.updateInField(tableId, keyTuple, schemaIndex, startByteIndex, dataToSet, fieldLayout); } /** * Delete a record in the table at the given tableId. * Requires the caller to have access to the namespace or name. */ - function deleteRecord(bytes32 tableId, bytes32[] calldata key, FieldLayout fieldLayout) public virtual { + function deleteRecord(bytes32 tableId, bytes32[] calldata keyTuple, FieldLayout fieldLayout) public virtual { // Require access to namespace or name AccessControl.requireAccess(tableId, msg.sender); // Delete the record - StoreCore.deleteRecord(tableId, key, fieldLayout); + StoreCore.deleteRecord(tableId, keyTuple, fieldLayout); } /************************************************************************ diff --git a/packages/world/src/modules/core/implementations/EphemeralRecordSystem.sol b/packages/world/src/modules/core/implementations/EphemeralRecordSystem.sol index 14aa949c04..5a41ebf30b 100644 --- a/packages/world/src/modules/core/implementations/EphemeralRecordSystem.sol +++ b/packages/world/src/modules/core/implementations/EphemeralRecordSystem.sol @@ -18,7 +18,7 @@ contract EphemeralRecordSystem is IStoreEphemeral, System { */ function emitEphemeralRecord( bytes32 resourceSelector, - bytes32[] calldata key, + bytes32[] calldata keyTuple, bytes calldata data, FieldLayout fieldLayout ) public virtual { @@ -26,6 +26,6 @@ contract EphemeralRecordSystem is IStoreEphemeral, System { AccessControl.requireAccess(resourceSelector, msg.sender); // Set the record - StoreCore.emitEphemeralRecord(resourceSelector, key, data, fieldLayout); + StoreCore.emitEphemeralRecord(resourceSelector, keyTuple, data, fieldLayout); } } diff --git a/packages/world/src/modules/keysintable/KeysInTableHook.sol b/packages/world/src/modules/keysintable/KeysInTableHook.sol index 1953bea6ea..6f4dea57f3 100644 --- a/packages/world/src/modules/keysintable/KeysInTableHook.sol +++ b/packages/world/src/modules/keysintable/KeysInTableHook.sol @@ -8,61 +8,61 @@ import { KeysInTable } from "./tables/KeysInTable.sol"; import { UsedKeysIndex } from "./tables/UsedKeysIndex.sol"; /** - * Note: if a tableId with composite keys is used, only the first key is indexed + * Note: if a tableId with composite keys is used, only the first five keys of the tuple are indexed */ contract KeysInTableHook is StoreHook { - function handleSet(bytes32 tableId, bytes32[] memory key) internal { - bytes32 keysHash = keccak256(abi.encode(key)); + function handleSet(bytes32 tableId, bytes32[] memory keyTuple) internal { + bytes32 keysHash = keccak256(abi.encode(keyTuple)); - // If the key has not yet been set in the table... + // If the keyTuple has not yet been set in the table... if (!UsedKeysIndex.getHas(tableId, keysHash)) { uint40 length = uint40(KeysInTable.lengthKeys0(tableId)); - // Push the key to the list of keys in this table - if (key.length > 0) { - KeysInTable.pushKeys0(tableId, key[0]); - if (key.length > 1) { - KeysInTable.pushKeys1(tableId, key[1]); - if (key.length > 2) { - KeysInTable.pushKeys2(tableId, key[2]); - if (key.length > 3) { - KeysInTable.pushKeys3(tableId, key[3]); - if (key.length > 4) { - KeysInTable.pushKeys4(tableId, key[4]); + // Push the keyTuple to the list of keys in this tableId + if (keyTuple.length > 0) { + KeysInTable.pushKeys0(tableId, keyTuple[0]); + if (keyTuple.length > 1) { + KeysInTable.pushKeys1(tableId, keyTuple[1]); + if (keyTuple.length > 2) { + KeysInTable.pushKeys2(tableId, keyTuple[2]); + if (keyTuple.length > 3) { + KeysInTable.pushKeys3(tableId, keyTuple[3]); + if (keyTuple.length > 4) { + KeysInTable.pushKeys4(tableId, keyTuple[4]); } } } } } - // Update the index to avoid duplicating this key in the array + // Update the index to avoid duplicating this keyTuple in the array UsedKeysIndex.set(tableId, keysHash, true, length); } } - function onBeforeSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory, FieldLayout) public { - handleSet(tableId, key); + function onBeforeSetRecord(bytes32 tableId, bytes32[] memory keyTuple, bytes memory, FieldLayout) public { + handleSet(tableId, keyTuple); } - function onAfterSetRecord(bytes32 tableId, bytes32[] memory key, bytes memory, FieldLayout) public { + function onAfterSetRecord(bytes32 tableId, bytes32[] memory keyTuple, bytes memory, FieldLayout) public { // NOOP } - function onBeforeSetField(bytes32 tableId, bytes32[] memory key, uint8, bytes memory, FieldLayout) public { + function onBeforeSetField(bytes32 tableId, bytes32[] memory keyTuple, uint8, bytes memory, FieldLayout) public { // NOOP } - function onAfterSetField(bytes32 tableId, bytes32[] memory key, uint8, bytes memory, FieldLayout) public { - handleSet(tableId, key); + function onAfterSetField(bytes32 tableId, bytes32[] memory keyTuple, uint8, bytes memory, FieldLayout) public { + handleSet(tableId, keyTuple); } - function onBeforeDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout) public { - bytes32 keysHash = keccak256(abi.encode(key)); + function onBeforeDeleteRecord(bytes32 tableId, bytes32[] memory keyTuple, FieldLayout) public { + bytes32 keysHash = keccak256(abi.encode(keyTuple)); (bool has, uint40 index) = UsedKeysIndex.get(tableId, keysHash); - // If the key was part of the table... + // If the keyTuple was part of the table... if (has) { - // Delete the index as the key is not in the table + // Delete the index as the keyTuple is not in the table anymore UsedKeysIndex.deleteRecord(tableId, keysHash); uint40 length = uint40(KeysInTable.lengthKeys0(tableId)); @@ -71,37 +71,38 @@ contract KeysInTableHook is StoreHook { // Delete the list of keys in this table KeysInTable.deleteRecord(tableId); } else { - if (key.length > 0) { - bytes32[] memory lastKeyTuple = new bytes32[](key.length); + if (keyTuple.length > 0) { + bytes32[] memory lastKeyTuple = new bytes32[](keyTuple.length); bytes32 lastKey = KeysInTable.getItemKeys0(tableId, length - 1); lastKeyTuple[0] = lastKey; + // Remove the keyTuple from the list of keys in this table KeysInTable.updateKeys0(tableId, index, lastKey); KeysInTable.popKeys0(tableId); - if (key.length > 1) { + if (keyTuple.length > 1) { lastKey = KeysInTable.getItemKeys1(tableId, length - 1); lastKeyTuple[1] = lastKey; KeysInTable.updateKeys1(tableId, index, lastKey); KeysInTable.popKeys1(tableId); - if (key.length > 2) { + if (keyTuple.length > 2) { lastKey = KeysInTable.getItemKeys2(tableId, length - 1); lastKeyTuple[2] = lastKey; KeysInTable.updateKeys2(tableId, index, lastKey); KeysInTable.popKeys2(tableId); - if (key.length > 3) { + if (keyTuple.length > 3) { lastKey = KeysInTable.getItemKeys3(tableId, length - 1); lastKeyTuple[3] = lastKey; KeysInTable.updateKeys3(tableId, index, lastKey); KeysInTable.popKeys3(tableId); - if (key.length > 4) { + if (keyTuple.length > 4) { lastKey = KeysInTable.getItemKeys4(tableId, length - 1); lastKeyTuple[4] = lastKey; @@ -112,7 +113,7 @@ contract KeysInTableHook is StoreHook { } } - // Update the index of lastKey after swapping it with the deleted key + // Update the index of lastKey after swapping it with the deleted keyTuple bytes32 lastKeyHash = keccak256(abi.encode(lastKeyTuple)); UsedKeysIndex.setIndex(tableId, lastKeyHash, index); } @@ -120,7 +121,7 @@ contract KeysInTableHook is StoreHook { } } - function onAfterDeleteRecord(bytes32 tableId, bytes32[] memory key, FieldLayout fieldLayout) public { + function onAfterDeleteRecord(bytes32 tableId, bytes32[] memory keyTuple, FieldLayout fieldLayout) public { // NOOP } } diff --git a/packages/world/src/modules/keysintable/hasKey.sol b/packages/world/src/modules/keysintable/hasKey.sol index d085a63e6c..637439047e 100644 --- a/packages/world/src/modules/keysintable/hasKey.sol +++ b/packages/world/src/modules/keysintable/hasKey.sol @@ -6,22 +6,22 @@ import { IStore } from "@latticexyz/store/src/IStore.sol"; import { UsedKeysIndex } from "./tables/UsedKeysIndex.sol"; /** - * Get whether the key is in the given table. + * Get whether the keyTuple is in the given table. * * Note: this util can only be called within the context of a Store (e.g. from a System or Module). * For usage outside of a Store, use the overload that takes an explicit store argument. */ -function hasKey(bytes32 tableId, bytes32[] memory key) view returns (bool) { - bytes32 keysHash = keccak256(abi.encode(key)); +function hasKey(bytes32 tableId, bytes32[] memory keyTuple) view returns (bool) { + bytes32 keysHash = keccak256(abi.encode(keyTuple)); return UsedKeysIndex.getHas(tableId, keysHash); } /** - * Get whether the key is in the given table for the given store. + * Get whether the keyTuple is in the given table for the given store. */ -function hasKey(IStore store, bytes32 tableId, bytes32[] memory key) view returns (bool) { - bytes32 keysHash = keccak256(abi.encode(key)); +function hasKey(IStore store, bytes32 tableId, bytes32[] memory keyTuple) view returns (bool) { + bytes32 keysHash = keccak256(abi.encode(keyTuple)); return UsedKeysIndex.getHas(store, tableId, keysHash); } diff --git a/packages/world/src/modules/keyswithvalue/KeysWithValueHook.sol b/packages/world/src/modules/keyswithvalue/KeysWithValueHook.sol index 63e66ed8d1..f0326407cd 100644 --- a/packages/world/src/modules/keyswithvalue/KeysWithValueHook.sol +++ b/packages/world/src/modules/keyswithvalue/KeysWithValueHook.sol @@ -19,7 +19,7 @@ import { getTargetTableSelector } from "../utils/getTargetTableSelector.sol"; * We can optimize this by adding support for `setIndexOfField` in Store * (See https://github.com/latticexyz/mud/issues/444) * - * Note: if a table with composite keys is used, only the first key is indexed + * Note: if a table with composite keys is used, only the first key of the tuple is indexed */ contract KeysWithValueHook is StoreHook { using ArrayLib for bytes32[]; @@ -31,25 +31,25 @@ contract KeysWithValueHook is StoreHook { function onBeforeSetRecord( bytes32 sourceTableId, - bytes32[] memory key, + bytes32[] memory keyTuple, bytes memory data, FieldLayout fieldLayout ) public { bytes32 targetTableId = getTargetTableSelector(MODULE_NAMESPACE, sourceTableId); // Get the previous value - bytes32 previousValue = keccak256(_world().getRecord(sourceTableId, key, fieldLayout)); + bytes32 previousValue = keccak256(_world().getRecord(sourceTableId, keyTuple, fieldLayout)); // Remove the key from the list of keys with the previous value - _removeKeyFromList(targetTableId, key[0], previousValue); + _removeKeyFromList(targetTableId, keyTuple[0], previousValue); // Push the key to the list of keys with the new value - KeysWithValue.push(targetTableId, keccak256(data), key[0]); + KeysWithValue.push(targetTableId, keccak256(data), keyTuple[0]); } function onAfterSetRecord( bytes32 sourceTableId, - bytes32[] memory key, + bytes32[] memory keyTuple, bytes memory data, FieldLayout fieldLayout ) public { @@ -58,38 +58,38 @@ contract KeysWithValueHook is StoreHook { function onBeforeSetField( bytes32 sourceTableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8, bytes memory, FieldLayout fieldLayout ) public { // Remove the key from the list of keys with the previous value - bytes32 previousValue = keccak256(_world().getRecord(sourceTableId, key, fieldLayout)); + bytes32 previousValue = keccak256(_world().getRecord(sourceTableId, keyTuple, fieldLayout)); bytes32 targetTableId = getTargetTableSelector(MODULE_NAMESPACE, sourceTableId); - _removeKeyFromList(targetTableId, key[0], previousValue); + _removeKeyFromList(targetTableId, keyTuple[0], previousValue); } function onAfterSetField( bytes32 sourceTableId, - bytes32[] memory key, + bytes32[] memory keyTuple, uint8, bytes memory, FieldLayout fieldLayout ) public { // Add the key to the list of keys with the new value - bytes32 newValue = keccak256(_world().getRecord(sourceTableId, key, fieldLayout)); + bytes32 newValue = keccak256(_world().getRecord(sourceTableId, keyTuple, fieldLayout)); bytes32 targetTableId = getTargetTableSelector(MODULE_NAMESPACE, sourceTableId); - KeysWithValue.push(targetTableId, newValue, key[0]); + KeysWithValue.push(targetTableId, newValue, keyTuple[0]); } - function onBeforeDeleteRecord(bytes32 sourceTableId, bytes32[] memory key, FieldLayout fieldLayout) public { + function onBeforeDeleteRecord(bytes32 sourceTableId, bytes32[] memory keyTuple, FieldLayout fieldLayout) public { // Remove the key from the list of keys with the previous value - bytes32 previousValue = keccak256(_world().getRecord(sourceTableId, key, fieldLayout)); + bytes32 previousValue = keccak256(_world().getRecord(sourceTableId, keyTuple, fieldLayout)); bytes32 targetTableId = getTargetTableSelector(MODULE_NAMESPACE, sourceTableId); - _removeKeyFromList(targetTableId, key[0], previousValue); + _removeKeyFromList(targetTableId, keyTuple[0], previousValue); } - function onAfterDeleteRecord(bytes32 sourceTableId, bytes32[] memory key, FieldLayout fieldLayout) public { + function onAfterDeleteRecord(bytes32 sourceTableId, bytes32[] memory keyTuple, FieldLayout fieldLayout) public { // NOOP } diff --git a/packages/world/test/World.t.sol b/packages/world/test/World.t.sol index 640782c591..1d6e8a2b85 100644 --- a/packages/world/test/World.t.sol +++ b/packages/world/test/World.t.sol @@ -86,14 +86,14 @@ contract WorldTestSystem is System { } function writeData(bytes16 namespace, bytes16 name, bool data) public { - bytes32[] memory key = new bytes32[](0); + bytes32[] memory keyTuple = new bytes32[](0); bytes32 tableId = ResourceSelector.from(namespace, name); FieldLayout fieldLayout = StoreSwitch.getFieldLayout(tableId); if (StoreSwitch.getStoreAddress() == address(this)) { - StoreCore.setRecord(tableId, key, abi.encodePacked(data), fieldLayout); + StoreCore.setRecord(tableId, keyTuple, abi.encodePacked(data), fieldLayout); } else { - IBaseWorld(msg.sender).setRecord(tableId, key, abi.encodePacked(data), fieldLayout); + IBaseWorld(msg.sender).setRecord(tableId, keyTuple, abi.encodePacked(data), fieldLayout); } } diff --git a/packages/world/test/query.t.sol b/packages/world/test/query.t.sol index 4c4feb2176..0d7b3b63f8 100644 --- a/packages/world/test/query.t.sol +++ b/packages/world/test/query.t.sol @@ -297,9 +297,9 @@ contract QueryTest is Test, GasReporter { _installKeysInTableModule(); for (uint256 i; i < 100; i++) { - bytes32[] memory key = new bytes32[](1); - key[0] = bytes32(i); - world.setRecord(table1, key, abi.encode(1), tableFieldLayout); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32(i); + world.setRecord(table1, keyTuple, abi.encode(1), tableFieldLayout); } world.setRecord(table2, key1, abi.encode(0), tableFieldLayout); @@ -318,9 +318,9 @@ contract QueryTest is Test, GasReporter { _installKeysInTableModule(); for (uint256 i; i < 1000; i++) { - bytes32[] memory key = new bytes32[](1); - key[0] = bytes32(i); - world.setRecord(table1, key, abi.encode(1), tableFieldLayout); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32(i); + world.setRecord(table1, keyTuple, abi.encode(1), tableFieldLayout); } world.setRecord(table2, key1, abi.encode(0), tableFieldLayout); From e4c289226cda7d73befa95f6722b1f5252b1777f Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 21:49:06 +0100 Subject: [PATCH 17/28] remove abi --- .../EchoSubscriber.abi.json | 202 --- .../EchoSubscriber.abi.json.d.ts | 203 --- packages/store/abi/IStore.sol/IStore.abi.json | 717 ---------- .../store/abi/IStore.sol/IStore.abi.json.d.ts | 718 ---------- .../store/abi/IStore.sol/IStoreData.abi.json | 463 ------- .../abi/IStore.sol/IStoreData.abi.json.d.ts | 464 ------- .../abi/IStore.sol/IStoreEphemeral.abi.json | 55 - .../IStore.sol/IStoreEphemeral.abi.json.d.ts | 56 - .../store/abi/IStore.sol/IStoreRead.abi.json | 200 --- .../abi/IStore.sol/IStoreRead.abi.json.d.ts | 201 --- .../store/abi/IStore.sol/IStoreWrite.abi.json | 265 ---- .../abi/IStore.sol/IStoreWrite.abi.json.d.ts | 266 ---- .../abi/IStoreHook.sol/IStoreHook.abi.json | 189 --- .../IStoreHook.sol/IStoreHook.abi.json.d.ts | 190 --- .../MirrorSubscriber.abi.json | 294 ---- .../MirrorSubscriber.abi.json.d.ts | 295 ---- .../abi/StoreCore.sol/StoreCore.abi.json | 102 -- .../abi/StoreCore.sol/StoreCore.abi.json.d.ts | 103 -- .../abi/StoreHook.sol/StoreHook.abi.json | 189 --- .../abi/StoreHook.sol/StoreHook.abi.json.d.ts | 190 --- .../abi/StoreMock.sol/StoreMock.abi.json | 791 ----------- .../abi/StoreMock.sol/StoreMock.abi.json.d.ts | 792 ----------- .../abi/StoreRead.sol/StoreRead.abi.json | 242 ---- .../abi/StoreRead.sol/StoreRead.abi.json.d.ts | 243 ---- .../abi/CoreSystem.sol/CoreSystem.abi.json | 757 ---------- .../CoreSystem.sol/CoreSystem.abi.json.d.ts | 758 ---------- .../EphemeralRecordSystem.abi.json | 166 --- .../EphemeralRecordSystem.abi.json.d.ts | 167 --- .../abi/IBaseWorld.sol/IBaseWorld.abi.json | 1231 ---------------- .../IBaseWorld.sol/IBaseWorld.abi.json.d.ts | 1232 ----------------- packages/world/abi/IStore.sol/IStore.abi.json | 717 ---------- .../world/abi/IStore.sol/IStore.abi.json.d.ts | 718 ---------- .../world/abi/IStore.sol/IStoreData.abi.json | 463 ------- .../abi/IStore.sol/IStoreData.abi.json.d.ts | 464 ------- .../abi/IStore.sol/IStoreEphemeral.abi.json | 55 - .../IStore.sol/IStoreEphemeral.abi.json.d.ts | 56 - .../world/abi/IStore.sol/IStoreRead.abi.json | 200 --- .../abi/IStore.sol/IStoreRead.abi.json.d.ts | 201 --- .../world/abi/IStore.sol/IStoreWrite.abi.json | 265 ---- .../abi/IStore.sol/IStoreWrite.abi.json.d.ts | 266 ---- .../abi/IStoreHook.sol/IStoreHook.abi.json | 189 --- .../IStoreHook.sol/IStoreHook.abi.json.d.ts | 190 --- .../KeysInTableHook.abi.json | 279 ---- .../KeysInTableHook.abi.json.d.ts | 280 ---- .../KeysWithValueHook.abi.json | 263 ---- .../KeysWithValueHook.abi.json.d.ts | 264 ---- .../abi/StoreCore.sol/StoreCore.abi.json | 102 -- .../abi/StoreCore.sol/StoreCore.abi.json.d.ts | 103 -- .../abi/StoreHook.sol/StoreHook.abi.json | 189 --- .../abi/StoreHook.sol/StoreHook.abi.json.d.ts | 190 --- .../abi/StoreRead.sol/StoreRead.abi.json | 242 ---- .../abi/StoreRead.sol/StoreRead.abi.json.d.ts | 243 ---- packages/world/abi/World.sol/World.abi.json | 820 ----------- .../world/abi/World.sol/World.abi.json.d.ts | 821 ----------- .../world/abi/src/IStore.sol/IStore.abi.json | 717 ---------- .../abi/src/IStore.sol/IStore.abi.json.d.ts | 718 ---------- .../abi/src/IStore.sol/IStoreData.abi.json | 463 ------- .../src/IStore.sol/IStoreData.abi.json.d.ts | 464 ------- .../src/IStore.sol/IStoreEphemeral.abi.json | 55 - .../IStore.sol/IStoreEphemeral.abi.json.d.ts | 56 - .../abi/src/IStore.sol/IStoreRead.abi.json | 200 --- .../src/IStore.sol/IStoreRead.abi.json.d.ts | 201 --- .../abi/src/IStore.sol/IStoreWrite.abi.json | 265 ---- .../src/IStore.sol/IStoreWrite.abi.json.d.ts | 266 ---- .../src/IStoreHook.sol/IStoreHook.abi.json | 189 --- .../IStoreHook.sol/IStoreHook.abi.json.d.ts | 190 --- .../abi/src/StoreCore.sol/StoreCore.abi.json | 102 -- .../src/StoreCore.sol/StoreCore.abi.json.d.ts | 103 -- .../abi/src/StoreHook.sol/StoreHook.abi.json | 189 --- .../src/StoreHook.sol/StoreHook.abi.json.d.ts | 190 --- 70 files changed, 23689 deletions(-) delete mode 100644 packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json delete mode 100644 packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json.d.ts delete mode 100644 packages/store/abi/IStore.sol/IStore.abi.json delete mode 100644 packages/store/abi/IStore.sol/IStore.abi.json.d.ts delete mode 100644 packages/store/abi/IStore.sol/IStoreData.abi.json delete mode 100644 packages/store/abi/IStore.sol/IStoreData.abi.json.d.ts delete mode 100644 packages/store/abi/IStore.sol/IStoreEphemeral.abi.json delete mode 100644 packages/store/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts delete mode 100644 packages/store/abi/IStore.sol/IStoreRead.abi.json delete mode 100644 packages/store/abi/IStore.sol/IStoreRead.abi.json.d.ts delete mode 100644 packages/store/abi/IStore.sol/IStoreWrite.abi.json delete mode 100644 packages/store/abi/IStore.sol/IStoreWrite.abi.json.d.ts delete mode 100644 packages/store/abi/IStoreHook.sol/IStoreHook.abi.json delete mode 100644 packages/store/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts delete mode 100644 packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json delete mode 100644 packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json.d.ts delete mode 100644 packages/store/abi/StoreCore.sol/StoreCore.abi.json delete mode 100644 packages/store/abi/StoreCore.sol/StoreCore.abi.json.d.ts delete mode 100644 packages/store/abi/StoreHook.sol/StoreHook.abi.json delete mode 100644 packages/store/abi/StoreHook.sol/StoreHook.abi.json.d.ts delete mode 100644 packages/store/abi/StoreMock.sol/StoreMock.abi.json delete mode 100644 packages/store/abi/StoreMock.sol/StoreMock.abi.json.d.ts delete mode 100644 packages/store/abi/StoreRead.sol/StoreRead.abi.json delete mode 100644 packages/store/abi/StoreRead.sol/StoreRead.abi.json.d.ts delete mode 100644 packages/world/abi/CoreSystem.sol/CoreSystem.abi.json delete mode 100644 packages/world/abi/CoreSystem.sol/CoreSystem.abi.json.d.ts delete mode 100644 packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json delete mode 100644 packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json.d.ts delete mode 100644 packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json delete mode 100644 packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json.d.ts delete mode 100644 packages/world/abi/IStore.sol/IStore.abi.json delete mode 100644 packages/world/abi/IStore.sol/IStore.abi.json.d.ts delete mode 100644 packages/world/abi/IStore.sol/IStoreData.abi.json delete mode 100644 packages/world/abi/IStore.sol/IStoreData.abi.json.d.ts delete mode 100644 packages/world/abi/IStore.sol/IStoreEphemeral.abi.json delete mode 100644 packages/world/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts delete mode 100644 packages/world/abi/IStore.sol/IStoreRead.abi.json delete mode 100644 packages/world/abi/IStore.sol/IStoreRead.abi.json.d.ts delete mode 100644 packages/world/abi/IStore.sol/IStoreWrite.abi.json delete mode 100644 packages/world/abi/IStore.sol/IStoreWrite.abi.json.d.ts delete mode 100644 packages/world/abi/IStoreHook.sol/IStoreHook.abi.json delete mode 100644 packages/world/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts delete mode 100644 packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json delete mode 100644 packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json.d.ts delete mode 100644 packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json delete mode 100644 packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json.d.ts delete mode 100644 packages/world/abi/StoreCore.sol/StoreCore.abi.json delete mode 100644 packages/world/abi/StoreCore.sol/StoreCore.abi.json.d.ts delete mode 100644 packages/world/abi/StoreHook.sol/StoreHook.abi.json delete mode 100644 packages/world/abi/StoreHook.sol/StoreHook.abi.json.d.ts delete mode 100644 packages/world/abi/StoreRead.sol/StoreRead.abi.json delete mode 100644 packages/world/abi/StoreRead.sol/StoreRead.abi.json.d.ts delete mode 100644 packages/world/abi/World.sol/World.abi.json delete mode 100644 packages/world/abi/World.sol/World.abi.json.d.ts delete mode 100644 packages/world/abi/src/IStore.sol/IStore.abi.json delete mode 100644 packages/world/abi/src/IStore.sol/IStore.abi.json.d.ts delete mode 100644 packages/world/abi/src/IStore.sol/IStoreData.abi.json delete mode 100644 packages/world/abi/src/IStore.sol/IStoreData.abi.json.d.ts delete mode 100644 packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json delete mode 100644 packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json.d.ts delete mode 100644 packages/world/abi/src/IStore.sol/IStoreRead.abi.json delete mode 100644 packages/world/abi/src/IStore.sol/IStoreRead.abi.json.d.ts delete mode 100644 packages/world/abi/src/IStore.sol/IStoreWrite.abi.json delete mode 100644 packages/world/abi/src/IStore.sol/IStoreWrite.abi.json.d.ts delete mode 100644 packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json delete mode 100644 packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json.d.ts delete mode 100644 packages/world/abi/src/StoreCore.sol/StoreCore.abi.json delete mode 100644 packages/world/abi/src/StoreCore.sol/StoreCore.abi.json.d.ts delete mode 100644 packages/world/abi/src/StoreHook.sol/StoreHook.abi.json delete mode 100644 packages/world/abi/src/StoreHook.sol/StoreHook.abi.json.d.ts diff --git a/packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json b/packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json deleted file mode 100644 index e63888908d..0000000000 --- a/packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json +++ /dev/null @@ -1,202 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "HookCalled", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json.d.ts b/packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json.d.ts deleted file mode 100644 index dacb0ff8c4..0000000000 --- a/packages/store/abi/EchoSubscriber.sol/EchoSubscriber.abi.json.d.ts +++ /dev/null @@ -1,203 +0,0 @@ -declare const abi: [ - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes"; - name: ""; - type: "bytes"; - } - ]; - name: "HookCalled"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - } - ]; - name: "supportsInterface"; - outputs: [ - { - internalType: "bool"; - name: ""; - type: "bool"; - } - ]; - stateMutability: "pure"; - type: "function"; - } -]; -export default abi; diff --git a/packages/store/abi/IStore.sol/IStore.abi.json b/packages/store/abi/IStore.sol/IStore.abi.json deleted file mode 100644 index 974e2e74fa..0000000000 --- a/packages/store/abi/IStore.sol/IStore.abi.json +++ /dev/null @@ -1,717 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_DataIndexOverflow", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidDataLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidFieldNamesLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidKeyNamesLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidValueSchemaLength", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotDynamicField", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotImplemented", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableAlreadyExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreEphemeralRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "deleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "emitEphemeralRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "byteLengthToPop", - "type": "uint256" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "popFromField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "dataToPush", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "pushToField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "contract IStoreHook", - "name": "hookAddress", - "type": "address" - }, - { - "internalType": "uint8", - "name": "enabledHooksBitmap", - "type": "uint8" - } - ], - "name": "registerStoreHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - }, - { - "internalType": "string[]", - "name": "keyNames", - "type": "string[]" - }, - { - "internalType": "string[]", - "name": "fieldNames", - "type": "string[]" - } - ], - "name": "registerTable", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "contract IStoreHook", - "name": "hookAddress", - "type": "address" - } - ], - "name": "unregisterStoreHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startByteIndex", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "dataToSet", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "updateInField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/store/abi/IStore.sol/IStore.abi.json.d.ts b/packages/store/abi/IStore.sol/IStore.abi.json.d.ts deleted file mode 100644 index e939bc04ed..0000000000 --- a/packages/store/abi/IStore.sol/IStore.abi.json.d.ts +++ /dev/null @@ -1,718 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_DataIndexOverflow"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidDataLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidFieldNamesLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidKeyNamesLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidValueSchemaLength"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotDynamicField"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotImplemented"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableAlreadyExists"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableNotFound"; - type: "error"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreEphemeralRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "deleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "emitEphemeralRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "byteLengthToPop"; - type: "uint256"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "popFromField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "dataToPush"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "pushToField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "contract IStoreHook"; - name: "hookAddress"; - type: "address"; - }, - { - internalType: "uint8"; - name: "enabledHooksBitmap"; - type: "uint8"; - } - ]; - name: "registerStoreHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - }, - { - internalType: "string[]"; - name: "keyNames"; - type: "string[]"; - }, - { - internalType: "string[]"; - name: "fieldNames"; - type: "string[]"; - } - ]; - name: "registerTable"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "contract IStoreHook"; - name: "hookAddress"; - type: "address"; - } - ]; - name: "unregisterStoreHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "startByteIndex"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "dataToSet"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "updateInField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/store/abi/IStore.sol/IStoreData.abi.json b/packages/store/abi/IStore.sol/IStoreData.abi.json deleted file mode 100644 index f6db946f1c..0000000000 --- a/packages/store/abi/IStore.sol/IStoreData.abi.json +++ /dev/null @@ -1,463 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "deleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "byteLengthToPop", - "type": "uint256" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "popFromField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "dataToPush", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "pushToField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startByteIndex", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "dataToSet", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "updateInField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/store/abi/IStore.sol/IStoreData.abi.json.d.ts b/packages/store/abi/IStore.sol/IStoreData.abi.json.d.ts deleted file mode 100644 index 077b246517..0000000000 --- a/packages/store/abi/IStore.sol/IStoreData.abi.json.d.ts +++ /dev/null @@ -1,464 +0,0 @@ -declare const abi: [ - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "deleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "byteLengthToPop"; - type: "uint256"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "popFromField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "dataToPush"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "pushToField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "startByteIndex"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "dataToSet"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "updateInField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/store/abi/IStore.sol/IStoreEphemeral.abi.json b/packages/store/abi/IStore.sol/IStoreEphemeral.abi.json deleted file mode 100644 index f591aa2757..0000000000 --- a/packages/store/abi/IStore.sol/IStoreEphemeral.abi.json +++ /dev/null @@ -1,55 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreEphemeralRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "emitEphemeralRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/store/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts b/packages/store/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts deleted file mode 100644 index 9b9186d587..0000000000 --- a/packages/store/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -declare const abi: [ - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreEphemeralRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "emitEphemeralRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/store/abi/IStore.sol/IStoreRead.abi.json b/packages/store/abi/IStore.sol/IStoreRead.abi.json deleted file mode 100644 index 5fb8e1bc53..0000000000 --- a/packages/store/abi/IStore.sol/IStoreRead.abi.json +++ /dev/null @@ -1,200 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/store/abi/IStore.sol/IStoreRead.abi.json.d.ts b/packages/store/abi/IStore.sol/IStoreRead.abi.json.d.ts deleted file mode 100644 index 9ca275d41b..0000000000 --- a/packages/store/abi/IStore.sol/IStoreRead.abi.json.d.ts +++ /dev/null @@ -1,201 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - } -]; -export default abi; diff --git a/packages/store/abi/IStore.sol/IStoreWrite.abi.json b/packages/store/abi/IStore.sol/IStoreWrite.abi.json deleted file mode 100644 index 352fb8196a..0000000000 --- a/packages/store/abi/IStore.sol/IStoreWrite.abi.json +++ /dev/null @@ -1,265 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "deleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "byteLengthToPop", - "type": "uint256" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "popFromField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "dataToPush", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "pushToField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startByteIndex", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "dataToSet", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "updateInField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/store/abi/IStore.sol/IStoreWrite.abi.json.d.ts b/packages/store/abi/IStore.sol/IStoreWrite.abi.json.d.ts deleted file mode 100644 index 04ce5d76ab..0000000000 --- a/packages/store/abi/IStore.sol/IStoreWrite.abi.json.d.ts +++ /dev/null @@ -1,266 +0,0 @@ -declare const abi: [ - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "deleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "byteLengthToPop"; - type: "uint256"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "popFromField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "dataToPush"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "pushToField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "startByteIndex"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "dataToSet"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "updateInField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/store/abi/IStoreHook.sol/IStoreHook.abi.json b/packages/store/abi/IStoreHook.sol/IStoreHook.abi.json deleted file mode 100644 index 9782a97c93..0000000000 --- a/packages/store/abi/IStoreHook.sol/IStoreHook.abi.json +++ /dev/null @@ -1,189 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceID", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/store/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts b/packages/store/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts deleted file mode 100644 index d3e9224ef8..0000000000 --- a/packages/store/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts +++ /dev/null @@ -1,190 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "interfaceID"; - type: "bytes4"; - } - ]; - name: "supportsInterface"; - outputs: [ - { - internalType: "bool"; - name: ""; - type: "bool"; - } - ]; - stateMutability: "view"; - type: "function"; - } -]; -export default abi; diff --git a/packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json b/packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json deleted file mode 100644 index 750e79f3bb..0000000000 --- a/packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json +++ /dev/null @@ -1,294 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - }, - { - "internalType": "string[]", - "name": "keyNames", - "type": "string[]" - }, - { - "internalType": "string[]", - "name": "fieldNames", - "type": "string[]" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "FieldLayoutLib_InvalidLength", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthIsZero", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "PackedCounter_InvalidLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "Slice_OutOfBounds", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidDataLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "", - "type": "bytes32" - } - ], - "name": "onAfterSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json.d.ts b/packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json.d.ts deleted file mode 100644 index 6bd3d612aa..0000000000 --- a/packages/store/abi/MirrorSubscriber.sol/MirrorSubscriber.abi.json.d.ts +++ /dev/null @@ -1,295 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - }, - { - internalType: "string[]"; - name: "keyNames"; - type: "string[]"; - }, - { - internalType: "string[]"; - name: "fieldNames"; - type: "string[]"; - } - ]; - stateMutability: "nonpayable"; - type: "constructor"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "FieldLayoutLib_InvalidLength"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthIsZero"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "PackedCounter_InvalidLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "Slice_OutOfBounds"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidDataLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: ""; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: ""; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: ""; - type: "uint8"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: ""; - type: "bytes32"; - } - ]; - name: "onAfterSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - } - ]; - name: "supportsInterface"; - outputs: [ - { - internalType: "bool"; - name: ""; - type: "bool"; - } - ]; - stateMutability: "pure"; - type: "function"; - } -]; -export default abi; diff --git a/packages/store/abi/StoreCore.sol/StoreCore.abi.json b/packages/store/abi/StoreCore.sol/StoreCore.abi.json deleted file mode 100644 index 3808909d9a..0000000000 --- a/packages/store/abi/StoreCore.sol/StoreCore.abi.json +++ /dev/null @@ -1,102 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreEphemeralRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "fieldIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - } -] \ No newline at end of file diff --git a/packages/store/abi/StoreCore.sol/StoreCore.abi.json.d.ts b/packages/store/abi/StoreCore.sol/StoreCore.abi.json.d.ts deleted file mode 100644 index fa9de440d1..0000000000 --- a/packages/store/abi/StoreCore.sol/StoreCore.abi.json.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -declare const abi: [ - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreEphemeralRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "fieldIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - } -]; -export default abi; diff --git a/packages/store/abi/StoreHook.sol/StoreHook.abi.json b/packages/store/abi/StoreHook.sol/StoreHook.abi.json deleted file mode 100644 index 59ef8376aa..0000000000 --- a/packages/store/abi/StoreHook.sol/StoreHook.abi.json +++ /dev/null @@ -1,189 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/store/abi/StoreHook.sol/StoreHook.abi.json.d.ts b/packages/store/abi/StoreHook.sol/StoreHook.abi.json.d.ts deleted file mode 100644 index 4091c781ed..0000000000 --- a/packages/store/abi/StoreHook.sol/StoreHook.abi.json.d.ts +++ /dev/null @@ -1,190 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - } - ]; - name: "supportsInterface"; - outputs: [ - { - internalType: "bool"; - name: ""; - type: "bool"; - } - ]; - stateMutability: "pure"; - type: "function"; - } -]; -export default abi; diff --git a/packages/store/abi/StoreMock.sol/StoreMock.abi.json b/packages/store/abi/StoreMock.sol/StoreMock.abi.json deleted file mode 100644 index 7cd7dccb82..0000000000 --- a/packages/store/abi/StoreMock.sol/StoreMock.abi.json +++ /dev/null @@ -1,791 +0,0 @@ -[ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "FieldLayoutLib_InvalidLength", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthIsZero", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "PackedCounter_InvalidLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "SchemaLib_InvalidLength", - "type": "error" - }, - { - "inputs": [], - "name": "SchemaLib_StaticTypeAfterDynamicType", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "Slice_OutOfBounds", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_DataIndexOverflow", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidDataLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidFieldNamesLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidKeyNamesLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidValueSchemaLength", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotDynamicField", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotImplemented", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableAlreadyExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreEphemeralRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "deleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "emitEphemeralRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "byteLengthToPop", - "type": "uint256" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "popFromField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "dataToPush", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "pushToField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "contract IStoreHook", - "name": "hookAddress", - "type": "address" - }, - { - "internalType": "uint8", - "name": "enabledHooksBitmap", - "type": "uint8" - } - ], - "name": "registerStoreHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - }, - { - "internalType": "string[]", - "name": "keyNames", - "type": "string[]" - }, - { - "internalType": "string[]", - "name": "fieldNames", - "type": "string[]" - } - ], - "name": "registerTable", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "contract IStoreHook", - "name": "hookAddress", - "type": "address" - } - ], - "name": "unregisterStoreHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startByteIndex", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "dataToSet", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "updateInField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/store/abi/StoreMock.sol/StoreMock.abi.json.d.ts b/packages/store/abi/StoreMock.sol/StoreMock.abi.json.d.ts deleted file mode 100644 index 0f24437cb3..0000000000 --- a/packages/store/abi/StoreMock.sol/StoreMock.abi.json.d.ts +++ /dev/null @@ -1,792 +0,0 @@ -declare const abi: [ - { - inputs: []; - stateMutability: "nonpayable"; - type: "constructor"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "FieldLayoutLib_InvalidLength"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthIsZero"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "PackedCounter_InvalidLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "SchemaLib_InvalidLength"; - type: "error"; - }, - { - inputs: []; - name: "SchemaLib_StaticTypeAfterDynamicType"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "Slice_OutOfBounds"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_DataIndexOverflow"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidDataLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidFieldNamesLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidKeyNamesLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidValueSchemaLength"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotDynamicField"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotImplemented"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableAlreadyExists"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableNotFound"; - type: "error"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreEphemeralRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "deleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "emitEphemeralRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "byteLengthToPop"; - type: "uint256"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "popFromField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "dataToPush"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "pushToField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "contract IStoreHook"; - name: "hookAddress"; - type: "address"; - }, - { - internalType: "uint8"; - name: "enabledHooksBitmap"; - type: "uint8"; - } - ]; - name: "registerStoreHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - }, - { - internalType: "string[]"; - name: "keyNames"; - type: "string[]"; - }, - { - internalType: "string[]"; - name: "fieldNames"; - type: "string[]"; - } - ]; - name: "registerTable"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "contract IStoreHook"; - name: "hookAddress"; - type: "address"; - } - ]; - name: "unregisterStoreHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "startByteIndex"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "dataToSet"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "updateInField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/store/abi/StoreRead.sol/StoreRead.abi.json b/packages/store/abi/StoreRead.sol/StoreRead.abi.json deleted file mode 100644 index 7ac3c66a02..0000000000 --- a/packages/store/abi/StoreRead.sol/StoreRead.abi.json +++ /dev/null @@ -1,242 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "FieldLayoutLib_InvalidLength", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthIsZero", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotDynamicField", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/store/abi/StoreRead.sol/StoreRead.abi.json.d.ts b/packages/store/abi/StoreRead.sol/StoreRead.abi.json.d.ts deleted file mode 100644 index 8a28178333..0000000000 --- a/packages/store/abi/StoreRead.sol/StoreRead.abi.json.d.ts +++ /dev/null @@ -1,243 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "FieldLayoutLib_InvalidLength"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthIsZero"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotDynamicField"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableNotFound"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json b/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json deleted file mode 100644 index b0b3c7ceed..0000000000 --- a/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json +++ /dev/null @@ -1,757 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "string", - "name": "resource", - "type": "string" - }, - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "DelegationNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "FieldLayoutLib_InvalidLength", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthIsZero", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "functionSelector", - "type": "bytes4" - } - ], - "name": "FunctionSelectorExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "functionSelector", - "type": "bytes4" - } - ], - "name": "FunctionSelectorNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "InsufficientBalance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contractAddress", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "InterfaceNotSupported", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "resource", - "type": "string" - } - ], - "name": "InvalidSelector", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "PackedCounter_InvalidLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "resource", - "type": "string" - } - ], - "name": "ResourceExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "resource", - "type": "string" - } - ], - "name": "ResourceNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "SchemaLib_InvalidLength", - "type": "error" - }, - { - "inputs": [], - "name": "SchemaLib_StaticTypeAfterDynamicType", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "Slice_OutOfBounds", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidDataLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidFieldNamesLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidKeyNamesLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidValueSchemaLength", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotDynamicField", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableAlreadyExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "system", - "type": "address" - } - ], - "name": "SystemExists", - "type": "error" - }, - { - "inputs": [], - "name": "WorldAlreadyInitialized", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreEphemeralRecord", - "type": "event" - }, - { - "inputs": [], - "name": "_msgSender", - "outputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_msgValue", - "outputs": [ - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "_world", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "emitEphemeralRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "grantee", - "type": "address" - } - ], - "name": "grantAccess", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IModule", - "name": "module", - "type": "address" - }, - { - "internalType": "bytes", - "name": "args", - "type": "bytes" - } - ], - "name": "installModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "delegationControlId", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "initFuncSelectorAndArgs", - "type": "bytes" - } - ], - "name": "registerDelegation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "systemFunctionName", - "type": "string" - }, - { - "internalType": "string", - "name": "systemFunctionArguments", - "type": "string" - } - ], - "name": "registerFunctionSelector", - "outputs": [ - { - "internalType": "bytes4", - "name": "worldFunctionSelector", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes16", - "name": "namespace", - "type": "bytes16" - } - ], - "name": "registerNamespace", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "bytes4", - "name": "worldFunctionSelector", - "type": "bytes4" - }, - { - "internalType": "bytes4", - "name": "systemFunctionSelector", - "type": "bytes4" - } - ], - "name": "registerRootFunctionSelector", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "contract IStoreHook", - "name": "hookAddress", - "type": "address" - }, - { - "internalType": "uint8", - "name": "enabledHooksBitmap", - "type": "uint8" - } - ], - "name": "registerStoreHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "contract WorldContextConsumer", - "name": "system", - "type": "address" - }, - { - "internalType": "bool", - "name": "publicAccess", - "type": "bool" - } - ], - "name": "registerSystem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "contract ISystemHook", - "name": "hookAddress", - "type": "address" - }, - { - "internalType": "uint8", - "name": "enabledHooksBitmap", - "type": "uint8" - } - ], - "name": "registerSystemHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - }, - { - "internalType": "string[]", - "name": "keyNames", - "type": "string[]" - }, - { - "internalType": "string[]", - "name": "fieldNames", - "type": "string[]" - } - ], - "name": "registerTable", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "grantee", - "type": "address" - } - ], - "name": "revokeAccess", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes16", - "name": "fromNamespace", - "type": "bytes16" - }, - { - "internalType": "address", - "name": "toAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferBalanceToAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes16", - "name": "fromNamespace", - "type": "bytes16" - }, - { - "internalType": "bytes16", - "name": "toNamespace", - "type": "bytes16" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferBalanceToNamespace", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes16", - "name": "namespace", - "type": "bytes16" - }, - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "contract IStoreHook", - "name": "hookAddress", - "type": "address" - } - ], - "name": "unregisterStoreHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "contract ISystemHook", - "name": "hookAddress", - "type": "address" - } - ], - "name": "unregisterSystemHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json.d.ts b/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json.d.ts deleted file mode 100644 index a4e49e5b2c..0000000000 --- a/packages/world/abi/CoreSystem.sol/CoreSystem.abi.json.d.ts +++ /dev/null @@ -1,758 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "string"; - name: "resource"; - type: "string"; - }, - { - internalType: "address"; - name: "caller"; - type: "address"; - } - ]; - name: "AccessDenied"; - type: "error"; - }, - { - inputs: [ - { - internalType: "address"; - name: "delegator"; - type: "address"; - }, - { - internalType: "address"; - name: "delegatee"; - type: "address"; - } - ]; - name: "DelegationNotFound"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "FieldLayoutLib_InvalidLength"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthIsZero"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "functionSelector"; - type: "bytes4"; - } - ]; - name: "FunctionSelectorExists"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "functionSelector"; - type: "bytes4"; - } - ]; - name: "FunctionSelectorNotFound"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "balance"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - } - ]; - name: "InsufficientBalance"; - type: "error"; - }, - { - inputs: [ - { - internalType: "address"; - name: "contractAddress"; - type: "address"; - }, - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - } - ]; - name: "InterfaceNotSupported"; - type: "error"; - }, - { - inputs: [ - { - internalType: "string"; - name: "resource"; - type: "string"; - } - ]; - name: "InvalidSelector"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "PackedCounter_InvalidLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "string"; - name: "resource"; - type: "string"; - } - ]; - name: "ResourceExists"; - type: "error"; - }, - { - inputs: [ - { - internalType: "string"; - name: "resource"; - type: "string"; - } - ]; - name: "ResourceNotFound"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "SchemaLib_InvalidLength"; - type: "error"; - }, - { - inputs: []; - name: "SchemaLib_StaticTypeAfterDynamicType"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "Slice_OutOfBounds"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidDataLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidFieldNamesLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidKeyNamesLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidValueSchemaLength"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotDynamicField"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableAlreadyExists"; - type: "error"; - }, - { - inputs: [ - { - internalType: "address"; - name: "system"; - type: "address"; - } - ]; - name: "SystemExists"; - type: "error"; - }, - { - inputs: []; - name: "WorldAlreadyInitialized"; - type: "error"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreEphemeralRecord"; - type: "event"; - }, - { - inputs: []; - name: "_msgSender"; - outputs: [ - { - internalType: "address"; - name: "sender"; - type: "address"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: []; - name: "_msgValue"; - outputs: [ - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - } - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: []; - name: "_world"; - outputs: [ - { - internalType: "address"; - name: ""; - type: "address"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "emitEphemeralRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "address"; - name: "grantee"; - type: "address"; - } - ]; - name: "grantAccess"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "contract IModule"; - name: "module"; - type: "address"; - }, - { - internalType: "bytes"; - name: "args"; - type: "bytes"; - } - ]; - name: "installModule"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "address"; - name: "delegatee"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "delegationControlId"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "initFuncSelectorAndArgs"; - type: "bytes"; - } - ]; - name: "registerDelegation"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "systemFunctionName"; - type: "string"; - }, - { - internalType: "string"; - name: "systemFunctionArguments"; - type: "string"; - } - ]; - name: "registerFunctionSelector"; - outputs: [ - { - internalType: "bytes4"; - name: "worldFunctionSelector"; - type: "bytes4"; - } - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes16"; - name: "namespace"; - type: "bytes16"; - } - ]; - name: "registerNamespace"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "bytes4"; - name: "worldFunctionSelector"; - type: "bytes4"; - }, - { - internalType: "bytes4"; - name: "systemFunctionSelector"; - type: "bytes4"; - } - ]; - name: "registerRootFunctionSelector"; - outputs: [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - } - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "contract IStoreHook"; - name: "hookAddress"; - type: "address"; - }, - { - internalType: "uint8"; - name: "enabledHooksBitmap"; - type: "uint8"; - } - ]; - name: "registerStoreHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "contract WorldContextConsumer"; - name: "system"; - type: "address"; - }, - { - internalType: "bool"; - name: "publicAccess"; - type: "bool"; - } - ]; - name: "registerSystem"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "contract ISystemHook"; - name: "hookAddress"; - type: "address"; - }, - { - internalType: "uint8"; - name: "enabledHooksBitmap"; - type: "uint8"; - } - ]; - name: "registerSystemHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - }, - { - internalType: "string[]"; - name: "keyNames"; - type: "string[]"; - }, - { - internalType: "string[]"; - name: "fieldNames"; - type: "string[]"; - } - ]; - name: "registerTable"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "address"; - name: "grantee"; - type: "address"; - } - ]; - name: "revokeAccess"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - } - ]; - name: "supportsInterface"; - outputs: [ - { - internalType: "bool"; - name: ""; - type: "bool"; - } - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes16"; - name: "fromNamespace"; - type: "bytes16"; - }, - { - internalType: "address"; - name: "toAddress"; - type: "address"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - } - ]; - name: "transferBalanceToAddress"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes16"; - name: "fromNamespace"; - type: "bytes16"; - }, - { - internalType: "bytes16"; - name: "toNamespace"; - type: "bytes16"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - } - ]; - name: "transferBalanceToNamespace"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes16"; - name: "namespace"; - type: "bytes16"; - }, - { - internalType: "address"; - name: "newOwner"; - type: "address"; - } - ]; - name: "transferOwnership"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "contract IStoreHook"; - name: "hookAddress"; - type: "address"; - } - ]; - name: "unregisterStoreHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "contract ISystemHook"; - name: "hookAddress"; - type: "address"; - } - ]; - name: "unregisterSystemHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json b/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json deleted file mode 100644 index 367398d105..0000000000 --- a/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json +++ /dev/null @@ -1,166 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "string", - "name": "resource", - "type": "string" - }, - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "FieldLayoutLib_InvalidLength", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthIsZero", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidDataLength", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreEphemeralRecord", - "type": "event" - }, - { - "inputs": [], - "name": "_msgSender", - "outputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_msgValue", - "outputs": [ - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "_world", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "emitEphemeralRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json.d.ts b/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json.d.ts deleted file mode 100644 index 4e436b91de..0000000000 --- a/packages/world/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.abi.json.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "string"; - name: "resource"; - type: "string"; - }, - { - internalType: "address"; - name: "caller"; - type: "address"; - } - ]; - name: "AccessDenied"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "FieldLayoutLib_InvalidLength"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthIsZero"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidDataLength"; - type: "error"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreEphemeralRecord"; - type: "event"; - }, - { - inputs: []; - name: "_msgSender"; - outputs: [ - { - internalType: "address"; - name: "sender"; - type: "address"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: []; - name: "_msgValue"; - outputs: [ - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - } - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: []; - name: "_world"; - outputs: [ - { - internalType: "address"; - name: ""; - type: "address"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "emitEphemeralRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - } - ]; - name: "supportsInterface"; - outputs: [ - { - internalType: "bool"; - name: ""; - type: "bool"; - } - ]; - stateMutability: "pure"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json b/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json deleted file mode 100644 index f7915c9a9f..0000000000 --- a/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json +++ /dev/null @@ -1,1231 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "string", - "name": "resource", - "type": "string" - }, - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "DelegationNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "functionSelector", - "type": "bytes4" - } - ], - "name": "FunctionSelectorExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "functionSelector", - "type": "bytes4" - } - ], - "name": "FunctionSelectorNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "InsufficientBalance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contractAddress", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "InterfaceNotSupported", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "resource", - "type": "string" - } - ], - "name": "InvalidSelector", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "resource", - "type": "string" - } - ], - "name": "ResourceExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "resource", - "type": "string" - } - ], - "name": "ResourceNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_DataIndexOverflow", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidDataLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidFieldNamesLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidKeyNamesLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidValueSchemaLength", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotDynamicField", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotImplemented", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableAlreadyExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "system", - "type": "address" - } - ], - "name": "SystemExists", - "type": "error" - }, - { - "inputs": [], - "name": "WorldAlreadyInitialized", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "HelloWorld", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreEphemeralRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "funcSelectorAndArgs", - "type": "bytes" - } - ], - "name": "call", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "funcSelectorAndArgs", - "type": "bytes" - } - ], - "name": "callFrom", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "creator", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "deleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "emitEphemeralRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "grantee", - "type": "address" - } - ], - "name": "grantAccess", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IModule", - "name": "coreModule", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IModule", - "name": "module", - "type": "address" - }, - { - "internalType": "bytes", - "name": "args", - "type": "bytes" - } - ], - "name": "installModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IModule", - "name": "module", - "type": "address" - }, - { - "internalType": "bytes", - "name": "args", - "type": "bytes" - } - ], - "name": "installRootModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "byteLengthToPop", - "type": "uint256" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "popFromField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "dataToPush", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "pushToField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "delegationControlId", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "initFuncSelectorAndArgs", - "type": "bytes" - } - ], - "name": "registerDelegation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "systemFunctionName", - "type": "string" - }, - { - "internalType": "string", - "name": "systemFunctionArguments", - "type": "string" - } - ], - "name": "registerFunctionSelector", - "outputs": [ - { - "internalType": "bytes4", - "name": "worldFunctionSelector", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes16", - "name": "namespace", - "type": "bytes16" - } - ], - "name": "registerNamespace", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "bytes4", - "name": "worldFunctionSelector", - "type": "bytes4" - }, - { - "internalType": "bytes4", - "name": "systemFunctionSelector", - "type": "bytes4" - } - ], - "name": "registerRootFunctionSelector", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "contract IStoreHook", - "name": "hookAddress", - "type": "address" - }, - { - "internalType": "uint8", - "name": "enabledHooksBitmap", - "type": "uint8" - } - ], - "name": "registerStoreHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "contract WorldContextConsumer", - "name": "system", - "type": "address" - }, - { - "internalType": "bool", - "name": "publicAccess", - "type": "bool" - } - ], - "name": "registerSystem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "contract ISystemHook", - "name": "hookAddress", - "type": "address" - }, - { - "internalType": "uint8", - "name": "enabledHooksBitmap", - "type": "uint8" - } - ], - "name": "registerSystemHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - }, - { - "internalType": "string[]", - "name": "keyNames", - "type": "string[]" - }, - { - "internalType": "string[]", - "name": "fieldNames", - "type": "string[]" - } - ], - "name": "registerTable", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "grantee", - "type": "address" - } - ], - "name": "revokeAccess", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes16", - "name": "fromNamespace", - "type": "bytes16" - }, - { - "internalType": "address", - "name": "toAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferBalanceToAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes16", - "name": "fromNamespace", - "type": "bytes16" - }, - { - "internalType": "bytes16", - "name": "toNamespace", - "type": "bytes16" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferBalanceToNamespace", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes16", - "name": "namespace", - "type": "bytes16" - }, - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "contract IStoreHook", - "name": "hookAddress", - "type": "address" - } - ], - "name": "unregisterStoreHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "contract ISystemHook", - "name": "hookAddress", - "type": "address" - } - ], - "name": "unregisterSystemHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startByteIndex", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "dataToSet", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "updateInField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json.d.ts b/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json.d.ts deleted file mode 100644 index eebaf2c6b2..0000000000 --- a/packages/world/abi/IBaseWorld.sol/IBaseWorld.abi.json.d.ts +++ /dev/null @@ -1,1232 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "string"; - name: "resource"; - type: "string"; - }, - { - internalType: "address"; - name: "caller"; - type: "address"; - } - ]; - name: "AccessDenied"; - type: "error"; - }, - { - inputs: [ - { - internalType: "address"; - name: "delegator"; - type: "address"; - }, - { - internalType: "address"; - name: "delegatee"; - type: "address"; - } - ]; - name: "DelegationNotFound"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "functionSelector"; - type: "bytes4"; - } - ]; - name: "FunctionSelectorExists"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "functionSelector"; - type: "bytes4"; - } - ]; - name: "FunctionSelectorNotFound"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "balance"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - } - ]; - name: "InsufficientBalance"; - type: "error"; - }, - { - inputs: [ - { - internalType: "address"; - name: "contractAddress"; - type: "address"; - }, - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - } - ]; - name: "InterfaceNotSupported"; - type: "error"; - }, - { - inputs: [ - { - internalType: "string"; - name: "resource"; - type: "string"; - } - ]; - name: "InvalidSelector"; - type: "error"; - }, - { - inputs: [ - { - internalType: "string"; - name: "resource"; - type: "string"; - } - ]; - name: "ResourceExists"; - type: "error"; - }, - { - inputs: [ - { - internalType: "string"; - name: "resource"; - type: "string"; - } - ]; - name: "ResourceNotFound"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_DataIndexOverflow"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidDataLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidFieldNamesLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidKeyNamesLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidValueSchemaLength"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotDynamicField"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotImplemented"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableAlreadyExists"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableNotFound"; - type: "error"; - }, - { - inputs: [ - { - internalType: "address"; - name: "system"; - type: "address"; - } - ]; - name: "SystemExists"; - type: "error"; - }, - { - inputs: []; - name: "WorldAlreadyInitialized"; - type: "error"; - }, - { - anonymous: false; - inputs: []; - name: "HelloWorld"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreEphemeralRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "funcSelectorAndArgs"; - type: "bytes"; - } - ]; - name: "call"; - outputs: [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - } - ]; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "address"; - name: "delegator"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "funcSelectorAndArgs"; - type: "bytes"; - } - ]; - name: "callFrom"; - outputs: [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - } - ]; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: []; - name: "creator"; - outputs: [ - { - internalType: "address"; - name: ""; - type: "address"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "deleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "emitEphemeralRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "address"; - name: "grantee"; - type: "address"; - } - ]; - name: "grantAccess"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "contract IModule"; - name: "coreModule"; - type: "address"; - } - ]; - name: "initialize"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "contract IModule"; - name: "module"; - type: "address"; - }, - { - internalType: "bytes"; - name: "args"; - type: "bytes"; - } - ]; - name: "installModule"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "contract IModule"; - name: "module"; - type: "address"; - }, - { - internalType: "bytes"; - name: "args"; - type: "bytes"; - } - ]; - name: "installRootModule"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "byteLengthToPop"; - type: "uint256"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "popFromField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "dataToPush"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "pushToField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "address"; - name: "delegatee"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "delegationControlId"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "initFuncSelectorAndArgs"; - type: "bytes"; - } - ]; - name: "registerDelegation"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "systemFunctionName"; - type: "string"; - }, - { - internalType: "string"; - name: "systemFunctionArguments"; - type: "string"; - } - ]; - name: "registerFunctionSelector"; - outputs: [ - { - internalType: "bytes4"; - name: "worldFunctionSelector"; - type: "bytes4"; - } - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes16"; - name: "namespace"; - type: "bytes16"; - } - ]; - name: "registerNamespace"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "bytes4"; - name: "worldFunctionSelector"; - type: "bytes4"; - }, - { - internalType: "bytes4"; - name: "systemFunctionSelector"; - type: "bytes4"; - } - ]; - name: "registerRootFunctionSelector"; - outputs: [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - } - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "contract IStoreHook"; - name: "hookAddress"; - type: "address"; - }, - { - internalType: "uint8"; - name: "enabledHooksBitmap"; - type: "uint8"; - } - ]; - name: "registerStoreHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "contract WorldContextConsumer"; - name: "system"; - type: "address"; - }, - { - internalType: "bool"; - name: "publicAccess"; - type: "bool"; - } - ]; - name: "registerSystem"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "contract ISystemHook"; - name: "hookAddress"; - type: "address"; - }, - { - internalType: "uint8"; - name: "enabledHooksBitmap"; - type: "uint8"; - } - ]; - name: "registerSystemHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - }, - { - internalType: "string[]"; - name: "keyNames"; - type: "string[]"; - }, - { - internalType: "string[]"; - name: "fieldNames"; - type: "string[]"; - } - ]; - name: "registerTable"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "address"; - name: "grantee"; - type: "address"; - } - ]; - name: "revokeAccess"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes16"; - name: "fromNamespace"; - type: "bytes16"; - }, - { - internalType: "address"; - name: "toAddress"; - type: "address"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - } - ]; - name: "transferBalanceToAddress"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes16"; - name: "fromNamespace"; - type: "bytes16"; - }, - { - internalType: "bytes16"; - name: "toNamespace"; - type: "bytes16"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - } - ]; - name: "transferBalanceToNamespace"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes16"; - name: "namespace"; - type: "bytes16"; - }, - { - internalType: "address"; - name: "newOwner"; - type: "address"; - } - ]; - name: "transferOwnership"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "contract IStoreHook"; - name: "hookAddress"; - type: "address"; - } - ]; - name: "unregisterStoreHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "contract ISystemHook"; - name: "hookAddress"; - type: "address"; - } - ]; - name: "unregisterSystemHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "startByteIndex"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "dataToSet"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "updateInField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/IStore.sol/IStore.abi.json b/packages/world/abi/IStore.sol/IStore.abi.json deleted file mode 100644 index 974e2e74fa..0000000000 --- a/packages/world/abi/IStore.sol/IStore.abi.json +++ /dev/null @@ -1,717 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_DataIndexOverflow", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidDataLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidFieldNamesLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidKeyNamesLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidValueSchemaLength", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotDynamicField", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotImplemented", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableAlreadyExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreEphemeralRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "deleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "emitEphemeralRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "byteLengthToPop", - "type": "uint256" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "popFromField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "dataToPush", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "pushToField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "contract IStoreHook", - "name": "hookAddress", - "type": "address" - }, - { - "internalType": "uint8", - "name": "enabledHooksBitmap", - "type": "uint8" - } - ], - "name": "registerStoreHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - }, - { - "internalType": "string[]", - "name": "keyNames", - "type": "string[]" - }, - { - "internalType": "string[]", - "name": "fieldNames", - "type": "string[]" - } - ], - "name": "registerTable", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "contract IStoreHook", - "name": "hookAddress", - "type": "address" - } - ], - "name": "unregisterStoreHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startByteIndex", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "dataToSet", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "updateInField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/IStore.sol/IStore.abi.json.d.ts b/packages/world/abi/IStore.sol/IStore.abi.json.d.ts deleted file mode 100644 index e939bc04ed..0000000000 --- a/packages/world/abi/IStore.sol/IStore.abi.json.d.ts +++ /dev/null @@ -1,718 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_DataIndexOverflow"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidDataLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidFieldNamesLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidKeyNamesLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidValueSchemaLength"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotDynamicField"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotImplemented"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableAlreadyExists"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableNotFound"; - type: "error"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreEphemeralRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "deleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "emitEphemeralRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "byteLengthToPop"; - type: "uint256"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "popFromField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "dataToPush"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "pushToField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "contract IStoreHook"; - name: "hookAddress"; - type: "address"; - }, - { - internalType: "uint8"; - name: "enabledHooksBitmap"; - type: "uint8"; - } - ]; - name: "registerStoreHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - }, - { - internalType: "string[]"; - name: "keyNames"; - type: "string[]"; - }, - { - internalType: "string[]"; - name: "fieldNames"; - type: "string[]"; - } - ]; - name: "registerTable"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "contract IStoreHook"; - name: "hookAddress"; - type: "address"; - } - ]; - name: "unregisterStoreHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "startByteIndex"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "dataToSet"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "updateInField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/IStore.sol/IStoreData.abi.json b/packages/world/abi/IStore.sol/IStoreData.abi.json deleted file mode 100644 index f6db946f1c..0000000000 --- a/packages/world/abi/IStore.sol/IStoreData.abi.json +++ /dev/null @@ -1,463 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "deleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "byteLengthToPop", - "type": "uint256" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "popFromField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "dataToPush", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "pushToField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startByteIndex", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "dataToSet", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "updateInField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/IStore.sol/IStoreData.abi.json.d.ts b/packages/world/abi/IStore.sol/IStoreData.abi.json.d.ts deleted file mode 100644 index 077b246517..0000000000 --- a/packages/world/abi/IStore.sol/IStoreData.abi.json.d.ts +++ /dev/null @@ -1,464 +0,0 @@ -declare const abi: [ - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "deleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "byteLengthToPop"; - type: "uint256"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "popFromField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "dataToPush"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "pushToField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "startByteIndex"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "dataToSet"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "updateInField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json b/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json deleted file mode 100644 index f591aa2757..0000000000 --- a/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json +++ /dev/null @@ -1,55 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreEphemeralRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "emitEphemeralRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts b/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts deleted file mode 100644 index 9b9186d587..0000000000 --- a/packages/world/abi/IStore.sol/IStoreEphemeral.abi.json.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -declare const abi: [ - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreEphemeralRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "emitEphemeralRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/IStore.sol/IStoreRead.abi.json b/packages/world/abi/IStore.sol/IStoreRead.abi.json deleted file mode 100644 index 5fb8e1bc53..0000000000 --- a/packages/world/abi/IStore.sol/IStoreRead.abi.json +++ /dev/null @@ -1,200 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/IStore.sol/IStoreRead.abi.json.d.ts b/packages/world/abi/IStore.sol/IStoreRead.abi.json.d.ts deleted file mode 100644 index 9ca275d41b..0000000000 --- a/packages/world/abi/IStore.sol/IStoreRead.abi.json.d.ts +++ /dev/null @@ -1,201 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/IStore.sol/IStoreWrite.abi.json b/packages/world/abi/IStore.sol/IStoreWrite.abi.json deleted file mode 100644 index 352fb8196a..0000000000 --- a/packages/world/abi/IStore.sol/IStoreWrite.abi.json +++ /dev/null @@ -1,265 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "deleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "byteLengthToPop", - "type": "uint256" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "popFromField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "dataToPush", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "pushToField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startByteIndex", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "dataToSet", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "updateInField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/IStore.sol/IStoreWrite.abi.json.d.ts b/packages/world/abi/IStore.sol/IStoreWrite.abi.json.d.ts deleted file mode 100644 index 04ce5d76ab..0000000000 --- a/packages/world/abi/IStore.sol/IStoreWrite.abi.json.d.ts +++ /dev/null @@ -1,266 +0,0 @@ -declare const abi: [ - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "deleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "byteLengthToPop"; - type: "uint256"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "popFromField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "dataToPush"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "pushToField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "startByteIndex"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "dataToSet"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "updateInField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/IStoreHook.sol/IStoreHook.abi.json b/packages/world/abi/IStoreHook.sol/IStoreHook.abi.json deleted file mode 100644 index 9782a97c93..0000000000 --- a/packages/world/abi/IStoreHook.sol/IStoreHook.abi.json +++ /dev/null @@ -1,189 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceID", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts b/packages/world/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts deleted file mode 100644 index d3e9224ef8..0000000000 --- a/packages/world/abi/IStoreHook.sol/IStoreHook.abi.json.d.ts +++ /dev/null @@ -1,190 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "interfaceID"; - type: "bytes4"; - } - ]; - name: "supportsInterface"; - outputs: [ - { - internalType: "bool"; - name: ""; - type: "bool"; - } - ]; - stateMutability: "view"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json b/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json deleted file mode 100644 index 710c1ed06c..0000000000 --- a/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json +++ /dev/null @@ -1,279 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "FieldLayoutLib_InvalidLength", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthIsZero", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "PackedCounter_InvalidLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "Slice_OutOfBounds", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_DataIndexOverflow", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidDataLength", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotDynamicField", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "", - "type": "bytes32" - } - ], - "name": "onAfterSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "", - "type": "bytes32" - } - ], - "name": "onAfterSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "", - "type": "bytes32" - } - ], - "name": "onBeforeDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "", - "type": "bytes32" - } - ], - "name": "onBeforeSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "", - "type": "bytes32" - } - ], - "name": "onBeforeSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json.d.ts b/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json.d.ts deleted file mode 100644 index d01f54b190..0000000000 --- a/packages/world/abi/KeysInTableHook.sol/KeysInTableHook.abi.json.d.ts +++ /dev/null @@ -1,280 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "FieldLayoutLib_InvalidLength"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthIsZero"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "PackedCounter_InvalidLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "Slice_OutOfBounds"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_DataIndexOverflow"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidDataLength"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotDynamicField"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: ""; - type: "uint8"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: ""; - type: "bytes32"; - } - ]; - name: "onAfterSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: ""; - type: "bytes32"; - } - ]; - name: "onAfterSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: ""; - type: "bytes32"; - } - ]; - name: "onBeforeDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: ""; - type: "uint8"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: ""; - type: "bytes32"; - } - ]; - name: "onBeforeSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: ""; - type: "bytes32"; - } - ]; - name: "onBeforeSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - } - ]; - name: "supportsInterface"; - outputs: [ - { - internalType: "bool"; - name: ""; - type: "bool"; - } - ]; - stateMutability: "pure"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json b/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json deleted file mode 100644 index 0760ed5cb7..0000000000 --- a/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json +++ /dev/null @@ -1,263 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "FieldLayoutLib_InvalidLength", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthIsZero", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "PackedCounter_InvalidLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "Slice_OutOfBounds", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidDataLength", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotDynamicField", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "sourceTableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "sourceTableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "sourceTableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "sourceTableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "sourceTableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "sourceTableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json.d.ts b/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json.d.ts deleted file mode 100644 index e5c0491a73..0000000000 --- a/packages/world/abi/KeysWithValueHook.sol/KeysWithValueHook.abi.json.d.ts +++ /dev/null @@ -1,264 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "FieldLayoutLib_InvalidLength"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthIsZero"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "PackedCounter_InvalidLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "Slice_OutOfBounds"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidDataLength"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotDynamicField"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "sourceTableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "sourceTableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: ""; - type: "uint8"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "sourceTableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "sourceTableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "sourceTableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: ""; - type: "uint8"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "sourceTableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - } - ]; - name: "supportsInterface"; - outputs: [ - { - internalType: "bool"; - name: ""; - type: "bool"; - } - ]; - stateMutability: "pure"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/StoreCore.sol/StoreCore.abi.json b/packages/world/abi/StoreCore.sol/StoreCore.abi.json deleted file mode 100644 index 3808909d9a..0000000000 --- a/packages/world/abi/StoreCore.sol/StoreCore.abi.json +++ /dev/null @@ -1,102 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreEphemeralRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "fieldIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - } -] \ No newline at end of file diff --git a/packages/world/abi/StoreCore.sol/StoreCore.abi.json.d.ts b/packages/world/abi/StoreCore.sol/StoreCore.abi.json.d.ts deleted file mode 100644 index fa9de440d1..0000000000 --- a/packages/world/abi/StoreCore.sol/StoreCore.abi.json.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -declare const abi: [ - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreEphemeralRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "fieldIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - } -]; -export default abi; diff --git a/packages/world/abi/StoreHook.sol/StoreHook.abi.json b/packages/world/abi/StoreHook.sol/StoreHook.abi.json deleted file mode 100644 index 59ef8376aa..0000000000 --- a/packages/world/abi/StoreHook.sol/StoreHook.abi.json +++ /dev/null @@ -1,189 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/StoreHook.sol/StoreHook.abi.json.d.ts b/packages/world/abi/StoreHook.sol/StoreHook.abi.json.d.ts deleted file mode 100644 index 4091c781ed..0000000000 --- a/packages/world/abi/StoreHook.sol/StoreHook.abi.json.d.ts +++ /dev/null @@ -1,190 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - } - ]; - name: "supportsInterface"; - outputs: [ - { - internalType: "bool"; - name: ""; - type: "bool"; - } - ]; - stateMutability: "pure"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/StoreRead.sol/StoreRead.abi.json b/packages/world/abi/StoreRead.sol/StoreRead.abi.json deleted file mode 100644 index 7ac3c66a02..0000000000 --- a/packages/world/abi/StoreRead.sol/StoreRead.abi.json +++ /dev/null @@ -1,242 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "FieldLayoutLib_InvalidLength", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthIsZero", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotDynamicField", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/StoreRead.sol/StoreRead.abi.json.d.ts b/packages/world/abi/StoreRead.sol/StoreRead.abi.json.d.ts deleted file mode 100644 index 8a28178333..0000000000 --- a/packages/world/abi/StoreRead.sol/StoreRead.abi.json.d.ts +++ /dev/null @@ -1,243 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "FieldLayoutLib_InvalidLength"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthIsZero"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotDynamicField"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableNotFound"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/World.sol/World.abi.json b/packages/world/abi/World.sol/World.abi.json deleted file mode 100644 index 23782fe93e..0000000000 --- a/packages/world/abi/World.sol/World.abi.json +++ /dev/null @@ -1,820 +0,0 @@ -[ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "resource", - "type": "string" - }, - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "DelegationNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "FieldLayoutLib_InvalidLength", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthDoesNotFitInAWord", - "type": "error" - }, - { - "inputs": [], - "name": "FieldLayoutLib_StaticLengthIsZero", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "functionSelector", - "type": "bytes4" - } - ], - "name": "FunctionSelectorExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "functionSelector", - "type": "bytes4" - } - ], - "name": "FunctionSelectorNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "InsufficientBalance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contractAddress", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "InterfaceNotSupported", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "resource", - "type": "string" - } - ], - "name": "InvalidSelector", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "PackedCounter_InvalidLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "resource", - "type": "string" - } - ], - "name": "ResourceExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "resource", - "type": "string" - } - ], - "name": "ResourceNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "Slice_OutOfBounds", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_DataIndexOverflow", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidDataLength", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotDynamicField", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "system", - "type": "address" - } - ], - "name": "SystemExists", - "type": "error" - }, - { - "inputs": [], - "name": "WorldAlreadyInitialized", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "HelloWorld", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "funcSelectorAndArgs", - "type": "bytes" - } - ], - "name": "call", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "resourceSelector", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "funcSelectorAndArgs", - "type": "bytes" - } - ], - "name": "callFrom", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "creator", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "deleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IModule", - "name": "coreModule", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IModule", - "name": "module", - "type": "address" - }, - { - "internalType": "bytes", - "name": "args", - "type": "bytes" - } - ], - "name": "installRootModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "byteLengthToPop", - "type": "uint256" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "popFromField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "dataToPush", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "pushToField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startByteIndex", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "dataToSet", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "updateInField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } -] \ No newline at end of file diff --git a/packages/world/abi/World.sol/World.abi.json.d.ts b/packages/world/abi/World.sol/World.abi.json.d.ts deleted file mode 100644 index e5398caa53..0000000000 --- a/packages/world/abi/World.sol/World.abi.json.d.ts +++ /dev/null @@ -1,821 +0,0 @@ -declare const abi: [ - { - inputs: []; - stateMutability: "nonpayable"; - type: "constructor"; - }, - { - inputs: [ - { - internalType: "string"; - name: "resource"; - type: "string"; - }, - { - internalType: "address"; - name: "caller"; - type: "address"; - } - ]; - name: "AccessDenied"; - type: "error"; - }, - { - inputs: [ - { - internalType: "address"; - name: "delegator"; - type: "address"; - }, - { - internalType: "address"; - name: "delegatee"; - type: "address"; - } - ]; - name: "DelegationNotFound"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "FieldLayoutLib_InvalidLength"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthDoesNotFitInAWord"; - type: "error"; - }, - { - inputs: []; - name: "FieldLayoutLib_StaticLengthIsZero"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "functionSelector"; - type: "bytes4"; - } - ]; - name: "FunctionSelectorExists"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "functionSelector"; - type: "bytes4"; - } - ]; - name: "FunctionSelectorNotFound"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "balance"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - } - ]; - name: "InsufficientBalance"; - type: "error"; - }, - { - inputs: [ - { - internalType: "address"; - name: "contractAddress"; - type: "address"; - }, - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - } - ]; - name: "InterfaceNotSupported"; - type: "error"; - }, - { - inputs: [ - { - internalType: "string"; - name: "resource"; - type: "string"; - } - ]; - name: "InvalidSelector"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - } - ]; - name: "PackedCounter_InvalidLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "string"; - name: "resource"; - type: "string"; - } - ]; - name: "ResourceExists"; - type: "error"; - }, - { - inputs: [ - { - internalType: "string"; - name: "resource"; - type: "string"; - } - ]; - name: "ResourceNotFound"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "Slice_OutOfBounds"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_DataIndexOverflow"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidDataLength"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotDynamicField"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableNotFound"; - type: "error"; - }, - { - inputs: [ - { - internalType: "address"; - name: "system"; - type: "address"; - } - ]; - name: "SystemExists"; - type: "error"; - }, - { - inputs: []; - name: "WorldAlreadyInitialized"; - type: "error"; - }, - { - anonymous: false; - inputs: []; - name: "HelloWorld"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - }, - { - stateMutability: "payable"; - type: "fallback"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "funcSelectorAndArgs"; - type: "bytes"; - } - ]; - name: "call"; - outputs: [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - } - ]; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "address"; - name: "delegator"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "resourceSelector"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "funcSelectorAndArgs"; - type: "bytes"; - } - ]; - name: "callFrom"; - outputs: [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - } - ]; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: []; - name: "creator"; - outputs: [ - { - internalType: "address"; - name: ""; - type: "address"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "deleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "contract IModule"; - name: "coreModule"; - type: "address"; - } - ]; - name: "initialize"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "contract IModule"; - name: "module"; - type: "address"; - }, - { - internalType: "bytes"; - name: "args"; - type: "bytes"; - } - ]; - name: "installRootModule"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "byteLengthToPop"; - type: "uint256"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "popFromField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "dataToPush"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "pushToField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "startByteIndex"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "dataToSet"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "updateInField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - stateMutability: "payable"; - type: "receive"; - } -]; -export default abi; diff --git a/packages/world/abi/src/IStore.sol/IStore.abi.json b/packages/world/abi/src/IStore.sol/IStore.abi.json deleted file mode 100644 index 974e2e74fa..0000000000 --- a/packages/world/abi/src/IStore.sol/IStore.abi.json +++ /dev/null @@ -1,717 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_DataIndexOverflow", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidDataLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidFieldNamesLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidKeyNamesLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "StoreCore_InvalidValueSchemaLength", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotDynamicField", - "type": "error" - }, - { - "inputs": [], - "name": "StoreCore_NotImplemented", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableAlreadyExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "tableIdString", - "type": "string" - } - ], - "name": "StoreCore_TableNotFound", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreEphemeralRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "deleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "emitEphemeralRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "byteLengthToPop", - "type": "uint256" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "popFromField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "dataToPush", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "pushToField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "contract IStoreHook", - "name": "hookAddress", - "type": "address" - }, - { - "internalType": "uint8", - "name": "enabledHooksBitmap", - "type": "uint8" - } - ], - "name": "registerStoreHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - }, - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - }, - { - "internalType": "string[]", - "name": "keyNames", - "type": "string[]" - }, - { - "internalType": "string[]", - "name": "fieldNames", - "type": "string[]" - } - ], - "name": "registerTable", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "contract IStoreHook", - "name": "hookAddress", - "type": "address" - } - ], - "name": "unregisterStoreHook", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startByteIndex", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "dataToSet", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "updateInField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/src/IStore.sol/IStore.abi.json.d.ts b/packages/world/abi/src/IStore.sol/IStore.abi.json.d.ts deleted file mode 100644 index e939bc04ed..0000000000 --- a/packages/world/abi/src/IStore.sol/IStore.abi.json.d.ts +++ /dev/null @@ -1,718 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_DataIndexOverflow"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidDataLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidFieldNamesLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidKeyNamesLength"; - type: "error"; - }, - { - inputs: [ - { - internalType: "uint256"; - name: "expected"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "received"; - type: "uint256"; - } - ]; - name: "StoreCore_InvalidValueSchemaLength"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotDynamicField"; - type: "error"; - }, - { - inputs: []; - name: "StoreCore_NotImplemented"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableAlreadyExists"; - type: "error"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "string"; - name: "tableIdString"; - type: "string"; - } - ]; - name: "StoreCore_TableNotFound"; - type: "error"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreEphemeralRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "deleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "emitEphemeralRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "byteLengthToPop"; - type: "uint256"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "popFromField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "dataToPush"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "pushToField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "contract IStoreHook"; - name: "hookAddress"; - type: "address"; - }, - { - internalType: "uint8"; - name: "enabledHooksBitmap"; - type: "uint8"; - } - ]; - name: "registerStoreHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - }, - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - }, - { - internalType: "string[]"; - name: "keyNames"; - type: "string[]"; - }, - { - internalType: "string[]"; - name: "fieldNames"; - type: "string[]"; - } - ]; - name: "registerTable"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "contract IStoreHook"; - name: "hookAddress"; - type: "address"; - } - ]; - name: "unregisterStoreHook"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "startByteIndex"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "dataToSet"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "updateInField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/src/IStore.sol/IStoreData.abi.json b/packages/world/abi/src/IStore.sol/IStoreData.abi.json deleted file mode 100644 index f6db946f1c..0000000000 --- a/packages/world/abi/src/IStore.sol/IStoreData.abi.json +++ /dev/null @@ -1,463 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "deleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "byteLengthToPop", - "type": "uint256" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "popFromField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "dataToPush", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "pushToField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startByteIndex", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "dataToSet", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "updateInField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/src/IStore.sol/IStoreData.abi.json.d.ts b/packages/world/abi/src/IStore.sol/IStoreData.abi.json.d.ts deleted file mode 100644 index 077b246517..0000000000 --- a/packages/world/abi/src/IStore.sol/IStoreData.abi.json.d.ts +++ /dev/null @@ -1,464 +0,0 @@ -declare const abi: [ - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "deleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "byteLengthToPop"; - type: "uint256"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "popFromField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "dataToPush"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "pushToField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "startByteIndex"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "dataToSet"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "updateInField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json b/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json deleted file mode 100644 index f591aa2757..0000000000 --- a/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json +++ /dev/null @@ -1,55 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreEphemeralRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "emitEphemeralRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json.d.ts b/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json.d.ts deleted file mode 100644 index 9b9186d587..0000000000 --- a/packages/world/abi/src/IStore.sol/IStoreEphemeral.abi.json.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -declare const abi: [ - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreEphemeralRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "emitEphemeralRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/src/IStore.sol/IStoreRead.abi.json b/packages/world/abi/src/IStore.sol/IStoreRead.abi.json deleted file mode 100644 index 5fb8e1bc53..0000000000 --- a/packages/world/abi/src/IStore.sol/IStoreRead.abi.json +++ /dev/null @@ -1,200 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getField", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getFieldLayout", - "outputs": [ - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getFieldLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getFieldSlice", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getKeySchema", - "outputs": [ - { - "internalType": "Schema", - "name": "keySchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "getRecord", - "outputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - } - ], - "name": "getValueSchema", - "outputs": [ - { - "internalType": "Schema", - "name": "valueSchema", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/src/IStore.sol/IStoreRead.abi.json.d.ts b/packages/world/abi/src/IStore.sol/IStoreRead.abi.json.d.ts deleted file mode 100644 index 9ca275d41b..0000000000 --- a/packages/world/abi/src/IStore.sol/IStoreRead.abi.json.d.ts +++ /dev/null @@ -1,201 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getField"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getFieldLayout"; - outputs: [ - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getFieldLength"; - outputs: [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "start"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "end"; - type: "uint256"; - } - ]; - name: "getFieldSlice"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getKeySchema"; - outputs: [ - { - internalType: "Schema"; - name: "keySchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "getRecord"; - outputs: [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - } - ]; - name: "getValueSchema"; - outputs: [ - { - internalType: "Schema"; - name: "valueSchema"; - type: "bytes32"; - } - ]; - stateMutability: "view"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json b/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json deleted file mode 100644 index 352fb8196a..0000000000 --- a/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json +++ /dev/null @@ -1,265 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "deleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "byteLengthToPop", - "type": "uint256" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "popFromField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "dataToPush", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "pushToField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "setRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startByteIndex", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "dataToSet", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "updateInField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json.d.ts b/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json.d.ts deleted file mode 100644 index 04ce5d76ab..0000000000 --- a/packages/world/abi/src/IStore.sol/IStoreWrite.abi.json.d.ts +++ /dev/null @@ -1,266 +0,0 @@ -declare const abi: [ - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "deleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "byteLengthToPop"; - type: "uint256"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "popFromField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "dataToPush"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "pushToField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "setRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "startByteIndex"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "dataToSet"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "updateInField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json b/packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json deleted file mode 100644 index 9782a97c93..0000000000 --- a/packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json +++ /dev/null @@ -1,189 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceID", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json.d.ts b/packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json.d.ts deleted file mode 100644 index d3e9224ef8..0000000000 --- a/packages/world/abi/src/IStoreHook.sol/IStoreHook.abi.json.d.ts +++ /dev/null @@ -1,190 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "interfaceID"; - type: "bytes4"; - } - ]; - name: "supportsInterface"; - outputs: [ - { - internalType: "bool"; - name: ""; - type: "bool"; - } - ]; - stateMutability: "view"; - type: "function"; - } -]; -export default abi; diff --git a/packages/world/abi/src/StoreCore.sol/StoreCore.abi.json b/packages/world/abi/src/StoreCore.sol/StoreCore.abi.json deleted file mode 100644 index 3808909d9a..0000000000 --- a/packages/world/abi/src/StoreCore.sol/StoreCore.abi.json +++ /dev/null @@ -1,102 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - } - ], - "name": "StoreDeleteRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreEphemeralRecord", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "fieldIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetField", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "StoreSetRecord", - "type": "event" - } -] \ No newline at end of file diff --git a/packages/world/abi/src/StoreCore.sol/StoreCore.abi.json.d.ts b/packages/world/abi/src/StoreCore.sol/StoreCore.abi.json.d.ts deleted file mode 100644 index fa9de440d1..0000000000 --- a/packages/world/abi/src/StoreCore.sol/StoreCore.abi.json.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -declare const abi: [ - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - } - ]; - name: "StoreDeleteRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreEphemeralRecord"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "uint8"; - name: "fieldIndex"; - type: "uint8"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetField"; - type: "event"; - }, - { - anonymous: false; - inputs: [ - { - indexed: false; - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - indexed: false; - internalType: "bytes"; - name: "data"; - type: "bytes"; - } - ]; - name: "StoreSetRecord"; - type: "event"; - } -]; -export default abi; diff --git a/packages/world/abi/src/StoreHook.sol/StoreHook.abi.json b/packages/world/abi/src/StoreHook.sol/StoreHook.abi.json deleted file mode 100644 index 59ef8376aa..0000000000 --- a/packages/world/abi/src/StoreHook.sol/StoreHook.abi.json +++ /dev/null @@ -1,189 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onAfterSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeDeleteRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "uint8", - "name": "schemaIndex", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetField", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tableId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "keyTuple", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "FieldLayout", - "name": "fieldLayout", - "type": "bytes32" - } - ], - "name": "onBeforeSetRecord", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - } -] \ No newline at end of file diff --git a/packages/world/abi/src/StoreHook.sol/StoreHook.abi.json.d.ts b/packages/world/abi/src/StoreHook.sol/StoreHook.abi.json.d.ts deleted file mode 100644 index 4091c781ed..0000000000 --- a/packages/world/abi/src/StoreHook.sol/StoreHook.abi.json.d.ts +++ /dev/null @@ -1,190 +0,0 @@ -declare const abi: [ - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onAfterSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeDeleteRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "uint8"; - name: "schemaIndex"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetField"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes32"; - name: "tableId"; - type: "bytes32"; - }, - { - internalType: "bytes32[]"; - name: "keyTuple"; - type: "bytes32[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "FieldLayout"; - name: "fieldLayout"; - type: "bytes32"; - } - ]; - name: "onBeforeSetRecord"; - outputs: []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - } - ]; - name: "supportsInterface"; - outputs: [ - { - internalType: "bool"; - name: ""; - type: "bool"; - } - ]; - stateMutability: "pure"; - type: "function"; - } -]; -export default abi; From 7c6f2af328fb8733d740b6b47752395cc1cd4246 Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 22:13:36 +0100 Subject: [PATCH 18/28] fix tests --- .../store-sync/src/blockLogsToStorage.test.ts | 8 +- packages/store-sync/src/blockLogsToStorage.ts | 4 +- .../src/postgres/postgresStorage.test.ts | 7 +- .../store-sync/src/recs/recsStorage.test.ts | 2 + .../src/sqlite/sqliteStorage.test.ts | 7 +- test-data/world-logs.json | 336 +++++++++--------- 6 files changed, 184 insertions(+), 180 deletions(-) diff --git a/packages/store-sync/src/blockLogsToStorage.test.ts b/packages/store-sync/src/blockLogsToStorage.test.ts index d1adbaa602..e3f134db48 100644 --- a/packages/store-sync/src/blockLogsToStorage.test.ts +++ b/packages/store-sync/src/blockLogsToStorage.test.ts @@ -60,7 +60,7 @@ describe("blockLogsToStorage", () => { removed: false, args: { tableId: "0x6d756473746f726500000000000000005461626c657300000000000000000000", - key: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], + keyTuple: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], data: "0x0004010004000000000000000000000000000000000000000000000000000000001c030061030300000000000000000000000000000000000000000000000000000401000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000001600000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000056f776e657200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046974656d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b6974656d56617269616e740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006616d6f756e740000000000000000000000000000000000000000000000000000", }, eventName: "StoreSetRecord", @@ -77,7 +77,7 @@ describe("blockLogsToStorage", () => { removed: false, args: { tableId: "0x00000000000000000000000000000000496e76656e746f727900000000000000", - key: [ + keyTuple: [ "0x000000000000000000000000796eb990a3f9c431c69149c7a168b91596d87f60", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000001", @@ -110,7 +110,7 @@ describe("blockLogsToStorage", () => { "address": "0x5fbdb2315678afecb367f032d93f642f64180aa3", "args": { "data": "0x00000008", - "key": [ + "keyTuple": [ "0x000000000000000000000000796eb990a3f9c431c69149c7a168b91596d87f60", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000001", @@ -164,7 +164,7 @@ describe("blockLogsToStorage", () => { "address": "0x5fbdb2315678afecb367f032d93f642f64180aa3", "args": { "data": "0x00000008", - "key": [ + "keyTuple": [ "0x000000000000000000000000796eb990a3f9c431c69149c7a168b91596d87f60", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000001", diff --git a/packages/store-sync/src/blockLogsToStorage.ts b/packages/store-sync/src/blockLogsToStorage.ts index 645db04c3f..e2d025f3e3 100644 --- a/packages/store-sync/src/blockLogsToStorage.ts +++ b/packages/store-sync/src/blockLogsToStorage.ts @@ -41,7 +41,7 @@ export function blockLogsToStorage({ // TODO: refactor encode/decode to use Record schemas // TODO: refactor to decode key with protocol-parser utils - const [tableId, ...otherKeys] = log.args.key; + const [tableId, ...otherKeys] = log.args.keyTuple; if (otherKeys.length) { console.warn("registerSchema event is expected to have only one key in key tuple, but got multiple", log); } @@ -115,7 +115,7 @@ export function blockLogsToStorage({ const keyNames = Object.keys(table.keySchema); const keyValues = decodeKeyTuple( { staticFields: Object.values(table.keySchema), dynamicFields: [] }, - log.args.key + log.args.keyTuple ); const key = Object.fromEntries(keyValues.map((value, i) => [keyNames[i], value])) as Key< TConfig, diff --git a/packages/store-sync/src/postgres/postgresStorage.test.ts b/packages/store-sync/src/postgres/postgresStorage.test.ts index 710ba387fc..47c29b5ee9 100644 --- a/packages/store-sync/src/postgres/postgresStorage.test.ts +++ b/packages/store-sync/src/postgres/postgresStorage.test.ts @@ -9,6 +9,7 @@ import * as transformSchemaNameExports from "./transformSchemaName"; import { getTables } from "./getTables"; import { PostgresStorageAdapter, postgresStorage } from "./postgresStorage"; import { buildTable } from "./buildTable"; +import { StoreEventsLog } from "../common"; vi.spyOn(transformSchemaNameExports, "transformSchemaName").mockImplementation( (schemaName) => `${process.pid}_${process.env.VITEST_POOL_ID}__${schemaName}` @@ -47,7 +48,7 @@ describe("postgresStorage", async () => { removed: false, args: { tableId: "0x000000000000000000000000000000005265736f757263655479706500000000", - key: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], + keyTuple: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], schemaIndex: 0, data: "0x02", }, @@ -65,12 +66,12 @@ describe("postgresStorage", async () => { removed: false, args: { tableId: "0x6d756473746f726500000000000000005461626c657300000000000000000000", - key: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], + keyTuple: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], data: "0x0004010004000000000000000000000000000000000000000000000000000000001c030061030300000000000000000000000000000000000000000000000000000401000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000001600000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000056f776e657200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046974656d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b6974656d56617269616e740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006616d6f756e740000000000000000000000000000000000000000000000000000", }, eventName: "StoreSetRecord", }, - ], + ] satisfies StoreEventsLog[], }); expect(await db.select().from(storageAdapter.internalTables.chain)).toMatchInlineSnapshot(` diff --git a/packages/store-sync/src/recs/recsStorage.test.ts b/packages/store-sync/src/recs/recsStorage.test.ts index 3b8e401444..963260acc4 100644 --- a/packages/store-sync/src/recs/recsStorage.test.ts +++ b/packages/store-sync/src/recs/recsStorage.test.ts @@ -20,6 +20,8 @@ const worldLogs = worldRpcLogs.map((log) => { return formatLog(log as any as RpcLog, { args, eventName: eventName as string }) as StoreEventsLog; }); +console.log("world logs", worldLogs); + describe("recsStorage", () => { it("creates components", async () => { const world = createWorld(); diff --git a/packages/store-sync/src/sqlite/sqliteStorage.test.ts b/packages/store-sync/src/sqlite/sqliteStorage.test.ts index 1047ff4262..414c104b25 100644 --- a/packages/store-sync/src/sqlite/sqliteStorage.test.ts +++ b/packages/store-sync/src/sqlite/sqliteStorage.test.ts @@ -9,6 +9,7 @@ import { drizzle } from "drizzle-orm/sql-js"; import { createPublicClient, http } from "viem"; import { foundry } from "viem/chains"; import { blockLogsToStorage } from "../blockLogsToStorage"; +import { StoreEventsLog } from "../common"; describe("sqliteStorage", async () => { const SqlJs = await initSqlJs(); @@ -53,7 +54,7 @@ describe("sqliteStorage", async () => { removed: false, args: { tableId: "0x000000000000000000000000000000005265736f757263655479706500000000", - key: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], + keyTuple: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], schemaIndex: 0, data: "0x02", }, @@ -71,12 +72,12 @@ describe("sqliteStorage", async () => { removed: false, args: { tableId: "0x6d756473746f726500000000000000005461626c657300000000000000000000", - key: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], + keyTuple: ["0x00000000000000000000000000000000496e76656e746f727900000000000000"], data: "0x0004010004000000000000000000000000000000000000000000000000000000001c030061030300000000000000000000000000000000000000000000000000000401000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000001600000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000056f776e657200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046974656d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b6974656d56617269616e740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006616d6f756e740000000000000000000000000000000000000000000000000000", }, eventName: "StoreSetRecord", }, - ], + ] satisfies StoreEventsLog[], }); expect(db.select().from(chainState).all()).toMatchInlineSnapshot(` diff --git a/test-data/world-logs.json b/test-data/world-logs.json index 1f79d89f7e..1e2cf44f88 100644 --- a/test-data/world-logs.json +++ b/test-data/world-logs.json @@ -5,8 +5,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000016d756473746f726500000000000000005461626c65730000000000000000000000000000000000000000000000000000000000000000000000000000000003400060030220202000000000000000000000000000000000000000000000000000002001005f000000000000000000000000000000000000000000000000000000006003025f5f5fc4c40000000000000000000000000000000000000000000000000000000000000000000000000000000000022000000000a0000000000002c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000077461626c654964000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000b6669656c644c61796f757400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000096b6579536368656d610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b76616c7565536368656d610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012616269456e636f6465644b65794e616d657300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014616269456e636f6465644669656c644e616d6573000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x0", @@ -19,8 +19,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000016d756473746f7265000000000000000053746f7265486f6f6b7300000000000000000000000000000000000000000000000000000000000000000000000001c00000000100000000000000000000000000000000000000000000000000000000002001005f00000000000000000000000000000000000000000000000000000000000001b600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b65790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x1", @@ -33,8 +33,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e616d6573706163654f776e6572000000000000000000000000000000000000000000000000000000000000000001c00014010014000000000000000000000000000000000000000000000000000000001001004f000000000000000000000000000000000000000000000000000000001401006100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000096e616d657370616365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000056f776e6572000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x2", @@ -47,8 +47,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000042616c616e636573000000000000000000000000000000000000000000000000000000000000000000000000000001c00020010020000000000000000000000000000000000000000000000000000000001001004f000000000000000000000000000000000000000000000000000000002001001f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000096e616d6573706163650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000762616c616e636500000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x3", @@ -61,8 +61,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000496e7374616c6c65644d6f64756c657300000000000000000000000000000000000000000000000000000000000002200014010014000000000000000000000000000000000000000000000000000000003002004f5f0000000000000000000000000000000000000000000000000000001401006100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000100000000000001a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000a6d6f64756c654e616d6500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d617267756d656e74734861736800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000d6d6f64756c654164647265737300000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x4", @@ -75,8 +75,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000044656c65676174696f6e730000000000000000000000000000000000000000000000000000000000000000000000022000200100200000000000000000000000000000000000000000000000000000000028020061610000000000000000000000000000000000000000000000000000002001005f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000100000000000001a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000964656c656761746f720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000964656c6567617465650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001364656c65676174696f6e436f6e74726f6c496400000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x5", @@ -89,8 +89,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000005265736f75726365416363657373000000000000000000000000000000000000000000000000000000000000000002200001010001000000000000000000000000000000000000000000000000000000003402005f610000000000000000000000000000000000000000000000000000000101006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000100000000000001a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000663616c6c6572000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000066163636573730000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x6", @@ -103,8 +103,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000053797374656d7300000000000000000000000000000000000000000000000000000000000000000000000000000002200015020014010000000000000000000000000000000000000000000000000000002001005f0000000000000000000000000000000000000000000000000000000015020061600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000a0000000000001a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f72000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000673797374656d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c7075626c69634163636573730000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x7", @@ -117,8 +117,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000022000240200200400000000000000000000000000000000000000000000000000000004010043000000000000000000000000000000000000000000000000000000002402005f430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000a0000000000001a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001066756e6374696f6e53656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001673797374656d46756e6374696f6e53656c6563746f7200000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x8", @@ -131,8 +131,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000053797374656d486f6f6b73000000000000000000000000000000000000000000000000000000000000000000000001c00000000100000000000000000000000000000000000000000000000000000000002001005f00000000000000000000000000000000000000000000000000000000000001b600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x9", @@ -145,8 +145,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000053797374656d5265676973747279000000000000000000000000000000000000000000000000000000000000000001c000200100200000000000000000000000000000000000000000000000000000000014010061000000000000000000000000000000000000000000000000000000002001005f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a000000000000140000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000673797374656d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0xa", @@ -159,8 +159,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000005265736f75726365547970650000000000000000000000000000000000000000000000000000000000000000000001c00001010001000000000000000000000000000000000000000000000000000000002001005f000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000c7265736f75726365547970650000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0xb", @@ -173,8 +173,8 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000004e616d6573706163654f776e657200000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014f39fd6e51aad88f6f4ce6ab8827279cfffb92266000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0xc", @@ -187,8 +187,8 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb9226600000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0xd", @@ -201,8 +201,8 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0xe", @@ -215,8 +215,8 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000636f72652e730000000000000000000000000000000000000000000000000000000000000000000000000000000000010300000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0xf", @@ -229,8 +229,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000053797374656d73000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000636f72652e73000000000000000000000000000000000000000000000000000000000000000000000000000000000015cafac3dd18ac6c6e92c921884f9e4176737c052c010000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x10", @@ -243,8 +243,8 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x0000000000000000000000000000000053797374656d526567697374727900000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000cafac3dd18ac6c6e92c921884f9e4176737c052c000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000636f72652e7300000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x11", @@ -257,8 +257,8 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cafac3dd18ac6c6e92c921884f9e4176737c052c00000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x12", @@ -271,8 +271,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000140554c3a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e730000000000000000000040554c3a00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x13", @@ -285,8 +285,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000018d53b20800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000008d53b20800000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x14", @@ -299,8 +299,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000125f6221000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e730000000000000000000025f6221000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x15", @@ -313,8 +313,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000012bfaa27400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000002bfaa27400000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x16", @@ -327,8 +327,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000121293ca000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e730000000000000000000021293ca000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x17", @@ -341,8 +341,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000018818929400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000008818929400000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x18", @@ -355,8 +355,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000018da798da00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000008da798da00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x19", @@ -369,8 +369,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010ba51f4900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000000ba51f4900000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x1a", @@ -383,8 +383,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001530f4b6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000530f4b6000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x1b", @@ -397,8 +397,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010560912900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000000560912900000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x1c", @@ -411,8 +411,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001a886545e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000a886545e00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x1d", @@ -425,8 +425,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001d5f8337f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000d5f8337f00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x1e", @@ -439,8 +439,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001a92813ad00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000a92813ad00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x1f", @@ -453,8 +453,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000013350b6a900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000003350b6a900000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x20", @@ -467,8 +467,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000013c03a51c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000003c03a51c00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x21", @@ -481,8 +481,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001b7a3c75600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000b7a3c75600000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x22", @@ -495,8 +495,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000011d2257ba00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000001d2257ba00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x23", @@ -509,8 +509,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x00000000000000000000000000000000496e7374616c6c65644d6f64756c6573000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002636f72652e6d0000000000000000000000000000000000000000000000000000c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4700000000000000000000000000000000000000000000000000000000000000014e7f1725e7734ce288f8367e1bb143e90bb3f0512000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", "transactionIndex": "0x0", "logIndex": "0x24", @@ -522,10 +522,10 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737400000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0x7bca8d7dabf72bfa9ff127d2d2fac95a747b5cbd45e44d820789f14a6d340d2f", + "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000566563746f720000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xfb13191ee1923726a6b8ed1da378fa03539f965239f25b547e2317a1573bb593", "transactionIndex": "0x1", "logIndex": "0x25", "transactionLogIndex": "0x0", @@ -536,10 +536,10 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c697374000000000000000000000000000000000000000000000000000000000000000000000000016000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000040000000000000e000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0x7bca8d7dabf72bfa9ff127d2d2fac95a747b5cbd45e44d820789f14a6d340d2f", + "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000566563746f72000000000000000000000000000000000000000000000000000000000000000000000000000000000220000802000404000000000000000000000000000000000000000000000000000000040100030000000000000000000000000000000000000000000000000000000008020023230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000a0000000000001a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b6579000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017900000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xfb13191ee1923726a6b8ed1da378fa03539f965239f25b547e2317a1573bb593", "transactionIndex": "0x1", "logIndex": "0x26", "transactionLogIndex": "0x1", @@ -550,10 +550,10 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000437573746f6d4572726f72735379737400000000000000000000000000000000000000000000000000000000000000010300000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0xb5f9defc11305940c4b08a6f34cdb4a671fde33905f288048b70c85b1d0875eb", + "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265720000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xc8e4e14c08d27c8a0a96b22197ae90c7bfdea04babb4f3908e5151b3731917de", "transactionIndex": "0x2", "logIndex": "0x27", "transactionLogIndex": "0x0", @@ -564,10 +564,10 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x0000000000000000000000000000000053797374656d73000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000437573746f6d4572726f72735379737400000000000000000000000000000000000000000000000000000000000000155fc8d32690cc91d4c39d9d3abcbd16989f875707010000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0xb5f9defc11305940c4b08a6f34cdb4a671fde33905f288048b70c85b1d0875eb", + "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265720000000000000000000000000000000000000000000000000000000000000000000000000000000001c000040100040000000000000000000000000000000000000000000000000000000004010003000000000000000000000000000000000000000000000000000000000401000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b65790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xc8e4e14c08d27c8a0a96b22197ae90c7bfdea04babb4f3908e5151b3731917de", "transactionIndex": "0x2", "logIndex": "0x28", "transactionLogIndex": "0x1", @@ -578,27 +578,27 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x0000000000000000000000000000000053797374656d526567697374727900000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f875707000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000437573746f6d4572726f727353797374", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0xb5f9defc11305940c4b08a6f34cdb4a671fde33905f288048b70c85b1d0875eb", - "transactionIndex": "0x2", + "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737400000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0x6f1e3ce3fa9dffb0338ddfd370a7042595004831f56e7b40bafd71a02318098a", + "transactionIndex": "0x3", "logIndex": "0x29", - "transactionLogIndex": "0x2", + "transactionLogIndex": "0x0", "removed": false }, { "address": "0x5fbdb2315678afecb367f032d93f642f64180aa3", "topics": [ - "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" + "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f87570700000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0xb5f9defc11305940c4b08a6f34cdb4a671fde33905f288048b70c85b1d0875eb", - "transactionIndex": "0x2", + "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c697374000000000000000000000000000000000000000000000000000000000000000000000000016000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000040000000000000e000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0x6f1e3ce3fa9dffb0338ddfd370a7042595004831f56e7b40bafd71a02318098a", + "transactionIndex": "0x3", "logIndex": "0x2a", - "transactionLogIndex": "0x3", + "transactionLogIndex": "0x1", "removed": false }, { @@ -606,11 +606,11 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737453797374656d00000000000000000000000000000000000000000000000000000000000000010300000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0x5e56042175cee9139c0439cc0df13d0efbdb1a57e93e5353f8fc713ea061bfce", - "transactionIndex": "0x3", + "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000437573746f6d4572726f72735379737400000000000000000000000000000000000000000000000000000000000000010300000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xd195b0a305b8b106c964cae4cfc73d612ee29d1eac4af45b7b18f2b406cf9e8d", + "transactionIndex": "0x4", "logIndex": "0x2b", "transactionLogIndex": "0x0", "removed": false @@ -620,11 +620,11 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x0000000000000000000000000000000053797374656d73000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737453797374656d00000000000000000000000000000000000000000000000000000000000000150165878a594ca255338adfa4d48449f69242eb8f010000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0x5e56042175cee9139c0439cc0df13d0efbdb1a57e93e5353f8fc713ea061bfce", - "transactionIndex": "0x3", + "data": "0x0000000000000000000000000000000053797374656d73000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000437573746f6d4572726f72735379737400000000000000000000000000000000000000000000000000000000000000155fc8d32690cc91d4c39d9d3abcbd16989f875707010000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xd195b0a305b8b106c964cae4cfc73d612ee29d1eac4af45b7b18f2b406cf9e8d", + "transactionIndex": "0x4", "logIndex": "0x2c", "transactionLogIndex": "0x1", "removed": false @@ -634,11 +634,11 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x0000000000000000000000000000000053797374656d526567697374727900000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000165878a594ca255338adfa4d48449f69242eb8f0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000004e756d6265724c69737453797374656d", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0x5e56042175cee9139c0439cc0df13d0efbdb1a57e93e5353f8fc713ea061bfce", - "transactionIndex": "0x3", + "data": "0x0000000000000000000000000000000053797374656d526567697374727900000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f875707000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000437573746f6d4572726f727353797374", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xd195b0a305b8b106c964cae4cfc73d612ee29d1eac4af45b7b18f2b406cf9e8d", + "transactionIndex": "0x4", "logIndex": "0x2d", "transactionLogIndex": "0x2", "removed": false @@ -648,11 +648,11 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000165878a594ca255338adfa4d48449f69242eb8f00000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0x5e56042175cee9139c0439cc0df13d0efbdb1a57e93e5353f8fc713ea061bfce", - "transactionIndex": "0x3", + "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f87570700000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xd195b0a305b8b106c964cae4cfc73d612ee29d1eac4af45b7b18f2b406cf9e8d", + "transactionIndex": "0x4", "logIndex": "0x2e", "transactionLogIndex": "0x3", "removed": false @@ -662,11 +662,11 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000566563746f720000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0xb3febd63ed51098bd7062390e4e859508e55a1bbfa5ee8ec197a4df93586f632", - "transactionIndex": "0x4", + "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737453797374656d00000000000000000000000000000000000000000000000000000000000000010300000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xef364e996085894e8732989635e9b8778ac91de6ea48a4ae0ff944b0229b37e6", + "transactionIndex": "0x5", "logIndex": "0x2f", "transactionLogIndex": "0x0", "removed": false @@ -676,11 +676,11 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000566563746f72000000000000000000000000000000000000000000000000000000000000000000000000000000000220000802000404000000000000000000000000000000000000000000000000000000040100030000000000000000000000000000000000000000000000000000000008020023230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000a0000000000001a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b6579000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017900000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0xb3febd63ed51098bd7062390e4e859508e55a1bbfa5ee8ec197a4df93586f632", - "transactionIndex": "0x4", + "data": "0x0000000000000000000000000000000053797374656d73000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737453797374656d00000000000000000000000000000000000000000000000000000000000000150165878a594ca255338adfa4d48449f69242eb8f010000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xef364e996085894e8732989635e9b8778ac91de6ea48a4ae0ff944b0229b37e6", + "transactionIndex": "0x5", "logIndex": "0x30", "transactionLogIndex": "0x1", "removed": false @@ -690,27 +690,27 @@ "topics": [ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265720000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0xd9aea844188d36cd599b3d9ddd523b1269131ec10ebf5b107a50bffe8a03985e", + "data": "0x0000000000000000000000000000000053797374656d526567697374727900000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000165878a594ca255338adfa4d48449f69242eb8f0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000004e756d6265724c69737453797374656d", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xef364e996085894e8732989635e9b8778ac91de6ea48a4ae0ff944b0229b37e6", "transactionIndex": "0x5", "logIndex": "0x31", - "transactionLogIndex": "0x0", + "transactionLogIndex": "0x2", "removed": false }, { "address": "0x5fbdb2315678afecb367f032d93f642f64180aa3", "topics": [ - "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" + "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], - "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265720000000000000000000000000000000000000000000000000000000000000000000000000000000001c000040100040000000000000000000000000000000000000000000000000000000004010003000000000000000000000000000000000000000000000000000000000401000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b65790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0xd9aea844188d36cd599b3d9ddd523b1269131ec10ebf5b107a50bffe8a03985e", + "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000165878a594ca255338adfa4d48449f69242eb8f00000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xef364e996085894e8732989635e9b8778ac91de6ea48a4ae0ff944b0229b37e6", "transactionIndex": "0x5", "logIndex": "0x32", - "transactionLogIndex": "0x1", + "transactionLogIndex": "0x3", "removed": false }, { @@ -719,8 +719,8 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004d756c7469000000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xa50c88a503c25f17dc6c8e4cc779f15341f6f8242da501989a64ec87a8f5a85b", "transactionIndex": "0x6", "logIndex": "0x33", @@ -733,8 +733,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004d756c74690000000000000000000000000000000000000000000000000000000000000000000000000000000000034000210200200100000000000000000000000000000000000000000000000000000034040003601f2e000000000000000000000000000000000000000000000000002102003f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000001c0000000000002c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000016100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000162000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000036e756d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0xa50c88a503c25f17dc6c8e4cc779f15341f6f8242da501989a64ec87a8f5a85b", "transactionIndex": "0x6", "logIndex": "0x34", @@ -746,10 +746,10 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001306d61a5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656d306d61a500000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0x2fc64bbab454451eca5989fa793399718795f92515de1032447065da3dec0201", + "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000015f644e3c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000437573746f6d4572726f7273537973745f644e3c00000000000000000000000000000000000000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xff27259bf2a15d32d629b5f2dce0f7b248400c760cd4a4f367670e87b4cf81fb", "transactionIndex": "0x7", "logIndex": "0x35", "transactionLogIndex": "0x0", @@ -761,8 +761,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001b8a44c7c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656db8a44c7c00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0x704d3a95376db47cabae3ba83743e46e1eb751b82a9b622af5a555e109d59a66", "transactionIndex": "0x8", "logIndex": "0x36", @@ -775,8 +775,8 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f7f0e440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656df7f0e44000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", "transactionHash": "0x39116de046d5a63b1624f2556f78148c5bfaf0011b126598d96615cbbf89dc7f", "transactionIndex": "0x9", "logIndex": "0x37", @@ -788,10 +788,10 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000015f644e3c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000437573746f6d4572726f7273537973745f644e3c00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0x6f143315ee4b6e8f64a70bf520ea301db90a677eda48a9f423bd5d1f5b4a1c28", + "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001a4ece52c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656da4ece52c00000000000000000000000000000000000000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0x3eeacc25c38ad7561bc6049feeba85a5c8b2ac50355c72d5110646394aafe62d", "transactionIndex": "0xa", "logIndex": "0x38", "transactionLogIndex": "0x0", @@ -802,10 +802,10 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001a4ece52c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656da4ece52c00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", - "transactionHash": "0x0f4f8c0ea36e9e8e88cdd2f5719f2ffa36a3698bdf7fe2b8443685d35517d6ea", + "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001306d61a5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656d306d61a500000000000000000000000000000000000000000000000000000000", + "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockNumber": "0x3", + "transactionHash": "0xf97efde38e1aaee38023ff6669c33b26ac5230f364af583b6159dfec83099c02", "transactionIndex": "0xb", "logIndex": "0x39", "transactionLogIndex": "0x0", @@ -817,8 +817,8 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000004e756d6265724c6973740000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000001a400000000000000000000000000000000000000000000000000000000", - "blockHash": "0xaff54c40af4b26fae5bfcbb5187e698f5e4a54c338fac1e9ddbcdef5eb979c6b", - "blockNumber": "0x5", + "blockHash": "0x827bd9f626a662de6e8309bd74c5e58e2f7ce281b51de8e6029ed250087220bc", + "blockNumber": "0x4", "transactionHash": "0x6b11c4b4d9257da889cd755a9aef98068339dea0770f3c43def5293c47977876", "transactionIndex": "0x0", "logIndex": "0x0", @@ -831,8 +831,8 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000004e756d6265724c6973740000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000001a400000045000000000000000000000000000000000000000000000000", - "blockHash": "0xaff54c40af4b26fae5bfcbb5187e698f5e4a54c338fac1e9ddbcdef5eb979c6b", - "blockNumber": "0x5", + "blockHash": "0x827bd9f626a662de6e8309bd74c5e58e2f7ce281b51de8e6029ed250087220bc", + "blockNumber": "0x4", "transactionHash": "0x2453e912dfab0eed54e6140d2f5c829034fe51fa844767991510eb71ecff8a3b", "transactionIndex": "0x1", "logIndex": "0x1", From 31438d997afb91761f326d1824e5db4e3a4b5a6d Mon Sep 17 00:00:00 2001 From: alvrs Date: Thu, 14 Sep 2023 22:36:12 +0100 Subject: [PATCH 19/28] update gas report --- packages/store/gas-report.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/store/gas-report.json b/packages/store/gas-report.json index b0519b048d..15c551b28a 100644 --- a/packages/store/gas-report.json +++ b/packages/store/gas-report.json @@ -716,8 +716,8 @@ { "file": "test/StoreCoreGas.t.sol", "test": "testRegisterAndGetFieldLayout", - "name": "StoreCore: get key schema (warm)", - "gasUsed": 9281 + "name": "StoreCore: get keyTuple schema (warm)", + "gasUsed": 9282 }, { "file": "test/StoreCoreGas.t.sol", From bc7975a6d52f21ac0f75c733d13af5ca3a8e37d0 Mon Sep 17 00:00:00 2001 From: alvarius Date: Thu, 14 Sep 2023 22:39:24 +0100 Subject: [PATCH 20/28] Create nice-glasses-begin.md --- .changeset/nice-glasses-begin.md | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .changeset/nice-glasses-begin.md diff --git a/.changeset/nice-glasses-begin.md b/.changeset/nice-glasses-begin.md new file mode 100644 index 0000000000..3ea9e5290d --- /dev/null +++ b/.changeset/nice-glasses-begin.md @@ -0,0 +1,39 @@ +--- +"@latticexyz/block-logs-stream": patch +"@latticexyz/store-sync": patch +"@latticexyz/store": patch +"@latticexyz/world": patch +--- + +Renamed all occurrences of `key` where it is used as "key tuple" to `keyTuple`. +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 tableId, +- bytes32[] key, ++ bytes32[] keyTuple, + bytes data +); + +event StoreSetField( + bytes32 tableId, +- bytes32[] key, ++ bytes32[] keyTuple, + uint8 fieldIndex, + bytes data +); + +event StoreDeleteRecord( + bytes32 tableId, +- bytes32[] key, ++ bytes32[] keyTuple, +); + +event StoreEphemeralRecord( + bytes32 tableId, +- bytes32[] key, ++ bytes32[] keyTuple, + bytes data +); +``` From 036387b72d699605005d41de1e0374ddb43a5494 Mon Sep 17 00:00:00 2001 From: alvrs Date: Fri, 15 Sep 2023 11:00:40 +0100 Subject: [PATCH 21/28] review feedback --- packages/store/test/StoreCoreGas.t.sol | 42 +++++++++---------- .../modules/keysintable/KeysInTableHook.sol | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/store/test/StoreCoreGas.t.sol b/packages/store/test/StoreCoreGas.t.sol index 122e0127cf..58f768d935 100644 --- a/packages/store/test/StoreCoreGas.t.sol +++ b/packages/store/test/StoreCoreGas.t.sol @@ -52,7 +52,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { fieldNames[2] = "value3"; fieldNames[3] = "value4"; - startGasReport("StoreCore: register tableId"); + startGasReport("StoreCore: Register table"); StoreCore.registerTable(tableId, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); endGasReport(); @@ -78,15 +78,15 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { ); FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(1, 2, 1, 2, 0); bytes32 tableId = keccak256("some.tableId"); - bytes32 table2 = keccak256("other.tableId"); + bytes32 tableId2 = keccak256("other.tableId"); StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](4)); - startGasReport("Check for existence of tableId (existent)"); + startGasReport("Check for existence of table (existent)"); StoreCore.hasTable(tableId); endGasReport(); - startGasReport("check for existence of tableId (non-existent)"); - StoreCore.hasTable(table2); + startGasReport("check for existence of table (non-existent)"); + StoreCore.hasTable(tableId2); endGasReport(); } @@ -103,7 +103,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(1, 2, 4, 2); - // Register tableId + // Register table StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](5)); // Create some key @@ -127,7 +127,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { } function testSetAndGetStaticData() public { - // Register tableId + // Register table Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT8, SchemaType.UINT16, @@ -154,7 +154,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { } function testSetAndGetStaticDataSpanningWords() public { - // Register tableId + // Register table Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128, SchemaType.UINT256); FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 32, 0); bytes32 tableId = keccak256("some.tableId"); @@ -182,7 +182,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { function testSetAndGetDynamicData() public { bytes32 tableId = keccak256("some.tableId"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, @@ -258,7 +258,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { function testSetAndGetField() public { bytes32 tableId = keccak256("some.tableId"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, @@ -348,7 +348,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { function testDeleteData() public { bytes32 tableId = keccak256("some.tableId"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, @@ -405,7 +405,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { function testPushToField() public { bytes32 tableId = keccak256("some.tableId"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT256, @@ -492,7 +492,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { TestUpdateInFieldData memory data = TestUpdateInFieldData("", "", "", "", "", "", ""); bytes32 tableId = keccak256("some.tableId"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT256, @@ -602,7 +602,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some key"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 0); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128); StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](1)); @@ -634,17 +634,17 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes memory data = abi.encodePacked(bytes16(0x0102030405060708090a0b0c0d0e0f10)); - startGasReport("set record on tableId with subscriber"); + startGasReport("set record on table with subscriber"); StoreCore.setRecord(tableId, key, data, fieldLayout); endGasReport(); data = abi.encodePacked(bytes16(0x1112131415161718191a1b1c1d1e1f20)); - startGasReport("set static field on tableId with subscriber"); + startGasReport("set static field on table with subscriber"); StoreCore.setField(tableId, key, 0, data, fieldLayout); endGasReport(); - startGasReport("delete record on tableId with subscriber"); + startGasReport("delete record on table with subscriber"); StoreCore.deleteRecord(tableId, key, fieldLayout); endGasReport(); } @@ -654,7 +654,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some key"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 1); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128, SchemaType.UINT32_ARRAY); StoreCore.registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); @@ -692,7 +692,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { bytes memory staticData = abi.encodePacked(bytes16(0x0102030405060708090a0b0c0d0e0f10)); bytes memory data = abi.encodePacked(staticData, dynamicData); - startGasReport("set (dynamic) record on tableId with subscriber"); + startGasReport("set (dynamic) record on table with subscriber"); StoreCore.setRecord(tableId, key, data, fieldLayout); endGasReport(); @@ -702,11 +702,11 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { dynamicData = abi.encodePacked(encodedArrayDataLength.unwrap(), arrayDataBytes); data = abi.encodePacked(staticData, dynamicData); - startGasReport("set (dynamic) field on tableId with subscriber"); + startGasReport("set (dynamic) field on table with subscriber"); StoreCore.setField(tableId, key, 1, arrayDataBytes, fieldLayout); endGasReport(); - startGasReport("delete (dynamic) record on tableId with subscriber"); + startGasReport("delete (dynamic) record on table with subscriber"); StoreCore.deleteRecord(tableId, key, fieldLayout); endGasReport(); } diff --git a/packages/world/src/modules/keysintable/KeysInTableHook.sol b/packages/world/src/modules/keysintable/KeysInTableHook.sol index 1953bea6ea..706ebac740 100644 --- a/packages/world/src/modules/keysintable/KeysInTableHook.sol +++ b/packages/world/src/modules/keysintable/KeysInTableHook.sol @@ -8,7 +8,7 @@ import { KeysInTable } from "./tables/KeysInTable.sol"; import { UsedKeysIndex } from "./tables/UsedKeysIndex.sol"; /** - * Note: if a tableId with composite keys is used, only the first key is indexed + * Note: if a table with composite keys is used, only the first key is indexed */ contract KeysInTableHook is StoreHook { function handleSet(bytes32 tableId, bytes32[] memory key) internal { From 8a8fa98738ff112b63132408a06ff3abc455e9cf Mon Sep 17 00:00:00 2001 From: alvrs Date: Fri, 15 Sep 2023 11:17:58 +0100 Subject: [PATCH 22/28] remove more instances of tableId and revert invalid ones --- packages/store/src/StoreCore.sol | 2 +- packages/store/test/StoreCore.t.sol | 40 ++++++++++---------- packages/world/test/World.t.sol | 24 ++---------- packages/world/test/WorldDynamicUpdate.t.sol | 12 +----- 4 files changed, 26 insertions(+), 52 deletions(-) diff --git a/packages/store/src/StoreCore.sol b/packages/store/src/StoreCore.sol index 112ab25a0f..46f010e9e8 100644 --- a/packages/store/src/StoreCore.sol +++ b/packages/store/src/StoreCore.sol @@ -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/test/StoreCore.t.sol b/packages/store/test/StoreCore.t.sol index 2737f417f2..ad1b84685b 100644 --- a/packages/store/test/StoreCore.t.sol +++ b/packages/store/test/StoreCore.t.sol @@ -160,11 +160,11 @@ contract StoreCoreTest is Test, StoreMock { string[] memory fourNames = new string[](4); string[] memory oneName = new string[](1); - // Register tableId with invalid key names + // Register table with invalid key names vm.expectRevert(abi.encodeWithSelector(IStoreErrors.StoreCore_InvalidKeyNamesLength.selector, 4, 1)); IStore(this).registerTable(tableId, fieldLayout, keySchema, valueSchema, oneName, oneName); - // Register tableId with invalid value names + // Register table with invalid value names vm.expectRevert(abi.encodeWithSelector(IStoreErrors.StoreCore_InvalidFieldNamesLength.selector, 1, 4)); IStore(this).registerTable(tableId, fieldLayout, keySchema, valueSchema, fourNames, fourNames); } @@ -181,7 +181,7 @@ contract StoreCoreTest is Test, StoreMock { SchemaType.UINT32_ARRAY ); - // Register tableId + // Register table IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](5)); // Create some key @@ -214,7 +214,7 @@ contract StoreCoreTest is Test, StoreMock { } function testSetAndGetStaticData() public { - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(1, 2, 1, 2, 0); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT8, @@ -245,7 +245,7 @@ contract StoreCoreTest is Test, StoreMock { } function testFailSetAndGetStaticData() public { - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(1, 2, 1, 2, 0); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT8, @@ -267,7 +267,7 @@ contract StoreCoreTest is Test, StoreMock { } function testSetAndGetStaticDataSpanningWords() public { - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 32, 0); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128, SchemaType.UINT256); bytes32 tableId = keccak256("some.tableId"); @@ -297,7 +297,7 @@ contract StoreCoreTest is Test, StoreMock { function testSetAndGetDynamicData() public { bytes32 tableId = keccak256("some.tableId"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, @@ -372,7 +372,7 @@ contract StoreCoreTest is Test, StoreMock { function testSetAndGetField() public { bytes32 tableId = keccak256("some.tableId"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, @@ -512,7 +512,7 @@ contract StoreCoreTest is Test, StoreMock { function testDeleteData() public { bytes32 tableId = keccak256("some.tableId"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT128, @@ -596,7 +596,7 @@ contract StoreCoreTest is Test, StoreMock { data.tableId = keccak256("some.tableId"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT256, @@ -736,7 +736,7 @@ contract StoreCoreTest is Test, StoreMock { data.tableId = keccak256("some.tableId"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(32, 2); Schema valueSchema = SchemaEncodeHelper.encode( SchemaType.UINT256, @@ -882,7 +882,7 @@ contract StoreCoreTest is Test, StoreMock { bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some key"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 0); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128); IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](1)); @@ -914,7 +914,7 @@ contract StoreCoreTest is Test, StoreMock { IStore(this).setRecord(tableId, key, data, fieldLayout); - // Get data from indexed tableId - the indexer should have mirrored the data there + // Get data from indexed table - the indexer should have mirrored the data there bytes memory indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); assertEq(keccak256(data), keccak256(indexedData)); @@ -922,13 +922,13 @@ contract StoreCoreTest is Test, StoreMock { IStore(this).setField(tableId, key, 0, data, fieldLayout); - // Get data from indexed tableId - the indexer should have mirrored the data there + // 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(tableId, key, fieldLayout); - // Get data from indexed tableId - the indexer should have mirrored the data there + // Get data from indexed table - the indexer should have mirrored the data there indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); assertEq(keccak256(indexedData), keccak256(abi.encodePacked(bytes16(0)))); } @@ -938,7 +938,7 @@ contract StoreCoreTest is Test, StoreMock { bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some key"); - // Register tableId's value schema + // Register table's value schema FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 0); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128); IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](1)); @@ -1027,7 +1027,7 @@ contract StoreCoreTest is Test, StoreMock { bytes32[] memory key = new bytes32[](1); key[0] = keccak256("some key"); - // Register tableId + // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 1); Schema valueSchema = SchemaEncodeHelper.encode(SchemaType.UINT128, SchemaType.UINT32_ARRAY); IStore(this).registerTable(tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](2)); @@ -1065,7 +1065,7 @@ contract StoreCoreTest is Test, StoreMock { IStore(this).setRecord(tableId, key, data, fieldLayout); - // Get data from indexed tableId - the indexer should have mirrored the data there + // Get data from indexed table - the indexer should have mirrored the data there bytes memory indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); assertEq(keccak256(data), keccak256(indexedData)); @@ -1077,13 +1077,13 @@ contract StoreCoreTest is Test, StoreMock { IStore(this).setField(tableId, key, 1, arrayDataBytes, fieldLayout); - // Get data from indexed tableId - the indexer should have mirrored the data there + // 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(tableId, key, fieldLayout); - // Get data from indexed tableId - the indexer should have mirrored the data there + // Get data from indexed table - the indexer should have mirrored the data there indexedData = IStore(this).getRecord(indexerTableId, key, fieldLayout); assertEq(keccak256(indexedData), keccak256(abi.encodePacked(bytes16(0)))); } 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); From fb85f1064c0ad9f77c66a76e147ac261ede29bd7 Mon Sep 17 00:00:00 2001 From: alvrs Date: Fri, 15 Sep 2023 11:28:36 +0100 Subject: [PATCH 23/28] gas report --- packages/store/gas-report.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/store/gas-report.json b/packages/store/gas-report.json index b0519b048d..0c0fea234d 100644 --- a/packages/store/gas-report.json +++ b/packages/store/gas-report.json @@ -626,13 +626,13 @@ { "file": "test/StoreCoreGas.t.sol", "test": "testHasFieldLayout", - "name": "Check for existence of tableId (existent)", + "name": "Check for existence of table (existent)", "gasUsed": 4465 }, { "file": "test/StoreCoreGas.t.sol", "test": "testHasFieldLayout", - "name": "check for existence of tableId (non-existent)", + "name": "check for existence of table (non-existent)", "gasUsed": 6468 }, { @@ -644,19 +644,19 @@ { "file": "test/StoreCoreGas.t.sol", "test": "testHooks", - "name": "set record on tableId with subscriber", + "name": "set record on table with subscriber", "gasUsed": 73748 }, { "file": "test/StoreCoreGas.t.sol", "test": "testHooks", - "name": "set static field on tableId with subscriber", + "name": "set static field on table with subscriber", "gasUsed": 25441 }, { "file": "test/StoreCoreGas.t.sol", "test": "testHooks", - "name": "delete record on tableId with subscriber", + "name": "delete record on table with subscriber", "gasUsed": 21483 }, { @@ -668,20 +668,20 @@ { "file": "test/StoreCoreGas.t.sol", "test": "testHooksDynamicData", - "name": "set (dynamic) record on tableId with subscriber", + "name": "set (dynamic) record on table with subscriber", "gasUsed": 167808 }, { "file": "test/StoreCoreGas.t.sol", "test": "testHooksDynamicData", - "name": "set (dynamic) field on tableId with subscriber", + "name": "set (dynamic) field on table with subscriber", "gasUsed": 28269 }, { "file": "test/StoreCoreGas.t.sol", "test": "testHooksDynamicData", - "name": "delete (dynamic) record on tableId with subscriber", - "gasUsed": 22905 + "name": "delete (dynamic) record on table with subscriber", + "gasUsed": 22901 }, { "file": "test/StoreCoreGas.t.sol", @@ -698,7 +698,7 @@ { "file": "test/StoreCoreGas.t.sol", "test": "testRegisterAndGetFieldLayout", - "name": "StoreCore: register tableId", + "name": "StoreCore: Register table", "gasUsed": 620356 }, { From a8e358c06ccbefdde222f1188cd91bbb18ac4d95 Mon Sep 17 00:00:00 2001 From: alvrs Date: Fri, 15 Sep 2023 11:42:34 +0100 Subject: [PATCH 24/28] cleanup --- docs/pages/store/reading-and-writing.mdx | 34 ++++++++++++------------ packages/store/gas-report.json | 4 +-- packages/store/test/StoreCore.t.sol | 28 +++++++++---------- packages/store/test/StoreCoreGas.t.sol | 18 ++++++------- 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/docs/pages/store/reading-and-writing.mdx b/docs/pages/store/reading-and-writing.mdx index e8bebae0c1..4a5f8aba82 100644 --- a/docs/pages/store/reading-and-writing.mdx +++ b/docs/pages/store/reading-and-writing.mdx @@ -41,55 +41,55 @@ barArray[0] = 69; barArray[1] = 85; fooArray[0] = 42; // args: keyTuple, foo, bar, fooArray, staticArray -MyTable.set(keccak256("some.keyTuple"), 45, false, fooArray, barArray); +MyTable.set("some.key", 45, false, fooArray, barArray); ``` **Setting a field** ```solidity // Setting foo -MyTable.setFoo(keccak256("some.keyTuple"), 33); +MyTable.setFoo("some.key", 33); // Setting bar -MyTable.setBar(keccak256("some.keyTuple"), false); +MyTable.setBar("some.key", false); // Setting fooArray uint256[] memory fooArray = new uint256[](3); fooArray[0] = 42; fooArray[1] = 15; fooArray[2] = 3; -MyTable.setFooArray(keccak256("some.keyTuple"), fooArray); +MyTable.setFooArray("some.key", fooArray); ``` **Operations on dynamic arrays** ```solidity -MyTable.pushFooArray(keccak256("some.keyTuple"), 4242); // adds 4242 at end of fooArray -MyTable.popFooArray(keccak256("some.keyTuple")); // pop fooArray -MyTable.setItemFooArray(keccak256("some.keyTuple"), 0, 123); // set fooArray[0] to 123 +MyTable.pushFooArray("some.key", 4242); // adds 4242 at end of fooArray +MyTable.popFooArray("some.key"); // pop fooArray +MyTable.setItemFooArray("some.key", 0, 123); // set fooArray[0] to 123 ``` **Retrieving a record** ```solidity // Retrieving a record -MyTable.get(keccak256("some.keyTuple")); +MyTable.get("some.key"); ``` **Retrieving a field** ```solidity // Retrieve foo -MyTable.getFoo(keccak256("some.keyTuple")); +MyTable.getFoo("some.key"); // Retrieve bar -MyTable.getBar(keccak256("some.keyTuple")); +MyTable.getBar("some.key"); // Retrieve an element of fooArray -MyTable.getItemFooArray(keccak256("some.keyTuple"), 0); // get fooArray[0] +MyTable.getItemFooArray("some.key", 0); // get fooArray[0] ``` **Deleting a record** ```solidity // Deleting a record -MyTable.deleteRecord(keccak256("some.keyTuple")); +MyTable.deleteRecord("some.key"); ``` ### Access to Store via low-level API @@ -121,7 +121,7 @@ uint256 tableId = uint256(keccak256("MyTable")); uint256 foo = 10; uint256 bar = 24; bytes32[] memory keyTuple = new bytes32[](1); -keyTuple[0] = keccak256("some.keyTuple"); +keyTuple[0] = "some.key"; // Setting a record StoreSwitch.setRecord(tableId, keyTuple, abi.encodePacked((foo, bar))); ``` @@ -133,7 +133,7 @@ uint256 tableId = uint256(keccak256("MyTable")); uint256 foo = 45; uint256 foo = 67; bytes32[] memory keyTuple = new bytes32[](1); -keyTuple[0] = keccak256("some.keyTuple"); +keyTuple[0] = "some.key"; // Setting foo StoreSwitch.setField(tableId, keyTuple, 0, abi.encodePacked((foo))); // Setting bar @@ -145,7 +145,7 @@ StoreSwitch.setField(tableId, keyTuple, 1, abi.encodePacked((bar))); ```solidity uint256 tableId = uint256(keccak256("MyTable")); bytes32[] memory keyTuple = new bytes32[](1); -keyTuple[0] = keccak256("some.keyTuple"); +keyTuple[0] = "some.key"; // Retrieve a record Schema valueSchema = SchemaLib.encode(SchemaType.UINT256, SchemaType.UINT256); bytes memory loadedData = StoreCore.getRecord(tableId, keyTuple, valueSchema); @@ -158,7 +158,7 @@ uint256 bar = (uint256(Bytes.slice4(loadedData, 32))); ```solidity uint256 tableId = uint256(keccak256("MyTable")); bytes32[] memory keyTuple = new bytes32[](1); -keyTuple[0] = keccak256("some.keyTuple"); +keyTuple[0] = "some.key"; // Retrieve foo bytes memory loadedDatafoo = StoreCore.getField(tableId, keyTuple, 0); int32 foo = (uint32(Bytes.slice4(loadedDatafoo, 0))); @@ -172,7 +172,7 @@ int32 bar = (uint32(Bytes.slice4(loadedData, 0))); ```solidity uint256 tableId = uint256(keccak256("MyTable")); bytes32[] memory keyTuple = new bytes32[](1); -keyTuple[0] = keccak256("some.keyTuple"); +keyTuple[0] = "some.key"; // Deleting a record StoreCore.deleteRecord(tableId, keyTuple); ``` diff --git a/packages/store/gas-report.json b/packages/store/gas-report.json index c7ce0f237a..0c0fea234d 100644 --- a/packages/store/gas-report.json +++ b/packages/store/gas-report.json @@ -716,8 +716,8 @@ { "file": "test/StoreCoreGas.t.sol", "test": "testRegisterAndGetFieldLayout", - "name": "StoreCore: get keyTuple schema (warm)", - "gasUsed": 9282 + "name": "StoreCore: get key schema (warm)", + "gasUsed": 9281 }, { "file": "test/StoreCoreGas.t.sol", diff --git a/packages/store/test/StoreCore.t.sol b/packages/store/test/StoreCore.t.sol index f8de46c84c..6f502597f2 100644 --- a/packages/store/test/StoreCore.t.sol +++ b/packages/store/test/StoreCore.t.sol @@ -91,7 +91,7 @@ contract StoreCoreTest is Test, StoreMock { IStore(this).registerTable( keccak256("tableId"), FieldLayout.wrap(keccak256("random bytes as value field layout")), - Schema.wrap(keccak256("random bytes as keyTuple schema")), + Schema.wrap(keccak256("random bytes as key schema")), Schema.wrap(keccak256("random bytes as value schema")), keyNames, fieldNames @@ -186,7 +186,7 @@ contract StoreCoreTest is Test, StoreMock { // Create some keyTuple bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = bytes32("some keyTuple"); + keyTuple[0] = bytes32("some key"); // Set dynamic data length of dynamic index 0 StoreCoreInternal._setDynamicDataLengthAtIndex(tableId, keyTuple, 0, 10); @@ -230,7 +230,7 @@ contract StoreCoreTest is Test, StoreMock { bytes memory data = abi.encodePacked(bytes1(0x01), bytes2(0x0203), bytes1(0x04), bytes2(0x0506)); bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = keccak256("some.keyTuple"); + keyTuple[0] = "some key"; // Expect a StoreSetRecord event to be emitted vm.expectEmit(true, true, true, true); @@ -260,7 +260,7 @@ contract StoreCoreTest is Test, StoreMock { bytes memory data = abi.encodePacked(bytes1(0x01), bytes2(0x0203), bytes1(0x04)); bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = keccak256("some.keyTuple"); + keyTuple[0] = "some key"; // This should fail because the data is not 6 bytes long IStore(this).setRecord(tableId, keyTuple, data, fieldLayout); @@ -280,7 +280,7 @@ contract StoreCoreTest is Test, StoreMock { ); bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = keccak256("some.keyTuple"); + keyTuple[0] = "some key"; // Expect a StoreSetRecord event to be emitted vm.expectEmit(true, true, true, true); @@ -340,7 +340,7 @@ contract StoreCoreTest is Test, StoreMock { // Create keyTuple bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = bytes32("some.keyTuple"); + keyTuple[0] = bytes32("some key"); // Expect a StoreSetRecord event to be emitted vm.expectEmit(true, true, true, true); @@ -386,7 +386,7 @@ contract StoreCoreTest is Test, StoreMock { // Create keyTuple bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = bytes32("some.keyTuple"); + keyTuple[0] = bytes32("some key"); bytes memory firstDataPacked = abi.encodePacked(firstDataBytes); @@ -555,7 +555,7 @@ contract StoreCoreTest is Test, StoreMock { // Create keyTuple bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = bytes32("some.keyTuple"); + keyTuple[0] = bytes32("some key"); // Set data IStore(this).setRecord(tableId, keyTuple, data, fieldLayout); @@ -614,7 +614,7 @@ contract StoreCoreTest is Test, StoreMock { // Create keyTuple data.keyTuple = new bytes32[](1); - data.keyTuple[0] = bytes32("some.keyTuple"); + data.keyTuple[0] = bytes32("some key"); // Create data data.firstDataBytes = keccak256("some data"); @@ -754,7 +754,7 @@ contract StoreCoreTest is Test, StoreMock { // Create keyTuple data.keyTuple = new bytes32[](1); - data.keyTuple[0] = bytes32("some.keyTuple"); + data.keyTuple[0] = bytes32("some key"); // Create data data.firstDataBytes = keccak256("some data"); @@ -859,7 +859,7 @@ contract StoreCoreTest is Test, StoreMock { // Create keyTuple bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = bytes32("some.keyTuple"); + keyTuple[0] = bytes32("some key"); bytes memory data1 = IStore(this).getRecord(tableId, keyTuple, fieldLayout); assertEq(data1.length, fieldLayout.staticDataLength()); @@ -880,7 +880,7 @@ contract StoreCoreTest is Test, StoreMock { function testRegisterHook() public { bytes32 tableId = keccak256("some.tableId"); bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = keccak256("some keyTuple"); + keyTuple[0] = "some key"; // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 0); @@ -936,7 +936,7 @@ contract StoreCoreTest is Test, StoreMock { function testUnregisterHook() public { bytes32 tableId = keccak256("some.tableId"); bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = keccak256("some keyTuple"); + keyTuple[0] = "some key"; // Register table's value schema FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 0); @@ -1025,7 +1025,7 @@ contract StoreCoreTest is Test, StoreMock { function testHooksDynamicData() public { bytes32 tableId = keccak256("some.tableId"); bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = keccak256("some keyTuple"); + keyTuple[0] = "some key"; // Register table FieldLayout fieldLayout = FieldLayoutEncodeHelper.encode(16, 1); diff --git a/packages/store/test/StoreCoreGas.t.sol b/packages/store/test/StoreCoreGas.t.sol index c1879cd931..857b5f27a1 100644 --- a/packages/store/test/StoreCoreGas.t.sol +++ b/packages/store/test/StoreCoreGas.t.sol @@ -64,7 +64,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { StoreCore.getValueSchema(tableId); endGasReport(); - startGasReport("StoreCore: get keyTuple schema (warm)"); + startGasReport("StoreCore: get key schema (warm)"); StoreCore.getKeySchema(tableId); endGasReport(); } @@ -141,7 +141,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Set data bytes memory data = abi.encodePacked(bytes1(0x01), bytes2(0x0203), bytes1(0x04), bytes2(0x0506)); bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = keccak256("some.keyTuple"); + keyTuple[0] = "some key"; startGasReport("set static record (1 slot)"); StoreCore.setRecord(tableId, keyTuple, data, fieldLayout); @@ -167,7 +167,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { ); bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = keccak256("some.keyTuple"); + keyTuple[0] = "some key"; startGasReport("set static record (2 slots)"); StoreCore.setRecord(tableId, keyTuple, data, fieldLayout); @@ -225,7 +225,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Create keyTuple bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = bytes32("some.keyTuple"); + keyTuple[0] = "some key"; // Set data startGasReport("set complex record with dynamic data (4 slots)"); @@ -272,7 +272,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Create keyTuple bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = bytes32("some.keyTuple"); + keyTuple[0] = "some key"; bytes memory firstDataPacked = abi.encodePacked(firstDataBytes); @@ -391,7 +391,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Create keyTuple bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = bytes32("some.keyTuple"); + keyTuple[0] = "some key"; // Set data StoreCore.setRecord(tableId, keyTuple, data, fieldLayout); @@ -416,7 +416,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Create keyTuple bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = bytes32("some.keyTuple"); + keyTuple[0] = "some key"; // Create data bytes32 firstDataBytes = keccak256("some data"); @@ -503,7 +503,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Create keyTuple bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = bytes32("some.keyTuple"); + keyTuple[0] = "some key"; // Create data data.firstDataBytes = keccak256("some data"); @@ -574,7 +574,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { // Create keyTuple bytes32[] memory keyTuple = new bytes32[](1); - keyTuple[0] = bytes32("some.keyTuple"); + keyTuple[0] = "some key"; startGasReport("access non-existing record"); StoreCore.getRecord(tableId, keyTuple, fieldLayout); From c90a449f47235803840dd7f699300eb4d980aaed Mon Sep 17 00:00:00 2001 From: alvrs Date: Fri, 15 Sep 2023 11:53:35 +0100 Subject: [PATCH 25/28] cleanup --- .../store-sync/src/recs/recsStorage.test.ts | 2 - packages/store/test/StoreCoreDynamic.t.sol | 60 +++++++++---------- .../modules/keysintable/KeysInTableHook.sol | 4 +- 3 files changed, 32 insertions(+), 34 deletions(-) diff --git a/packages/store-sync/src/recs/recsStorage.test.ts b/packages/store-sync/src/recs/recsStorage.test.ts index 963260acc4..3b8e401444 100644 --- a/packages/store-sync/src/recs/recsStorage.test.ts +++ b/packages/store-sync/src/recs/recsStorage.test.ts @@ -20,8 +20,6 @@ const worldLogs = worldRpcLogs.map((log) => { return formatLog(log as any as RpcLog, { args, eventName: eventName as string }) as StoreEventsLog; }); -console.log("world logs", worldLogs); - describe("recsStorage", () => { it("creates components", async () => { const world = createWorld(); diff --git a/packages/store/test/StoreCoreDynamic.t.sol b/packages/store/test/StoreCoreDynamic.t.sol index 3af1a9bd01..28c25130a0 100644 --- a/packages/store/test/StoreCoreDynamic.t.sol +++ b/packages/store/test/StoreCoreDynamic.t.sol @@ -16,7 +16,7 @@ import { SchemaEncodeHelper } from "./SchemaEncodeHelper.sol"; contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { Schema internal defaultKeySchema = SchemaEncodeHelper.encode(SchemaType.BYTES32); - bytes32[] internal _key; + bytes32[] internal _keyTuple; bytes32 internal _tableId = keccak256("some.tableId"); bytes32 internal firstDataBytes; @@ -47,8 +47,8 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { StoreCore.registerTable(_tableId, fieldLayout, defaultKeySchema, valueSchema, new string[](1), new string[](3)); // Create keyTuple - _key = new bytes32[](1); - _key[0] = bytes32("some.key"); + _keyTuple = new bytes32[](1); + _keyTuple[0] = bytes32("some.key"); // Initialize the data in setUp so that slots aren't warm in tests (to test cold update) @@ -73,10 +73,10 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { thirdDataBytes = EncodeArray.encode(thirdData); // Set fields - StoreCore.setField(_tableId, _key, 0, abi.encodePacked(firstDataBytes), fieldLayout); - StoreCore.setField(_tableId, _key, 1, secondDataBytes, fieldLayout); + StoreCore.setField(_tableId, _keyTuple, 0, abi.encodePacked(firstDataBytes), fieldLayout); + StoreCore.setField(_tableId, _keyTuple, 1, secondDataBytes, fieldLayout); // Initialize a field with push - StoreCore.pushToField(_tableId, _key, 2, thirdDataBytes, fieldLayout); + StoreCore.pushToField(_tableId, _keyTuple, 2, thirdDataBytes, fieldLayout); } function testPopFromSecondField() public { @@ -92,30 +92,30 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { // Expect a StoreSetField event to be emitted vm.expectEmit(true, true, true, true); - emit StoreSetField(_tableId, _key, 1, newDataBytes); + emit StoreSetField(_tableId, _keyTuple, 1, newDataBytes); // Pop from second field startGasReport("pop from field (cold, 1 slot, 1 uint32 item)"); - StoreCore.popFromField(_tableId, _key, 1, byteLengthToPop, fieldLayout); + StoreCore.popFromField(_tableId, _keyTuple, 1, byteLengthToPop, fieldLayout); endGasReport(); // Get second field - bytes memory loadedData = StoreCore.getField(_tableId, _key, 1, fieldLayout); + bytes memory loadedData = StoreCore.getField(_tableId, _keyTuple, 1, fieldLayout); // Verify loaded data is correct assertEq(loadedData, newDataBytes); // Reset the second field and pop again (but warm this time) - StoreCore.setField(_tableId, _key, 1, dataBytes, fieldLayout); + StoreCore.setField(_tableId, _keyTuple, 1, dataBytes, fieldLayout); startGasReport("pop from field (warm, 1 slot, 1 uint32 item)"); - StoreCore.popFromField(_tableId, _key, 1, byteLengthToPop, fieldLayout); + StoreCore.popFromField(_tableId, _keyTuple, 1, byteLengthToPop, fieldLayout); endGasReport(); // Get second field - loadedData = StoreCore.getField(_tableId, _key, 1, fieldLayout); + loadedData = StoreCore.getField(_tableId, _keyTuple, 1, fieldLayout); // Verify loaded data is correct assertEq(loadedData, newDataBytes); // Verify none of the other fields were impacted - assertEq(bytes32(StoreCore.getField(_tableId, _key, 0, fieldLayout)), firstDataBytes); - assertEq(StoreCore.getField(_tableId, _key, 2, fieldLayout), thirdDataBytes); + assertEq(bytes32(StoreCore.getField(_tableId, _keyTuple, 0, fieldLayout)), firstDataBytes); + assertEq(StoreCore.getField(_tableId, _keyTuple, 2, fieldLayout), thirdDataBytes); } function testPopFromThirdField() public { @@ -131,39 +131,39 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { // Expect a StoreSetField event to be emitted after pop vm.expectEmit(true, true, true, true); - emit StoreSetField(_tableId, _key, 2, dataBytes); + emit StoreSetField(_tableId, _keyTuple, 2, dataBytes); // Pop from the field startGasReport("pop from field (cold, 2 slots, 10 uint32 items)"); - StoreCore.popFromField(_tableId, _key, 2, byteLengthToPop, fieldLayout); + StoreCore.popFromField(_tableId, _keyTuple, 2, byteLengthToPop, fieldLayout); endGasReport(); // Load and verify the field - bytes memory loadedData = StoreCore.getField(_tableId, _key, 2, fieldLayout); + bytes memory loadedData = StoreCore.getField(_tableId, _keyTuple, 2, fieldLayout); assertEq(loadedData, newDataBytes); // Reset the field and pop again (but warm this time) - StoreCore.setField(_tableId, _key, 2, dataBytes, fieldLayout); + StoreCore.setField(_tableId, _keyTuple, 2, dataBytes, fieldLayout); startGasReport("pop from field (warm, 2 slots, 10 uint32 items)"); - StoreCore.popFromField(_tableId, _key, 2, byteLengthToPop, fieldLayout); + StoreCore.popFromField(_tableId, _keyTuple, 2, byteLengthToPop, fieldLayout); endGasReport(); // Load and verify the field - loadedData = StoreCore.getField(_tableId, _key, 2, fieldLayout); + loadedData = StoreCore.getField(_tableId, _keyTuple, 2, fieldLayout); assertEq(loadedData, newDataBytes); // Verify none of the other fields were impacted - assertEq(bytes32(StoreCore.getField(_tableId, _key, 0, fieldLayout)), firstDataBytes); - assertEq(StoreCore.getField(_tableId, _key, 1, fieldLayout), secondDataBytes); + assertEq(bytes32(StoreCore.getField(_tableId, _keyTuple, 0, fieldLayout)), firstDataBytes); + assertEq(StoreCore.getField(_tableId, _keyTuple, 1, fieldLayout), secondDataBytes); } function testGetSecondFieldLength() public { FieldLayout fieldLayout = StoreCore.getFieldLayout(_tableId); startGasReport("get field length (cold, 1 slot)"); - uint256 length = StoreCore.getFieldLength(_tableId, _key, 1, fieldLayout); + uint256 length = StoreCore.getFieldLength(_tableId, _keyTuple, 1, fieldLayout); endGasReport(); assertEq(length, secondDataBytes.length); startGasReport("get field length (warm, 1 slot)"); - length = StoreCore.getFieldLength(_tableId, _key, 1, fieldLayout); + length = StoreCore.getFieldLength(_tableId, _keyTuple, 1, fieldLayout); endGasReport(); assertEq(length, secondDataBytes.length); } @@ -172,11 +172,11 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { FieldLayout fieldLayout = StoreCore.getFieldLayout(_tableId); startGasReport("get field length (warm due to , 2 slots)"); - uint256 length = StoreCore.getFieldLength(_tableId, _key, 2, fieldLayout); + uint256 length = StoreCore.getFieldLength(_tableId, _keyTuple, 2, fieldLayout); endGasReport(); assertEq(length, thirdDataBytes.length); startGasReport("get field length (warm, 2 slots)"); - length = StoreCore.getFieldLength(_tableId, _key, 2, fieldLayout); + length = StoreCore.getFieldLength(_tableId, _keyTuple, 2, fieldLayout); endGasReport(); assertEq(length, thirdDataBytes.length); } @@ -185,20 +185,20 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock { FieldLayout fieldLayout = StoreCore.getFieldLayout(_tableId); startGasReport("get field slice (cold, 1 slot)"); - bytes memory secondFieldSlice = StoreCore.getFieldSlice(_tableId, _key, 1, fieldLayout, 0, 4); + bytes memory secondFieldSlice = StoreCore.getFieldSlice(_tableId, _keyTuple, 1, fieldLayout, 0, 4); endGasReport(); assertEq(secondFieldSlice, SliceLib.getSubslice(secondDataBytes, 0, 4).toBytes()); startGasReport("get field slice (warm, 1 slot)"); - secondFieldSlice = StoreCore.getFieldSlice(_tableId, _key, 1, fieldLayout, 4, 8); + secondFieldSlice = StoreCore.getFieldSlice(_tableId, _keyTuple, 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(_tableId, _key, 2, fieldLayout, 4, 32); + bytes memory thirdFieldSlice = StoreCore.getFieldSlice(_tableId, _keyTuple, 2, fieldLayout, 4, 32); endGasReport(); assertEq(thirdFieldSlice, SliceLib.getSubslice(thirdDataBytes, 4, 32).toBytes()); startGasReport("get field slice (warm, 2 slots)"); - thirdFieldSlice = StoreCore.getFieldSlice(_tableId, _key, 2, fieldLayout, 8, 40); + thirdFieldSlice = StoreCore.getFieldSlice(_tableId, _keyTuple, 2, fieldLayout, 8, 40); endGasReport(); assertEq(thirdFieldSlice, SliceLib.getSubslice(thirdDataBytes, 8, 40).toBytes()); } diff --git a/packages/world/src/modules/keysintable/KeysInTableHook.sol b/packages/world/src/modules/keysintable/KeysInTableHook.sol index b7d46f43e0..03622ade95 100644 --- a/packages/world/src/modules/keysintable/KeysInTableHook.sol +++ b/packages/world/src/modules/keysintable/KeysInTableHook.sol @@ -18,7 +18,7 @@ contract KeysInTableHook is StoreHook { if (!UsedKeysIndex.getHas(tableId, keysHash)) { uint40 length = uint40(KeysInTable.lengthKeys0(tableId)); - // Push the keyTuple to the list of keys in this tableId + // Push the keyTuple to the list of keys in this table if (keyTuple.length > 0) { KeysInTable.pushKeys0(tableId, keyTuple[0]); if (keyTuple.length > 1) { @@ -113,7 +113,7 @@ contract KeysInTableHook is StoreHook { } } - // Update the index of lastKey after swapping it with the deleted keyTuple + // Update the index of lastKeyTuple after swapping it with the deleted keyTuple bytes32 lastKeyHash = keccak256(abi.encode(lastKeyTuple)); UsedKeysIndex.setIndex(tableId, lastKeyHash, index); } From 8854d926a98ef37eb495a239aa0c184a796b7511 Mon Sep 17 00:00:00 2001 From: alvrs Date: Fri, 15 Sep 2023 12:26:05 +0100 Subject: [PATCH 26/28] gas report --- packages/store/gas-report.json | 2 +- packages/store/test/StoreCoreGas.t.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/store/gas-report.json b/packages/store/gas-report.json index 0c0fea234d..06772c450b 100644 --- a/packages/store/gas-report.json +++ b/packages/store/gas-report.json @@ -698,7 +698,7 @@ { "file": "test/StoreCoreGas.t.sol", "test": "testRegisterAndGetFieldLayout", - "name": "StoreCore: Register table", + "name": "StoreCore: register table", "gasUsed": 620356 }, { diff --git a/packages/store/test/StoreCoreGas.t.sol b/packages/store/test/StoreCoreGas.t.sol index 58f768d935..8a826be357 100644 --- a/packages/store/test/StoreCoreGas.t.sol +++ b/packages/store/test/StoreCoreGas.t.sol @@ -52,7 +52,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock { fieldNames[2] = "value3"; fieldNames[3] = "value4"; - startGasReport("StoreCore: Register table"); + startGasReport("StoreCore: register table"); StoreCore.registerTable(tableId, fieldLayout, keySchema, valueSchema, keyNames, fieldNames); endGasReport(); From 86bec3b7831966a0d981285ecbe742194117bd18 Mon Sep 17 00:00:00 2001 From: alvrs Date: Fri, 15 Sep 2023 12:46:48 +0100 Subject: [PATCH 27/28] generate test data --- test-data/world-logs.json | 518 +++++++++++++++++--------------------- 1 file changed, 231 insertions(+), 287 deletions(-) diff --git a/test-data/world-logs.json b/test-data/world-logs.json index ad2cc70827..4faea58887 100644 --- a/test-data/world-logs.json +++ b/test-data/world-logs.json @@ -5,11 +5,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000016d756473746f726500000000000000005461626c65730000000000000000000000000000000000000000000000000000000000000000000000000000000003400060030220202000000000000000000000000000000000000000000000000000002001005f000000000000000000000000000000000000000000000000000000006003025f5f5fc4c40000000000000000000000000000000000000000000000000000000000000000000000000000000000022000000000a0000000000002c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000077461626c654964000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000b6669656c644c61796f757400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000096b6579536368656d610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b76616c7565536368656d610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012616269456e636f6465644b65794e616d657300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014616269456e636f6465644669656c644e616d6573000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x0", + "transactionIndex": "0x7", + "logIndex": "0x1", "transactionLogIndex": "0x0", "removed": false }, @@ -19,11 +19,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000016d756473746f7265000000000000000053746f7265486f6f6b7300000000000000000000000000000000000000000000000000000000000000000000000001c00000000100000000000000000000000000000000000000000000000000000000002001005f00000000000000000000000000000000000000000000000000000000000001b600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b65790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x1", + "transactionIndex": "0x7", + "logIndex": "0x2", "transactionLogIndex": "0x1", "removed": false }, @@ -33,11 +33,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e616d6573706163654f776e6572000000000000000000000000000000000000000000000000000000000000000001c00014010014000000000000000000000000000000000000000000000000000000001001004f000000000000000000000000000000000000000000000000000000001401006100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000096e616d657370616365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000056f776e6572000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x2", + "transactionIndex": "0x7", + "logIndex": "0x3", "transactionLogIndex": "0x2", "removed": false }, @@ -47,11 +47,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000042616c616e636573000000000000000000000000000000000000000000000000000000000000000000000000000001c00020010020000000000000000000000000000000000000000000000000000000001001004f000000000000000000000000000000000000000000000000000000002001001f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000096e616d6573706163650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000762616c616e636500000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x3", + "transactionIndex": "0x7", + "logIndex": "0x4", "transactionLogIndex": "0x3", "removed": false }, @@ -61,11 +61,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000496e7374616c6c65644d6f64756c657300000000000000000000000000000000000000000000000000000000000002200014010014000000000000000000000000000000000000000000000000000000003002004f5f0000000000000000000000000000000000000000000000000000001401006100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000100000000000001a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000a6d6f64756c654e616d6500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d617267756d656e74734861736800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000d6d6f64756c654164647265737300000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x4", + "transactionIndex": "0x7", + "logIndex": "0x5", "transactionLogIndex": "0x4", "removed": false }, @@ -75,11 +75,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000044656c65676174696f6e730000000000000000000000000000000000000000000000000000000000000000000000022000200100200000000000000000000000000000000000000000000000000000000028020061610000000000000000000000000000000000000000000000000000002001005f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000100000000000001a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000964656c656761746f720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000964656c6567617465650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001364656c65676174696f6e436f6e74726f6c496400000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x5", + "transactionIndex": "0x7", + "logIndex": "0x6", "transactionLogIndex": "0x5", "removed": false }, @@ -89,11 +89,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000005265736f75726365416363657373000000000000000000000000000000000000000000000000000000000000000002200001010001000000000000000000000000000000000000000000000000000000003402005f610000000000000000000000000000000000000000000000000000000101006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000100000000000001a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000663616c6c6572000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000066163636573730000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x6", + "transactionIndex": "0x7", + "logIndex": "0x7", "transactionLogIndex": "0x6", "removed": false }, @@ -103,11 +103,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000053797374656d7300000000000000000000000000000000000000000000000000000000000000000000000000000002200015020014010000000000000000000000000000000000000000000000000000002001005f0000000000000000000000000000000000000000000000000000000015020061600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000a0000000000001a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f72000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000673797374656d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c7075626c69634163636573730000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x7", + "transactionIndex": "0x7", + "logIndex": "0x8", "transactionLogIndex": "0x7", "removed": false }, @@ -117,11 +117,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000022000240200200400000000000000000000000000000000000000000000000000000004010043000000000000000000000000000000000000000000000000000000002402005f430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000a0000000000001a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001066756e6374696f6e53656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001673797374656d46756e6374696f6e53656c6563746f7200000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x8", + "transactionIndex": "0x7", + "logIndex": "0x9", "transactionLogIndex": "0x8", "removed": false }, @@ -131,11 +131,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000053797374656d486f6f6b73000000000000000000000000000000000000000000000000000000000000000000000001c00000000100000000000000000000000000000000000000000000000000000000002001005f00000000000000000000000000000000000000000000000000000000000001b600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x9", + "transactionIndex": "0x7", + "logIndex": "0xa", "transactionLogIndex": "0x9", "removed": false }, @@ -145,11 +145,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000053797374656d5265676973747279000000000000000000000000000000000000000000000000000000000000000001c000200100200000000000000000000000000000000000000000000000000000000014010061000000000000000000000000000000000000000000000000000000002001005f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a000000000000140000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000673797374656d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0xa", + "transactionIndex": "0x7", + "logIndex": "0xb", "transactionLogIndex": "0xa", "removed": false }, @@ -159,11 +159,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000005265736f75726365547970650000000000000000000000000000000000000000000000000000000000000000000001c00001010001000000000000000000000000000000000000000000000000000000002001005f000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000107265736f7572636553656c6563746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000c7265736f75726365547970650000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0xb", + "transactionIndex": "0x7", + "logIndex": "0xc", "transactionLogIndex": "0xb", "removed": false }, @@ -173,11 +173,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000004e616d6573706163654f776e657200000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014f39fd6e51aad88f6f4ce6ab8827279cfffb92266000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0xc", + "transactionIndex": "0x7", + "logIndex": "0xd", "transactionLogIndex": "0xc", "removed": false }, @@ -187,11 +187,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb9226600000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0xd", + "transactionIndex": "0x7", + "logIndex": "0xe", "transactionLogIndex": "0xd", "removed": false }, @@ -201,11 +201,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0xe", + "transactionIndex": "0x7", + "logIndex": "0xf", "transactionLogIndex": "0xe", "removed": false }, @@ -215,11 +215,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000636f72652e730000000000000000000000000000000000000000000000000000000000000000000000000000000000010300000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0xf", + "transactionIndex": "0x7", + "logIndex": "0x10", "transactionLogIndex": "0xf", "removed": false }, @@ -229,11 +229,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000053797374656d73000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000636f72652e73000000000000000000000000000000000000000000000000000000000000000000000000000000000015cafac3dd18ac6c6e92c921884f9e4176737c052c010000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x10", + "transactionIndex": "0x7", + "logIndex": "0x11", "transactionLogIndex": "0x10", "removed": false }, @@ -243,11 +243,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x0000000000000000000000000000000053797374656d526567697374727900000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000cafac3dd18ac6c6e92c921884f9e4176737c052c000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000636f72652e7300000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x11", + "transactionIndex": "0x7", + "logIndex": "0x12", "transactionLogIndex": "0x11", "removed": false }, @@ -257,11 +257,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cafac3dd18ac6c6e92c921884f9e4176737c052c00000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x12", + "transactionIndex": "0x7", + "logIndex": "0x13", "transactionLogIndex": "0x12", "removed": false }, @@ -271,11 +271,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000140554c3a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e730000000000000000000040554c3a00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x13", + "transactionIndex": "0x7", + "logIndex": "0x14", "transactionLogIndex": "0x13", "removed": false }, @@ -285,11 +285,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000018d53b20800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000008d53b20800000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x14", + "transactionIndex": "0x7", + "logIndex": "0x15", "transactionLogIndex": "0x14", "removed": false }, @@ -299,11 +299,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000125f6221000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e730000000000000000000025f6221000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x15", + "transactionIndex": "0x7", + "logIndex": "0x16", "transactionLogIndex": "0x15", "removed": false }, @@ -313,11 +313,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000012bfaa27400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000002bfaa27400000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x16", + "transactionIndex": "0x7", + "logIndex": "0x17", "transactionLogIndex": "0x16", "removed": false }, @@ -327,11 +327,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000121293ca000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e730000000000000000000021293ca000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x17", + "transactionIndex": "0x7", + "logIndex": "0x18", "transactionLogIndex": "0x17", "removed": false }, @@ -341,11 +341,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000018818929400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000008818929400000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x18", + "transactionIndex": "0x7", + "logIndex": "0x19", "transactionLogIndex": "0x18", "removed": false }, @@ -355,11 +355,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000018da798da00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000008da798da00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x19", + "transactionIndex": "0x7", + "logIndex": "0x1a", "transactionLogIndex": "0x19", "removed": false }, @@ -369,11 +369,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010ba51f4900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000000ba51f4900000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x1a", + "transactionIndex": "0x7", + "logIndex": "0x1b", "transactionLogIndex": "0x1a", "removed": false }, @@ -383,11 +383,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001530f4b6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000530f4b6000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x1b", + "transactionIndex": "0x7", + "logIndex": "0x1c", "transactionLogIndex": "0x1b", "removed": false }, @@ -397,11 +397,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010560912900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000000560912900000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x1c", + "transactionIndex": "0x7", + "logIndex": "0x1d", "transactionLogIndex": "0x1c", "removed": false }, @@ -411,11 +411,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001a886545e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000a886545e00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x1d", + "transactionIndex": "0x7", + "logIndex": "0x1e", "transactionLogIndex": "0x1d", "removed": false }, @@ -425,11 +425,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001d5f8337f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000d5f8337f00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x1e", + "transactionIndex": "0x7", + "logIndex": "0x1f", "transactionLogIndex": "0x1e", "removed": false }, @@ -439,11 +439,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001a92813ad00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000a92813ad00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x1f", + "transactionIndex": "0x7", + "logIndex": "0x20", "transactionLogIndex": "0x1f", "removed": false }, @@ -453,11 +453,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000013350b6a900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000003350b6a900000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x20", + "transactionIndex": "0x7", + "logIndex": "0x21", "transactionLogIndex": "0x20", "removed": false }, @@ -467,11 +467,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000013c03a51c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000003c03a51c00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x21", + "transactionIndex": "0x7", + "logIndex": "0x22", "transactionLogIndex": "0x21", "removed": false }, @@ -481,11 +481,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001b7a3c75600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e7300000000000000000000b7a3c75600000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x22", + "transactionIndex": "0x7", + "logIndex": "0x23", "transactionLogIndex": "0x22", "removed": false }, @@ -495,11 +495,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000011d2257ba00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000636f72652e73000000000000000000001d2257ba00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x23", + "transactionIndex": "0x7", + "logIndex": "0x24", "transactionLogIndex": "0x23", "removed": false }, @@ -509,68 +509,12 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x00000000000000000000000000000000496e7374616c6c65644d6f64756c6573000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002636f72652e6d0000000000000000000000000000000000000000000000000000c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4700000000000000000000000000000000000000000000000000000000000000014e7f1725e7734ce288f8367e1bb143e90bb3f0512000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", + "blockHash": "0xfe43f23153c69149ebe20b5941cccf8c55f4bf3acd82b33445ace71a2c5f8a9c", + "blockNumber": "0x2", "transactionHash": "0xae82b15a8c62db1e23d9c523e730d9b861eed20529b8cff4d3452f86ae3149df", - "transactionIndex": "0x0", - "logIndex": "0x24", - "transactionLogIndex": "0x24", - "removed": false - }, - { - "address": "0x5fbdb2315678afecb367f032d93f642f64180aa3", - "topics": [ - "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" - ], - "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000566563746f720000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", - "transactionHash": "0xfb13191ee1923726a6b8ed1da378fa03539f965239f25b547e2317a1573bb593", - "transactionIndex": "0x1", + "transactionIndex": "0x7", "logIndex": "0x25", - "transactionLogIndex": "0x0", - "removed": false - }, - { - "address": "0x5fbdb2315678afecb367f032d93f642f64180aa3", - "topics": [ - "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" - ], - "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000566563746f72000000000000000000000000000000000000000000000000000000000000000000000000000000000220000802000404000000000000000000000000000000000000000000000000000000040100030000000000000000000000000000000000000000000000000000000008020023230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000a0000000000001a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b6579000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017900000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", - "transactionHash": "0xfb13191ee1923726a6b8ed1da378fa03539f965239f25b547e2317a1573bb593", - "transactionIndex": "0x1", - "logIndex": "0x26", - "transactionLogIndex": "0x1", - "removed": false - }, - { - "address": "0x5fbdb2315678afecb367f032d93f642f64180aa3", - "topics": [ - "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" - ], - "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265720000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", - "transactionHash": "0xc8e4e14c08d27c8a0a96b22197ae90c7bfdea04babb4f3908e5151b3731917de", - "transactionIndex": "0x2", - "logIndex": "0x27", - "transactionLogIndex": "0x0", - "removed": false - }, - { - "address": "0x5fbdb2315678afecb367f032d93f642f64180aa3", - "topics": [ - "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" - ], - "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265720000000000000000000000000000000000000000000000000000000000000000000000000000000001c000040100040000000000000000000000000000000000000000000000000000000004010003000000000000000000000000000000000000000000000000000000000401000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b65790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", - "blockNumber": "0x3", - "transactionHash": "0xc8e4e14c08d27c8a0a96b22197ae90c7bfdea04babb4f3908e5151b3731917de", - "transactionIndex": "0x2", - "logIndex": "0x28", - "transactionLogIndex": "0x1", + "transactionLogIndex": "0x24", "removed": false }, { @@ -579,11 +523,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737400000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", - "transactionHash": "0x6f1e3ce3fa9dffb0338ddfd370a7042595004831f56e7b40bafd71a02318098a", - "transactionIndex": "0x3", - "logIndex": "0x29", + "transactionHash": "0x7bca8d7dabf72bfa9ff127d2d2fac95a747b5cbd45e44d820789f14a6d340d2f", + "transactionIndex": "0x0", + "logIndex": "0x0", "transactionLogIndex": "0x0", "removed": false }, @@ -593,11 +537,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c697374000000000000000000000000000000000000000000000000000000000000000000000000016000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000040000000000000e000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", - "transactionHash": "0x6f1e3ce3fa9dffb0338ddfd370a7042595004831f56e7b40bafd71a02318098a", - "transactionIndex": "0x3", - "logIndex": "0x2a", + "transactionHash": "0x7bca8d7dabf72bfa9ff127d2d2fac95a747b5cbd45e44d820789f14a6d340d2f", + "transactionIndex": "0x0", + "logIndex": "0x1", "transactionLogIndex": "0x1", "removed": false }, @@ -607,11 +551,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000437573746f6d4572726f72735379737400000000000000000000000000000000000000000000000000000000000000010300000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", - "transactionHash": "0xd195b0a305b8b106c964cae4cfc73d612ee29d1eac4af45b7b18f2b406cf9e8d", - "transactionIndex": "0x4", - "logIndex": "0x2b", + "transactionHash": "0xb5f9defc11305940c4b08a6f34cdb4a671fde33905f288048b70c85b1d0875eb", + "transactionIndex": "0x1", + "logIndex": "0x2", "transactionLogIndex": "0x0", "removed": false }, @@ -621,11 +565,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000053797374656d73000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000437573746f6d4572726f72735379737400000000000000000000000000000000000000000000000000000000000000155fc8d32690cc91d4c39d9d3abcbd16989f875707010000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", - "transactionHash": "0xd195b0a305b8b106c964cae4cfc73d612ee29d1eac4af45b7b18f2b406cf9e8d", - "transactionIndex": "0x4", - "logIndex": "0x2c", + "transactionHash": "0xb5f9defc11305940c4b08a6f34cdb4a671fde33905f288048b70c85b1d0875eb", + "transactionIndex": "0x1", + "logIndex": "0x3", "transactionLogIndex": "0x1", "removed": false }, @@ -635,11 +579,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x0000000000000000000000000000000053797374656d526567697374727900000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f875707000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000437573746f6d4572726f727353797374", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", - "transactionHash": "0xd195b0a305b8b106c964cae4cfc73d612ee29d1eac4af45b7b18f2b406cf9e8d", - "transactionIndex": "0x4", - "logIndex": "0x2d", + "transactionHash": "0xb5f9defc11305940c4b08a6f34cdb4a671fde33905f288048b70c85b1d0875eb", + "transactionIndex": "0x1", + "logIndex": "0x4", "transactionLogIndex": "0x2", "removed": false }, @@ -649,11 +593,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f87570700000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", - "transactionHash": "0xd195b0a305b8b106c964cae4cfc73d612ee29d1eac4af45b7b18f2b406cf9e8d", - "transactionIndex": "0x4", - "logIndex": "0x2e", + "transactionHash": "0xb5f9defc11305940c4b08a6f34cdb4a671fde33905f288048b70c85b1d0875eb", + "transactionIndex": "0x1", + "logIndex": "0x5", "transactionLogIndex": "0x3", "removed": false }, @@ -663,11 +607,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737453797374656d00000000000000000000000000000000000000000000000000000000000000010300000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", - "transactionHash": "0xef364e996085894e8732989635e9b8778ac91de6ea48a4ae0ff944b0229b37e6", - "transactionIndex": "0x5", - "logIndex": "0x2f", + "transactionHash": "0x5e56042175cee9139c0439cc0df13d0efbdb1a57e93e5353f8fc713ea061bfce", + "transactionIndex": "0x2", + "logIndex": "0x6", "transactionLogIndex": "0x0", "removed": false }, @@ -677,11 +621,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000053797374656d73000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265724c69737453797374656d00000000000000000000000000000000000000000000000000000000000000150165878a594ca255338adfa4d48449f69242eb8f010000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", - "transactionHash": "0xef364e996085894e8732989635e9b8778ac91de6ea48a4ae0ff944b0229b37e6", - "transactionIndex": "0x5", - "logIndex": "0x30", + "transactionHash": "0x5e56042175cee9139c0439cc0df13d0efbdb1a57e93e5353f8fc713ea061bfce", + "transactionIndex": "0x2", + "logIndex": "0x7", "transactionLogIndex": "0x1", "removed": false }, @@ -691,11 +635,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x0000000000000000000000000000000053797374656d526567697374727900000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000165878a594ca255338adfa4d48449f69242eb8f0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000004e756d6265724c69737453797374656d", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", - "transactionHash": "0xef364e996085894e8732989635e9b8778ac91de6ea48a4ae0ff944b0229b37e6", - "transactionIndex": "0x5", - "logIndex": "0x31", + "transactionHash": "0x5e56042175cee9139c0439cc0df13d0efbdb1a57e93e5353f8fc713ea061bfce", + "transactionIndex": "0x2", + "logIndex": "0x8", "transactionLogIndex": "0x2", "removed": false }, @@ -705,11 +649,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636541636365737300000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000165878a594ca255338adfa4d48449f69242eb8f00000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", - "transactionHash": "0xef364e996085894e8732989635e9b8778ac91de6ea48a4ae0ff944b0229b37e6", - "transactionIndex": "0x5", - "logIndex": "0x32", + "transactionHash": "0x5e56042175cee9139c0439cc0df13d0efbdb1a57e93e5353f8fc713ea061bfce", + "transactionIndex": "0x2", + "logIndex": "0x9", "transactionLogIndex": "0x3", "removed": false }, @@ -719,11 +663,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000566563746f720000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", + "blockNumber": "0x3", "transactionHash": "0xb3febd63ed51098bd7062390e4e859508e55a1bbfa5ee8ec197a4df93586f632", - "transactionIndex": "0x4", - "logIndex": "0x2f", + "transactionIndex": "0x3", + "logIndex": "0xa", "transactionLogIndex": "0x0", "removed": false }, @@ -733,11 +677,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000566563746f72000000000000000000000000000000000000000000000000000000000000000000000000000000000220000802000404000000000000000000000000000000000000000000000000000000040100030000000000000000000000000000000000000000000000000000000008020023230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000a0000000000001a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b6579000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017900000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", + "blockNumber": "0x3", "transactionHash": "0xb3febd63ed51098bd7062390e4e859508e55a1bbfa5ee8ec197a4df93586f632", - "transactionIndex": "0x4", - "logIndex": "0x30", + "transactionIndex": "0x3", + "logIndex": "0xb", "transactionLogIndex": "0x1", "removed": false }, @@ -747,11 +691,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265720000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", + "blockNumber": "0x3", "transactionHash": "0xd9aea844188d36cd599b3d9ddd523b1269131ec10ebf5b107a50bffe8a03985e", - "transactionIndex": "0x5", - "logIndex": "0x31", + "transactionIndex": "0x4", + "logIndex": "0xc", "transactionLogIndex": "0x0", "removed": false }, @@ -761,11 +705,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004e756d6265720000000000000000000000000000000000000000000000000000000000000000000000000000000001c000040100040000000000000000000000000000000000000000000000000000000004010003000000000000000000000000000000000000000000000000000000000401000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000a00000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000036b65790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29d9d51112d3304c99e265986b1b441446c3384dc8268d11e105c6f86c4a85ac", - "blockNumber": "0x4", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", + "blockNumber": "0x3", "transactionHash": "0xd9aea844188d36cd599b3d9ddd523b1269131ec10ebf5b107a50bffe8a03985e", - "transactionIndex": "0x5", - "logIndex": "0x32", + "transactionIndex": "0x4", + "logIndex": "0xd", "transactionLogIndex": "0x1", "removed": false }, @@ -775,11 +719,11 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000005265736f7572636554797065000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004d756c7469000000000000000000000000000000000000000000000000000000000000000000000000000000000000010200000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", "transactionHash": "0xa50c88a503c25f17dc6c8e4cc779f15341f6f8242da501989a64ec87a8f5a85b", - "transactionIndex": "0x6", - "logIndex": "0x33", + "transactionIndex": "0x5", + "logIndex": "0xe", "transactionLogIndex": "0x0", "removed": false }, @@ -789,11 +733,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x6d756473746f726500000000000000005461626c657300000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000004d756c74690000000000000000000000000000000000000000000000000000000000000000000000000000000000034000210200200100000000000000000000000000000000000000000000000000000034040003601f2e000000000000000000000000000000000000000000000000002102003f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000001c0000000000002c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000016100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000162000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000036e756d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000576616c7565000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", "transactionHash": "0xa50c88a503c25f17dc6c8e4cc779f15341f6f8242da501989a64ec87a8f5a85b", - "transactionIndex": "0x6", - "logIndex": "0x34", + "transactionIndex": "0x5", + "logIndex": "0xf", "transactionLogIndex": "0x1", "removed": false }, @@ -803,11 +747,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000015f644e3c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000437573746f6d4572726f7273537973745f644e3c00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", "transactionHash": "0xff27259bf2a15d32d629b5f2dce0f7b248400c760cd4a4f367670e87b4cf81fb", - "transactionIndex": "0x7", - "logIndex": "0x35", + "transactionIndex": "0x6", + "logIndex": "0x10", "transactionLogIndex": "0x0", "removed": false }, @@ -817,11 +761,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001b8a44c7c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656db8a44c7c00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", "transactionHash": "0x704d3a95376db47cabae3ba83743e46e1eb751b82a9b622af5a555e109d59a66", - "transactionIndex": "0x8", - "logIndex": "0x36", + "transactionIndex": "0x7", + "logIndex": "0x11", "transactionLogIndex": "0x0", "removed": false }, @@ -830,12 +774,12 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f7f0e440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656df7f0e44000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001a4ece52c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656da4ece52c00000000000000000000000000000000000000000000000000000000", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", - "transactionHash": "0x39116de046d5a63b1624f2556f78148c5bfaf0011b126598d96615cbbf89dc7f", - "transactionIndex": "0x9", - "logIndex": "0x37", + "transactionHash": "0x9d7756b56cd32ba0a3305788a5c412eae328b0a28c4ff2e46f5db939a1190a77", + "transactionIndex": "0x8", + "logIndex": "0x12", "transactionLogIndex": "0x0", "removed": false }, @@ -844,12 +788,12 @@ "topics": [ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], - "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001a4ece52c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656da4ece52c00000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f7f0e440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656df7f0e44000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", - "transactionHash": "0x3eeacc25c38ad7561bc6049feeba85a5c8b2ac50355c72d5110646394aafe62d", - "transactionIndex": "0xa", - "logIndex": "0x38", + "transactionHash": "0x8a7d4a27b5a121f77b0011d084850b4502db7cc7e30f5a22e1fdf61247eac74c", + "transactionIndex": "0x9", + "logIndex": "0x13", "transactionLogIndex": "0x0", "removed": false }, @@ -859,11 +803,11 @@ "0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32" ], "data": "0x0000000000000000000000000000000046756e6374696f6e53656c6563746f72000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001306d61a5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000004e756d6265724c69737453797374656d306d61a500000000000000000000000000000000000000000000000000000000", - "blockHash": "0x171a87f9e047169f51c24eb95e0d4b04e948eec4ffc45180a8bf66565c2fb495", + "blockHash": "0x40b6d1b700f1f3dc080ebe2d54c3553e6419da61cfeb5a5e2e2272ebe9840b9a", "blockNumber": "0x3", "transactionHash": "0xf97efde38e1aaee38023ff6669c33b26ac5230f364af583b6159dfec83099c02", - "transactionIndex": "0xb", - "logIndex": "0x39", + "transactionIndex": "0xa", + "logIndex": "0x14", "transactionLogIndex": "0x0", "removed": false }, @@ -873,7 +817,7 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000004e756d6265724c6973740000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000001a400000000000000000000000000000000000000000000000000000000", - "blockHash": "0x827bd9f626a662de6e8309bd74c5e58e2f7ce281b51de8e6029ed250087220bc", + "blockHash": "0xcc9c86d971dbe128cf77e6c94d85c369dc31f6a9b0b75324cc5feb5215a4b045", "blockNumber": "0x4", "transactionHash": "0x6b11c4b4d9257da889cd755a9aef98068339dea0770f3c43def5293c47977876", "transactionIndex": "0x0", @@ -887,7 +831,7 @@ "0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46" ], "data": "0x000000000000000000000000000000004e756d6265724c6973740000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000001a400000045000000000000000000000000000000000000000000000000", - "blockHash": "0x827bd9f626a662de6e8309bd74c5e58e2f7ce281b51de8e6029ed250087220bc", + "blockHash": "0xcc9c86d971dbe128cf77e6c94d85c369dc31f6a9b0b75324cc5feb5215a4b045", "blockNumber": "0x4", "transactionHash": "0x2453e912dfab0eed54e6140d2f5c829034fe51fa844767991510eb71ecff8a3b", "transactionIndex": "0x1", From 95dc04c0794a8f430bfcaa55ec584179369bd7df Mon Sep 17 00:00:00 2001 From: alvrs Date: Fri, 15 Sep 2023 12:56:34 +0100 Subject: [PATCH 28/28] self-review --- docs/pages/store/reading-and-writing.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/store/reading-and-writing.mdx b/docs/pages/store/reading-and-writing.mdx index 4a5f8aba82..df4b54d962 100644 --- a/docs/pages/store/reading-and-writing.mdx +++ b/docs/pages/store/reading-and-writing.mdx @@ -40,7 +40,7 @@ uint256[2] memory barArray; barArray[0] = 69; barArray[1] = 85; fooArray[0] = 42; -// args: keyTuple, foo, bar, fooArray, staticArray +// args: key, foo, bar, fooArray, staticArray MyTable.set("some.key", 45, false, fooArray, barArray); ```