From b307f5564bc95506f0042f4736296da3faf32338 Mon Sep 17 00:00:00 2001 From: alvrs Date: Wed, 16 Aug 2023 23:59:02 +0200 Subject: [PATCH] fix example PostDeploy --- .../contracts/script/PostDeploy.s.sol | 18 +- .../types/ethers-contracts/IWorld.ts | 898 +++--------------- .../factories/IWorld__factory.ts | 424 +-------- 3 files changed, 143 insertions(+), 1197 deletions(-) diff --git a/examples/minimal/packages/contracts/script/PostDeploy.s.sol b/examples/minimal/packages/contracts/script/PostDeploy.s.sol index 10ab5bf924..d540e882e2 100644 --- a/examples/minimal/packages/contracts/script/PostDeploy.s.sol +++ b/examples/minimal/packages/contracts/script/PostDeploy.s.sol @@ -19,14 +19,18 @@ contract PostDeploy is Script { // Manually deploy a system with another namespace ChatNamespacedSystem chatNamespacedSystem = new ChatNamespacedSystem(); - IWorld(worldAddress).registerSystem("namespace", "ChatNamespaced", chatNamespacedSystem, true); - IWorld(worldAddress).registerFunctionSelector("namespace", "ChatNamespaced", "sendMessage", "(string)"); - // Grant this system access to MessageTable - IWorld(worldAddress).grantAccess( - ResourceSelector.getNamespace(MessageTableTableId), - ResourceSelector.getName(MessageTableTableId), - address(chatNamespacedSystem) + IWorld(worldAddress).registerSystem( + ResourceSelector.from("namespace", "ChatNamespaced"), + chatNamespacedSystem, + true + ); + IWorld(worldAddress).registerFunctionSelector( + ResourceSelector.from("namespace", "ChatNamespaced"), + "sendMessage", + "(string)" ); + // Grant this system access to MessageTable + IWorld(worldAddress).grantAccess(MessageTableTableId, address(chatNamespacedSystem)); // ------------------ EXAMPLES ------------------ diff --git a/examples/minimal/packages/contracts/types/ethers-contracts/IWorld.ts b/examples/minimal/packages/contracts/types/ethers-contracts/IWorld.ts index a66dde03e0..f717810764 100644 --- a/examples/minimal/packages/contracts/types/ethers-contracts/IWorld.ts +++ b/examples/minimal/packages/contracts/types/ethers-contracts/IWorld.ts @@ -38,12 +38,10 @@ export type StringStructStructOutput = [string] & { value: string }; export interface IWorldInterface extends utils.Interface { functions: { - "call(bytes16,bytes16,bytes)": FunctionFragment; + "call(bytes32,bytes)": FunctionFragment; "deleteRecord(bytes32,bytes32[],bytes32)": FunctionFragment; - "deleteRecord(bytes16,bytes16,bytes32[],bytes32)": FunctionFragment; "dynamicArrayBytesStruct((bytes)[])": FunctionFragment; "dynamicArrayStringStruct((string)[])": FunctionFragment; - "emitEphemeralRecord(bytes16,bytes16,bytes32[],bytes,bytes32)": FunctionFragment; "emitEphemeralRecord(bytes32,bytes32[],bytes,bytes32)": FunctionFragment; "getField(bytes32,bytes32[],uint8,bytes32)": FunctionFragment; "getFieldLength(bytes32,bytes32[],uint8,bytes32)": FunctionFragment; @@ -51,47 +49,37 @@ export interface IWorldInterface extends utils.Interface { "getKeySchema(bytes32)": FunctionFragment; "getRecord(bytes32,bytes32[],bytes32)": FunctionFragment; "getValueSchema(bytes32)": FunctionFragment; - "grantAccess(bytes16,bytes16,address)": FunctionFragment; + "grantAccess(bytes32,address)": FunctionFragment; "increment()": FunctionFragment; "installModule(address,bytes)": FunctionFragment; "installRootModule(address,bytes)": FunctionFragment; "pickUp(uint32,uint32)": FunctionFragment; "popFromField(bytes32,bytes32[],uint8,uint256,bytes32)": FunctionFragment; - "popFromField(bytes16,bytes16,bytes32[],uint8,uint256,bytes32)": FunctionFragment; "pushToField(bytes32,bytes32[],uint8,bytes,bytes32)": FunctionFragment; - "pushToField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)": FunctionFragment; - "registerFunctionSelector(bytes16,bytes16,string,string)": FunctionFragment; - "registerHook(bytes16,bytes16,address)": FunctionFragment; + "registerFunctionSelector(bytes32,string,string)": FunctionFragment; "registerNamespace(bytes16)": FunctionFragment; - "registerRootFunctionSelector(bytes16,bytes16,bytes4,bytes4)": FunctionFragment; + "registerRootFunctionSelector(bytes32,bytes4,bytes4)": FunctionFragment; "registerStoreHook(bytes32,address)": FunctionFragment; - "registerSystem(bytes16,bytes16,address,bool)": FunctionFragment; - "registerSystemHook(bytes16,bytes16,address)": FunctionFragment; - "registerTable(bytes16,bytes16,bytes32,bytes32,string[],string[])": FunctionFragment; + "registerSystem(bytes32,address,bool)": FunctionFragment; + "registerSystemHook(bytes32,address)": FunctionFragment; "registerTable(bytes32,bytes32,bytes32,string[],string[])": FunctionFragment; - "registerTableHook(bytes16,bytes16,address)": FunctionFragment; - "revokeAccess(bytes16,bytes16,address)": FunctionFragment; + "revokeAccess(bytes32,address)": FunctionFragment; "sendMessage(string)": FunctionFragment; - "setField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)": FunctionFragment; "setField(bytes32,bytes32[],uint8,bytes,bytes32)": FunctionFragment; "setRecord(bytes32,bytes32[],bytes,bytes32)": FunctionFragment; - "setRecord(bytes16,bytes16,bytes32[],bytes,bytes32)": FunctionFragment; "staticArrayBytesStruct(tuple[1])": FunctionFragment; "staticArrayStringStruct(tuple[1])": FunctionFragment; "updateInField(bytes32,bytes32[],uint8,uint256,bytes,bytes32)": FunctionFragment; - "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes,bytes32)": FunctionFragment; "willRevert()": FunctionFragment; }; getFunction( nameOrSignatureOrTopic: | "call" - | "deleteRecord(bytes32,bytes32[],bytes32)" - | "deleteRecord(bytes16,bytes16,bytes32[],bytes32)" + | "deleteRecord" | "dynamicArrayBytesStruct" | "dynamicArrayStringStruct" - | "emitEphemeralRecord(bytes16,bytes16,bytes32[],bytes,bytes32)" - | "emitEphemeralRecord(bytes32,bytes32[],bytes,bytes32)" + | "emitEphemeralRecord" | "getField" | "getFieldLength" | "getFieldSlice" @@ -103,53 +91,32 @@ export interface IWorldInterface extends utils.Interface { | "installModule" | "installRootModule" | "pickUp" - | "popFromField(bytes32,bytes32[],uint8,uint256,bytes32)" - | "popFromField(bytes16,bytes16,bytes32[],uint8,uint256,bytes32)" - | "pushToField(bytes32,bytes32[],uint8,bytes,bytes32)" - | "pushToField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)" + | "popFromField" + | "pushToField" | "registerFunctionSelector" - | "registerHook" | "registerNamespace" | "registerRootFunctionSelector" | "registerStoreHook" | "registerSystem" | "registerSystemHook" - | "registerTable(bytes16,bytes16,bytes32,bytes32,string[],string[])" - | "registerTable(bytes32,bytes32,bytes32,string[],string[])" - | "registerTableHook" + | "registerTable" | "revokeAccess" | "sendMessage" - | "setField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)" - | "setField(bytes32,bytes32[],uint8,bytes,bytes32)" - | "setRecord(bytes32,bytes32[],bytes,bytes32)" - | "setRecord(bytes16,bytes16,bytes32[],bytes,bytes32)" + | "setField" + | "setRecord" | "staticArrayBytesStruct" | "staticArrayStringStruct" - | "updateInField(bytes32,bytes32[],uint8,uint256,bytes,bytes32)" - | "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes,bytes32)" + | "updateInField" | "willRevert" ): FunctionFragment; encodeFunctionData( functionFragment: "call", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "deleteRecord(bytes32,bytes32[],bytes32)", - values: [ - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue - ] + values: [PromiseOrValue, PromiseOrValue] ): string; encodeFunctionData( - functionFragment: "deleteRecord(bytes16,bytes16,bytes32[],bytes32)", + functionFragment: "deleteRecord", values: [ - PromiseOrValue, PromiseOrValue, PromiseOrValue[], PromiseOrValue @@ -164,17 +131,7 @@ export interface IWorldInterface extends utils.Interface { values: [StringStructStruct[]] ): string; encodeFunctionData( - functionFragment: "emitEphemeralRecord(bytes16,bytes16,bytes32[],bytes,bytes32)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "emitEphemeralRecord(bytes32,bytes32[],bytes,bytes32)", + functionFragment: "emitEphemeralRecord", values: [ PromiseOrValue, PromiseOrValue[], @@ -229,11 +186,7 @@ export interface IWorldInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "grantAccess", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [PromiseOrValue, PromiseOrValue] ): string; encodeFunctionData(functionFragment: "increment", values?: undefined): string; encodeFunctionData( @@ -249,19 +202,8 @@ export interface IWorldInterface extends utils.Interface { values: [PromiseOrValue, PromiseOrValue] ): string; encodeFunctionData( - functionFragment: "popFromField(bytes32,bytes32[],uint8,uint256,bytes32)", - values: [ - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "popFromField(bytes16,bytes16,bytes32[],uint8,uint256,bytes32)", + functionFragment: "popFromField", values: [ - PromiseOrValue, PromiseOrValue, PromiseOrValue[], PromiseOrValue, @@ -270,19 +212,8 @@ export interface IWorldInterface extends utils.Interface { ] ): string; encodeFunctionData( - functionFragment: "pushToField(bytes32,bytes32[],uint8,bytes,bytes32)", - values: [ - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "pushToField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)", + functionFragment: "pushToField", values: [ - PromiseOrValue, PromiseOrValue, PromiseOrValue[], PromiseOrValue, @@ -293,20 +224,11 @@ export interface IWorldInterface extends utils.Interface { encodeFunctionData( functionFragment: "registerFunctionSelector", values: [ - PromiseOrValue, PromiseOrValue, PromiseOrValue, PromiseOrValue ] ): string; - encodeFunctionData( - functionFragment: "registerHook", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; encodeFunctionData( functionFragment: "registerNamespace", values: [PromiseOrValue] @@ -314,7 +236,6 @@ export interface IWorldInterface extends utils.Interface { encodeFunctionData( functionFragment: "registerRootFunctionSelector", values: [ - PromiseOrValue, PromiseOrValue, PromiseOrValue, PromiseOrValue @@ -327,7 +248,6 @@ export interface IWorldInterface extends utils.Interface { encodeFunctionData( functionFragment: "registerSystem", values: [ - PromiseOrValue, PromiseOrValue, PromiseOrValue, PromiseOrValue @@ -335,25 +255,10 @@ export interface IWorldInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "registerSystemHook", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "registerTable(bytes16,bytes16,bytes32,bytes32,string[],string[])", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue[] - ] + values: [PromiseOrValue, PromiseOrValue] ): string; encodeFunctionData( - functionFragment: "registerTable(bytes32,bytes32,bytes32,string[],string[])", + functionFragment: "registerTable", values: [ PromiseOrValue, PromiseOrValue, @@ -362,39 +267,16 @@ export interface IWorldInterface extends utils.Interface { PromiseOrValue[] ] ): string; - encodeFunctionData( - functionFragment: "registerTableHook", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; encodeFunctionData( functionFragment: "revokeAccess", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [PromiseOrValue, PromiseOrValue] ): string; encodeFunctionData( functionFragment: "sendMessage", values: [PromiseOrValue] ): string; encodeFunctionData( - functionFragment: "setField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "setField(bytes32,bytes32[],uint8,bytes,bytes32)", + functionFragment: "setField", values: [ PromiseOrValue, PromiseOrValue[], @@ -404,18 +286,8 @@ export interface IWorldInterface extends utils.Interface { ] ): string; encodeFunctionData( - functionFragment: "setRecord(bytes32,bytes32[],bytes,bytes32)", - values: [ - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "setRecord(bytes16,bytes16,bytes32[],bytes,bytes32)", + functionFragment: "setRecord", values: [ - PromiseOrValue, PromiseOrValue, PromiseOrValue[], PromiseOrValue, @@ -431,20 +303,8 @@ export interface IWorldInterface extends utils.Interface { values: [[StringStructStruct]] ): string; encodeFunctionData( - functionFragment: "updateInField(bytes32,bytes32[],uint8,uint256,bytes,bytes32)", - values: [ - PromiseOrValue, - PromiseOrValue[], - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes,bytes32)", + functionFragment: "updateInField", values: [ - PromiseOrValue, PromiseOrValue, PromiseOrValue[], PromiseOrValue, @@ -460,11 +320,7 @@ export interface IWorldInterface extends utils.Interface { decodeFunctionResult(functionFragment: "call", data: BytesLike): Result; decodeFunctionResult( - functionFragment: "deleteRecord(bytes32,bytes32[],bytes32)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "deleteRecord(bytes16,bytes16,bytes32[],bytes32)", + functionFragment: "deleteRecord", data: BytesLike ): Result; decodeFunctionResult( @@ -476,11 +332,7 @@ export interface IWorldInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "emitEphemeralRecord(bytes16,bytes16,bytes32[],bytes,bytes32)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "emitEphemeralRecord(bytes32,bytes32[],bytes,bytes32)", + functionFragment: "emitEphemeralRecord", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "getField", data: BytesLike): Result; @@ -516,29 +368,17 @@ export interface IWorldInterface extends utils.Interface { ): Result; decodeFunctionResult(functionFragment: "pickUp", data: BytesLike): Result; decodeFunctionResult( - functionFragment: "popFromField(bytes32,bytes32[],uint8,uint256,bytes32)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "popFromField(bytes16,bytes16,bytes32[],uint8,uint256,bytes32)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "pushToField(bytes32,bytes32[],uint8,bytes,bytes32)", + functionFragment: "popFromField", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "pushToField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)", + functionFragment: "pushToField", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "registerFunctionSelector", data: BytesLike ): Result; - decodeFunctionResult( - functionFragment: "registerHook", - data: BytesLike - ): Result; decodeFunctionResult( functionFragment: "registerNamespace", data: BytesLike @@ -560,15 +400,7 @@ export interface IWorldInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "registerTable(bytes16,bytes16,bytes32,bytes32,string[],string[])", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "registerTable(bytes32,bytes32,bytes32,string[],string[])", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "registerTableHook", + functionFragment: "registerTable", data: BytesLike ): Result; decodeFunctionResult( @@ -579,22 +411,8 @@ export interface IWorldInterface extends utils.Interface { functionFragment: "sendMessage", data: BytesLike ): Result; - decodeFunctionResult( - functionFragment: "setField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setField(bytes32,bytes32[],uint8,bytes,bytes32)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRecord(bytes32,bytes32[],bytes,bytes32)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setRecord(bytes16,bytes16,bytes32[],bytes,bytes32)", - data: BytesLike - ): Result; + decodeFunctionResult(functionFragment: "setField", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setRecord", data: BytesLike): Result; decodeFunctionResult( functionFragment: "staticArrayBytesStruct", data: BytesLike @@ -604,11 +422,7 @@ export interface IWorldInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "updateInField(bytes32,bytes32[],uint8,uint256,bytes,bytes32)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes,bytes32)", + functionFragment: "updateInField", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "willRevert", data: BytesLike): Result; @@ -711,27 +525,18 @@ export interface IWorld extends BaseContract { functions: { call( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, funcSelectorAndArgs: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - "deleteRecord(bytes32,bytes32[],bytes32)"( + deleteRecord( table: PromiseOrValue, key: PromiseOrValue[], valueSchema: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "deleteRecord(bytes16,bytes16,bytes32[],bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - dynamicArrayBytesStruct( arg0: BytesStructStruct[], overrides?: Overrides & { from?: PromiseOrValue } @@ -742,16 +547,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "emitEphemeralRecord(bytes16,bytes16,bytes32[],bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "emitEphemeralRecord(bytes32,bytes32[],bytes,bytes32)"( + emitEphemeralRecord( table: PromiseOrValue, key: PromiseOrValue[], data: PromiseOrValue, @@ -803,8 +599,7 @@ export interface IWorld extends BaseContract { ): Promise<[string] & { schema: string }>; grantAccess( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, grantee: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -831,7 +626,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "popFromField(bytes32,bytes32[],uint8,uint256,bytes32)"( + popFromField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -840,17 +635,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "popFromField(bytes16,bytes16,bytes32[],uint8,uint256,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - byteLengthToPop: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "pushToField(bytes32,bytes32[],uint8,bytes,bytes32)"( + pushToField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -859,39 +644,20 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "pushToField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - dataToPush: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - registerFunctionSelector( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, systemFunctionName: PromiseOrValue, systemFunctionArguments: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - registerHook( - namespace: PromiseOrValue, - name: PromiseOrValue, - hook: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - registerNamespace( namespace: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; registerRootFunctionSelector( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, worldFunctionSelector: PromiseOrValue, systemFunctionSelector: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } @@ -904,31 +670,19 @@ export interface IWorld extends BaseContract { ): Promise; registerSystem( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, system: PromiseOrValue, publicAccess: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; registerSystemHook( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, hook: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "registerTable(bytes16,bytes16,bytes32,bytes32,string[],string[])"( - namespace: PromiseOrValue, - name: PromiseOrValue, - keySchema: PromiseOrValue, - valueSchema: PromiseOrValue, - keyNames: PromiseOrValue[], - fieldNames: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "registerTable(bytes32,bytes32,bytes32,string[],string[])"( + registerTable( table: PromiseOrValue, keySchema: PromiseOrValue, valueSchema: PromiseOrValue, @@ -937,16 +691,8 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - registerTableHook( - namespace: PromiseOrValue, - name: PromiseOrValue, - hook: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - revokeAccess( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, grantee: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -956,17 +702,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "setField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "setField(bytes32,bytes32[],uint8,bytes,bytes32)"( + setField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -975,7 +711,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "setRecord(bytes32,bytes32[],bytes,bytes32)"( + setRecord( table: PromiseOrValue, key: PromiseOrValue[], data: PromiseOrValue, @@ -983,15 +719,6 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "setRecord(bytes16,bytes16,bytes32[],bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - staticArrayBytesStruct( arg0: [BytesStructStruct], overrides?: Overrides & { from?: PromiseOrValue } @@ -1002,7 +729,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "updateInField(bytes32,bytes32[],uint8,uint256,bytes,bytes32)"( + updateInField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -1012,44 +739,24 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - startByteIndex: PromiseOrValue, - dataToSet: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - willRevert( overrides?: Overrides & { from?: PromiseOrValue } ): Promise; }; call( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, funcSelectorAndArgs: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - "deleteRecord(bytes32,bytes32[],bytes32)"( + deleteRecord( table: PromiseOrValue, key: PromiseOrValue[], valueSchema: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "deleteRecord(bytes16,bytes16,bytes32[],bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - dynamicArrayBytesStruct( arg0: BytesStructStruct[], overrides?: Overrides & { from?: PromiseOrValue } @@ -1060,16 +767,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "emitEphemeralRecord(bytes16,bytes16,bytes32[],bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "emitEphemeralRecord(bytes32,bytes32[],bytes,bytes32)"( + emitEphemeralRecord( table: PromiseOrValue, key: PromiseOrValue[], data: PromiseOrValue, @@ -1121,8 +819,7 @@ export interface IWorld extends BaseContract { ): Promise; grantAccess( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, grantee: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -1149,7 +846,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "popFromField(bytes32,bytes32[],uint8,uint256,bytes32)"( + popFromField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -1158,17 +855,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "popFromField(bytes16,bytes16,bytes32[],uint8,uint256,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - byteLengthToPop: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "pushToField(bytes32,bytes32[],uint8,bytes,bytes32)"( + pushToField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -1177,39 +864,20 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "pushToField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - dataToPush: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - registerFunctionSelector( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, systemFunctionName: PromiseOrValue, systemFunctionArguments: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - registerHook( - namespace: PromiseOrValue, - name: PromiseOrValue, - hook: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - registerNamespace( namespace: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; registerRootFunctionSelector( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, worldFunctionSelector: PromiseOrValue, systemFunctionSelector: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } @@ -1222,31 +890,19 @@ export interface IWorld extends BaseContract { ): Promise; registerSystem( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, system: PromiseOrValue, publicAccess: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; registerSystemHook( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, hook: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "registerTable(bytes16,bytes16,bytes32,bytes32,string[],string[])"( - namespace: PromiseOrValue, - name: PromiseOrValue, - keySchema: PromiseOrValue, - valueSchema: PromiseOrValue, - keyNames: PromiseOrValue[], - fieldNames: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "registerTable(bytes32,bytes32,bytes32,string[],string[])"( + registerTable( table: PromiseOrValue, keySchema: PromiseOrValue, valueSchema: PromiseOrValue, @@ -1255,16 +911,8 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - registerTableHook( - namespace: PromiseOrValue, - name: PromiseOrValue, - hook: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - revokeAccess( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, grantee: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -1274,17 +922,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "setField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "setField(bytes32,bytes32[],uint8,bytes,bytes32)"( + setField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -1293,7 +931,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "setRecord(bytes32,bytes32[],bytes,bytes32)"( + setRecord( table: PromiseOrValue, key: PromiseOrValue[], data: PromiseOrValue, @@ -1301,15 +939,6 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "setRecord(bytes16,bytes16,bytes32[],bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - staticArrayBytesStruct( arg0: [BytesStructStruct], overrides?: Overrides & { from?: PromiseOrValue } @@ -1320,7 +949,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "updateInField(bytes32,bytes32[],uint8,uint256,bytes,bytes32)"( + updateInField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -1330,44 +959,24 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - startByteIndex: PromiseOrValue, - dataToSet: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - willRevert( overrides?: Overrides & { from?: PromiseOrValue } ): Promise; callStatic: { call( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, funcSelectorAndArgs: PromiseOrValue, overrides?: CallOverrides ): Promise; - "deleteRecord(bytes32,bytes32[],bytes32)"( + deleteRecord( table: PromiseOrValue, key: PromiseOrValue[], valueSchema: PromiseOrValue, overrides?: CallOverrides ): Promise; - "deleteRecord(bytes16,bytes16,bytes32[],bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - valueSchema: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - dynamicArrayBytesStruct( arg0: BytesStructStruct[], overrides?: CallOverrides @@ -1378,16 +987,7 @@ export interface IWorld extends BaseContract { overrides?: CallOverrides ): Promise; - "emitEphemeralRecord(bytes16,bytes16,bytes32[],bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "emitEphemeralRecord(bytes32,bytes32[],bytes,bytes32)"( + emitEphemeralRecord( table: PromiseOrValue, key: PromiseOrValue[], data: PromiseOrValue, @@ -1439,8 +1039,7 @@ export interface IWorld extends BaseContract { ): Promise; grantAccess( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, grantee: PromiseOrValue, overrides?: CallOverrides ): Promise; @@ -1465,7 +1064,7 @@ export interface IWorld extends BaseContract { overrides?: CallOverrides ): Promise; - "popFromField(bytes32,bytes32[],uint8,uint256,bytes32)"( + popFromField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -1474,17 +1073,7 @@ export interface IWorld extends BaseContract { overrides?: CallOverrides ): Promise; - "popFromField(bytes16,bytes16,bytes32[],uint8,uint256,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - byteLengthToPop: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "pushToField(bytes32,bytes32[],uint8,bytes,bytes32)"( + pushToField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -1493,39 +1082,20 @@ export interface IWorld extends BaseContract { overrides?: CallOverrides ): Promise; - "pushToField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - dataToPush: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - registerFunctionSelector( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, systemFunctionName: PromiseOrValue, systemFunctionArguments: PromiseOrValue, overrides?: CallOverrides ): Promise; - registerHook( - namespace: PromiseOrValue, - name: PromiseOrValue, - hook: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - registerNamespace( namespace: PromiseOrValue, overrides?: CallOverrides ): Promise; registerRootFunctionSelector( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, worldFunctionSelector: PromiseOrValue, systemFunctionSelector: PromiseOrValue, overrides?: CallOverrides @@ -1538,31 +1108,19 @@ export interface IWorld extends BaseContract { ): Promise; registerSystem( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, system: PromiseOrValue, publicAccess: PromiseOrValue, overrides?: CallOverrides - ): Promise; + ): Promise; registerSystemHook( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, hook: PromiseOrValue, overrides?: CallOverrides ): Promise; - "registerTable(bytes16,bytes16,bytes32,bytes32,string[],string[])"( - namespace: PromiseOrValue, - name: PromiseOrValue, - keySchema: PromiseOrValue, - valueSchema: PromiseOrValue, - keyNames: PromiseOrValue[], - fieldNames: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - "registerTable(bytes32,bytes32,bytes32,string[],string[])"( + registerTable( table: PromiseOrValue, keySchema: PromiseOrValue, valueSchema: PromiseOrValue, @@ -1571,16 +1129,8 @@ export interface IWorld extends BaseContract { overrides?: CallOverrides ): Promise; - registerTableHook( - namespace: PromiseOrValue, - name: PromiseOrValue, - hook: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - revokeAccess( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, grantee: PromiseOrValue, overrides?: CallOverrides ): Promise; @@ -1590,17 +1140,7 @@ export interface IWorld extends BaseContract { overrides?: CallOverrides ): Promise; - "setField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "setField(bytes32,bytes32[],uint8,bytes,bytes32)"( + setField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -1609,7 +1149,7 @@ export interface IWorld extends BaseContract { overrides?: CallOverrides ): Promise; - "setRecord(bytes32,bytes32[],bytes,bytes32)"( + setRecord( table: PromiseOrValue, key: PromiseOrValue[], data: PromiseOrValue, @@ -1617,15 +1157,6 @@ export interface IWorld extends BaseContract { overrides?: CallOverrides ): Promise; - "setRecord(bytes16,bytes16,bytes32[],bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - staticArrayBytesStruct( arg0: [BytesStructStruct], overrides?: CallOverrides @@ -1636,7 +1167,7 @@ export interface IWorld extends BaseContract { overrides?: CallOverrides ): Promise; - "updateInField(bytes32,bytes32[],uint8,uint256,bytes,bytes32)"( + updateInField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -1646,17 +1177,6 @@ export interface IWorld extends BaseContract { overrides?: CallOverrides ): Promise; - "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - startByteIndex: PromiseOrValue, - dataToSet: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - willRevert(overrides?: CallOverrides): Promise; }; @@ -1708,27 +1228,18 @@ export interface IWorld extends BaseContract { estimateGas: { call( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, funcSelectorAndArgs: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - "deleteRecord(bytes32,bytes32[],bytes32)"( + deleteRecord( table: PromiseOrValue, key: PromiseOrValue[], valueSchema: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "deleteRecord(bytes16,bytes16,bytes32[],bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - dynamicArrayBytesStruct( arg0: BytesStructStruct[], overrides?: Overrides & { from?: PromiseOrValue } @@ -1739,16 +1250,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "emitEphemeralRecord(bytes16,bytes16,bytes32[],bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "emitEphemeralRecord(bytes32,bytes32[],bytes,bytes32)"( + emitEphemeralRecord( table: PromiseOrValue, key: PromiseOrValue[], data: PromiseOrValue, @@ -1800,8 +1302,7 @@ export interface IWorld extends BaseContract { ): Promise; grantAccess( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, grantee: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -1828,7 +1329,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "popFromField(bytes32,bytes32[],uint8,uint256,bytes32)"( + popFromField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -1837,17 +1338,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "popFromField(bytes16,bytes16,bytes32[],uint8,uint256,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - byteLengthToPop: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "pushToField(bytes32,bytes32[],uint8,bytes,bytes32)"( + pushToField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -1856,39 +1347,20 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "pushToField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - dataToPush: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - registerFunctionSelector( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, systemFunctionName: PromiseOrValue, systemFunctionArguments: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - registerHook( - namespace: PromiseOrValue, - name: PromiseOrValue, - hook: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - registerNamespace( namespace: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; registerRootFunctionSelector( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, worldFunctionSelector: PromiseOrValue, systemFunctionSelector: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } @@ -1901,31 +1373,19 @@ export interface IWorld extends BaseContract { ): Promise; registerSystem( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, system: PromiseOrValue, publicAccess: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; registerSystemHook( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, hook: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "registerTable(bytes16,bytes16,bytes32,bytes32,string[],string[])"( - namespace: PromiseOrValue, - name: PromiseOrValue, - keySchema: PromiseOrValue, - valueSchema: PromiseOrValue, - keyNames: PromiseOrValue[], - fieldNames: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "registerTable(bytes32,bytes32,bytes32,string[],string[])"( + registerTable( table: PromiseOrValue, keySchema: PromiseOrValue, valueSchema: PromiseOrValue, @@ -1934,16 +1394,8 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - registerTableHook( - namespace: PromiseOrValue, - name: PromiseOrValue, - hook: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - revokeAccess( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, grantee: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -1953,17 +1405,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "setField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "setField(bytes32,bytes32[],uint8,bytes,bytes32)"( + setField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -1972,7 +1414,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "setRecord(bytes32,bytes32[],bytes,bytes32)"( + setRecord( table: PromiseOrValue, key: PromiseOrValue[], data: PromiseOrValue, @@ -1980,15 +1422,6 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "setRecord(bytes16,bytes16,bytes32[],bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - staticArrayBytesStruct( arg0: [BytesStructStruct], overrides?: Overrides & { from?: PromiseOrValue } @@ -1999,7 +1432,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "updateInField(bytes32,bytes32[],uint8,uint256,bytes,bytes32)"( + updateInField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -2009,17 +1442,6 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - startByteIndex: PromiseOrValue, - dataToSet: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - willRevert( overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -2027,27 +1449,18 @@ export interface IWorld extends BaseContract { populateTransaction: { call( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, funcSelectorAndArgs: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - "deleteRecord(bytes32,bytes32[],bytes32)"( + deleteRecord( table: PromiseOrValue, key: PromiseOrValue[], valueSchema: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "deleteRecord(bytes16,bytes16,bytes32[],bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - dynamicArrayBytesStruct( arg0: BytesStructStruct[], overrides?: Overrides & { from?: PromiseOrValue } @@ -2058,16 +1471,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "emitEphemeralRecord(bytes16,bytes16,bytes32[],bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "emitEphemeralRecord(bytes32,bytes32[],bytes,bytes32)"( + emitEphemeralRecord( table: PromiseOrValue, key: PromiseOrValue[], data: PromiseOrValue, @@ -2119,8 +1523,7 @@ export interface IWorld extends BaseContract { ): Promise; grantAccess( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, grantee: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -2147,7 +1550,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "popFromField(bytes32,bytes32[],uint8,uint256,bytes32)"( + popFromField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -2156,17 +1559,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "popFromField(bytes16,bytes16,bytes32[],uint8,uint256,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - byteLengthToPop: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "pushToField(bytes32,bytes32[],uint8,bytes,bytes32)"( + pushToField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -2175,39 +1568,20 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "pushToField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - dataToPush: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - registerFunctionSelector( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, systemFunctionName: PromiseOrValue, systemFunctionArguments: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - registerHook( - namespace: PromiseOrValue, - name: PromiseOrValue, - hook: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - registerNamespace( namespace: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; registerRootFunctionSelector( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, worldFunctionSelector: PromiseOrValue, systemFunctionSelector: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } @@ -2220,31 +1594,19 @@ export interface IWorld extends BaseContract { ): Promise; registerSystem( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, system: PromiseOrValue, publicAccess: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; registerSystemHook( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, hook: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "registerTable(bytes16,bytes16,bytes32,bytes32,string[],string[])"( - namespace: PromiseOrValue, - name: PromiseOrValue, - keySchema: PromiseOrValue, - valueSchema: PromiseOrValue, - keyNames: PromiseOrValue[], - fieldNames: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "registerTable(bytes32,bytes32,bytes32,string[],string[])"( + registerTable( table: PromiseOrValue, keySchema: PromiseOrValue, valueSchema: PromiseOrValue, @@ -2253,16 +1615,8 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - registerTableHook( - namespace: PromiseOrValue, - name: PromiseOrValue, - hook: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - revokeAccess( - namespace: PromiseOrValue, - name: PromiseOrValue, + resourceSelector: PromiseOrValue, grantee: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -2272,17 +1626,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "setField(bytes16,bytes16,bytes32[],uint8,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "setField(bytes32,bytes32[],uint8,bytes,bytes32)"( + setField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -2291,7 +1635,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "setRecord(bytes32,bytes32[],bytes,bytes32)"( + setRecord( table: PromiseOrValue, key: PromiseOrValue[], data: PromiseOrValue, @@ -2299,15 +1643,6 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "setRecord(bytes16,bytes16,bytes32[],bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - data: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - staticArrayBytesStruct( arg0: [BytesStructStruct], overrides?: Overrides & { from?: PromiseOrValue } @@ -2318,7 +1653,7 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "updateInField(bytes32,bytes32[],uint8,uint256,bytes,bytes32)"( + updateInField( table: PromiseOrValue, key: PromiseOrValue[], schemaIndex: PromiseOrValue, @@ -2328,17 +1663,6 @@ export interface IWorld extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes,bytes32)"( - namespace: PromiseOrValue, - name: PromiseOrValue, - key: PromiseOrValue[], - schemaIndex: PromiseOrValue, - startByteIndex: PromiseOrValue, - dataToSet: PromiseOrValue, - valueSchema: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - willRevert( overrides?: Overrides & { from?: PromiseOrValue } ): Promise; diff --git a/examples/minimal/packages/contracts/types/ethers-contracts/factories/IWorld__factory.ts b/examples/minimal/packages/contracts/types/ethers-contracts/factories/IWorld__factory.ts index 41d884b448..c9ac6862ea 100644 --- a/examples/minimal/packages/contracts/types/ethers-contracts/factories/IWorld__factory.ts +++ b/examples/minimal/packages/contracts/types/ethers-contracts/factories/IWorld__factory.ts @@ -320,14 +320,9 @@ const _abi = [ { inputs: [ { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", + internalType: "bytes32", + name: "resourceSelector", + type: "bytes32", }, { internalType: "bytes", @@ -369,34 +364,6 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, - { - inputs: [ - { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", - }, - { - internalType: "bytes32[]", - name: "key", - type: "bytes32[]", - }, - { - internalType: "Schema", - name: "valueSchema", - type: "bytes32", - }, - ], - name: "deleteRecord", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -437,39 +404,6 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, - { - inputs: [ - { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", - }, - { - internalType: "bytes32[]", - name: "key", - type: "bytes32[]", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "Schema", - name: "valueSchema", - type: "bytes32", - }, - ], - name: "emitEphemeralRecord", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -680,14 +614,9 @@ const _abi = [ { inputs: [ { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", + internalType: "bytes32", + name: "resourceSelector", + type: "bytes32", }, { internalType: "address", @@ -800,44 +729,6 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, - { - inputs: [ - { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", - }, - { - internalType: "bytes32[]", - name: "key", - type: "bytes32[]", - }, - { - internalType: "uint8", - name: "schemaIndex", - type: "uint8", - }, - { - internalType: "uint256", - name: "byteLengthToPop", - type: "uint256", - }, - { - internalType: "Schema", - name: "valueSchema", - type: "bytes32", - }, - ], - name: "popFromField", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -874,53 +765,10 @@ const _abi = [ { inputs: [ { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", - }, - { - internalType: "bytes32[]", - name: "key", - type: "bytes32[]", - }, - { - internalType: "uint8", - name: "schemaIndex", - type: "uint8", - }, - { - internalType: "bytes", - name: "dataToPush", - type: "bytes", - }, - { - internalType: "Schema", - name: "valueSchema", + internalType: "bytes32", + name: "resourceSelector", type: "bytes32", }, - ], - name: "pushToField", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", - }, { internalType: "string", name: "systemFunctionName", @@ -943,29 +791,6 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, - { - inputs: [ - { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", - }, - { - internalType: "address", - name: "hook", - type: "address", - }, - ], - name: "registerHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -982,14 +807,9 @@ const _abi = [ { inputs: [ { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", + internalType: "bytes32", + name: "resourceSelector", + type: "bytes32", }, { internalType: "bytes4", @@ -1034,14 +854,9 @@ const _abi = [ { inputs: [ { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", + internalType: "bytes32", + name: "resourceSelector", + type: "bytes32", }, { internalType: "contract System", @@ -1055,27 +870,16 @@ const _abi = [ }, ], name: "registerSystem", - outputs: [ - { - internalType: "bytes32", - name: "resourceSelector", - type: "bytes32", - }, - ], + outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", + internalType: "bytes32", + name: "resourceSelector", + type: "bytes32", }, { internalType: "contract ISystemHook", @@ -1088,50 +892,6 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, - { - inputs: [ - { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", - }, - { - 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: [ - { - internalType: "bytes32", - name: "resourceSelector", - type: "bytes32", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -1168,37 +928,9 @@ const _abi = [ { inputs: [ { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", - }, - { - internalType: "contract IStoreHook", - name: "hook", - type: "address", - }, - ], - name: "registerTableHook", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", + internalType: "bytes32", + name: "resourceSelector", + type: "bytes32", }, { internalType: "address", @@ -1224,44 +956,6 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, - { - inputs: [ - { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", - }, - { - internalType: "bytes32[]", - name: "key", - type: "bytes32[]", - }, - { - internalType: "uint8", - name: "schemaIndex", - type: "uint8", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "Schema", - name: "valueSchema", - type: "bytes32", - }, - ], - name: "setField", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -1323,39 +1017,6 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, - { - inputs: [ - { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", - }, - { - internalType: "bytes32[]", - name: "key", - type: "bytes32[]", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "Schema", - name: "valueSchema", - type: "bytes32", - }, - ], - name: "setRecord", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [ { @@ -1434,49 +1095,6 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, - { - inputs: [ - { - internalType: "bytes16", - name: "namespace", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "name", - type: "bytes16", - }, - { - internalType: "bytes32[]", - name: "key", - type: "bytes32[]", - }, - { - internalType: "uint8", - name: "schemaIndex", - type: "uint8", - }, - { - internalType: "uint256", - name: "startByteIndex", - type: "uint256", - }, - { - internalType: "bytes", - name: "dataToSet", - type: "bytes", - }, - { - internalType: "Schema", - name: "valueSchema", - type: "bytes32", - }, - ], - name: "updateInField", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [], name: "willRevert",