├── .gitignore ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── package.json ├── packages ├── client │ ├── .env │ ├── .eslintrc │ ├── .gitignore │ ├── index.html │ ├── package.json │ ├── src │ │ ├── index.ts │ │ └── mud │ │ │ ├── clientComponents.ts │ │ │ ├── contractComponents.ts │ │ │ ├── getNetworkConfig.ts │ │ │ ├── setup.ts │ │ │ ├── supportedChains │ │ │ ├── latticeTestnet.ts │ │ │ ├── localhost.ts │ │ │ └── types.ts │ │ │ └── world.ts │ ├── tsconfig.json │ └── vite.config.ts └── contracts │ ├── .gitignore │ ├── .prettierrc │ ├── .solhint.json │ ├── deploys │ ├── 4242 │ │ └── latest.json │ └── 31337 │ │ └── latest.json │ ├── foundry.toml │ ├── mud.config.mts │ ├── package.json │ ├── remappings.txt │ ├── script │ └── PostDeploy.s.sol │ ├── src │ ├── codegen │ │ ├── Tables.sol │ │ ├── tables │ │ │ └── CounterTable.sol │ │ └── world │ │ │ ├── IIncrementSystem.sol │ │ │ └── IWorld.sol │ └── systems │ │ └── IncrementSystem.sol │ ├── test │ └── CounterTest.t.sol │ ├── tsconfig.json │ └── types │ └── ethers-contracts │ ├── IWorld.ts │ ├── common.ts │ ├── factories │ ├── IWorld__factory.ts │ └── index.ts │ └── index.ts └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "solidity.remappings": [ 3 | "ds-test/=./node_modules/ds-test/src/", 4 | "solmate/=./node_modules/@rari-capital/solmate/src/", 5 | "forge-std/=./node_modules/forge-std/src/", 6 | "@latticexyz/=./node_modules/@latticexyz/" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2023 alvrs 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 14 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 15 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 17 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 18 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 19 | OR OTHER DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MUD2 SANDBOX 2 | 3 | [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flatticexyz%2Fv2sandbox&env=VITE_CHAIN_ID&envDescription=The%20VITE_CHAIN_ID%20environment%20variable%20is%20used%20to%20determine%20the%20chain%20deployment%20to%20link%20to%20the%20client%20by%20default.&project-name=mud2-project&repository-name=mud2-project&redirect-url=https%3A%2F%2Flatticexyz.notion.site%2FMUD-v2-Documentation-cd478ea455af46e7b245f7387deb9a9a&root-directory=packages%2Fclient) 4 | 5 | ## Getting started 6 | 7 | - Press the button above to copy this branch to a new repository on your account. Alternatively just clone this repository. 8 | - Run the following commands in the root folder of your project: 9 | 1. Install all dependencies: `yarn` 10 | 2. Initialize the auto-generated files: `yarn initialize` 11 | 3. Initialize the PRIVATE_KEY environment variable with the default anvil private key: `echo "PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" > packages/contracts/.env` 12 | 4. Run the project locally: `yarn dev` 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "v-2sandbox", 4 | "workspaces": [ 5 | "packages/contracts", 6 | "packages/client" 7 | ], 8 | "scripts": { 9 | "initialize": "yarn workspaces run initialize", 10 | "dev": "run-pty % yarn dev:node % yarn dev:client % yarn dev:contracts", 11 | "dev:client": "yarn workspace client run dev", 12 | "dev:node": "yarn workspace contracts run devnode", 13 | "dev:contracts": "yarn workspace contracts run dev", 14 | "link:mud": "for i in node_modules/@latticexyz/*; do yarn link @latticexyz/$(basename $i); done", 15 | "unlink:mud": "for i in node_modules/@latticexyz/*; do yarn unlink @latticexyz/$(basename $i); done && yarn install --force" 16 | }, 17 | "devDependencies": { 18 | "run-pty": "^4.0.3" 19 | }, 20 | "dependencies": {} 21 | } 22 | -------------------------------------------------------------------------------- /packages/client/.env: -------------------------------------------------------------------------------- 1 | VITE_CHAIN_ID=31337 2 | -------------------------------------------------------------------------------- /packages/client/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "node": true 4 | }, 5 | "parser": "@typescript-eslint/parser", 6 | "plugins": ["@typescript-eslint"], 7 | "extends": [ 8 | "eslint:recommended", 9 | "plugin:@typescript-eslint/eslint-recommended", 10 | "plugin:@typescript-eslint/recommended" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/client/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /packages/client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | a minimal MUD client 7 | 8 | 9 | 10 |
Counter: ??
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "license": "MIT", 4 | "private": true, 5 | "version": "0.0.0", 6 | "type": "module", 7 | "scripts": { 8 | "initialize": "yarn build", 9 | "dev": "vite", 10 | "build": "vite build", 11 | "preview": "vite preview" 12 | }, 13 | "devDependencies": { 14 | "@typescript-eslint/eslint-plugin": "^5.46.1", 15 | "@typescript-eslint/parser": "^5.46.1", 16 | "eslint": "^8.29.0", 17 | "typescript": "^4.9.5", 18 | "vite": "^3.2.3" 19 | }, 20 | "dependencies": { 21 | "@improbable-eng/grpc-web": "^0.15.0", 22 | "@latticexyz/cli": "2.0.0-alpha.9", 23 | "@latticexyz/network": "2.0.0-alpha.9", 24 | "@latticexyz/recs": "2.0.0-alpha.9", 25 | "@latticexyz/schema-type": "2.0.0-alpha.9", 26 | "@latticexyz/services": "2.0.0-alpha.9", 27 | "@latticexyz/std-client": "2.0.0-alpha.9", 28 | "@latticexyz/utils": "2.0.0-alpha.9", 29 | "@latticexyz/world": "2.0.0-alpha.9", 30 | "@wagmi/chains": "^0.2.14", 31 | "async-mutex": "^0.4.0", 32 | "ethers": "^5.7.2", 33 | "lodash": "^4.17.21", 34 | "mobx": "^6.7.0", 35 | "nice-grpc": "^2.0.1", 36 | "nice-grpc-web": "^2.0.1", 37 | "proxy-deep": "^3.1.1", 38 | "react": "^18.2.0", 39 | "rxjs": "^7.5.5", 40 | "threads": "^1.7.0", 41 | "viem": "^0.2.0" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /packages/client/src/index.ts: -------------------------------------------------------------------------------- 1 | import { setup } from "./mud/setup"; 2 | 3 | const { components, worldSend } = await setup(); 4 | 5 | // Components expose a stream that triggers when the component is updated. 6 | components.CounterTable.update$.subscribe((update) => { 7 | const [nextValue, prevValue] = update.value; 8 | console.log("Counter updated", update, { nextValue, prevValue }); 9 | document.getElementById("counter")!.innerHTML = String( 10 | nextValue?.value ?? "unset" 11 | ); 12 | }); 13 | 14 | // Just for demonstration purposes: we create a global function that can be 15 | // called to invoke the Increment system contract via the world. (See IncrementSystem.sol.) 16 | (window as any).increment = async () => { 17 | const tx = await worldSend("increment", []); 18 | 19 | console.log("increment tx", tx); 20 | console.log("increment result", await tx.wait()); 21 | }; 22 | -------------------------------------------------------------------------------- /packages/client/src/mud/clientComponents.ts: -------------------------------------------------------------------------------- 1 | export const clientComponents = {}; 2 | -------------------------------------------------------------------------------- /packages/client/src/mud/contractComponents.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | 3 | import { TableId } from "@latticexyz/utils"; 4 | import { defineComponent, Type as RecsType, World } from "@latticexyz/recs"; 5 | 6 | export function defineContractComponents(world: World) { 7 | return { 8 | CounterTable: (() => { 9 | const tableId = new TableId("", "counter"); 10 | return defineComponent( 11 | world, 12 | { 13 | value: RecsType.Number, 14 | }, 15 | { 16 | metadata: { 17 | contractId: tableId.toHexString(), 18 | tableId: tableId.toString(), 19 | }, 20 | } 21 | ); 22 | })(), 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /packages/client/src/mud/getNetworkConfig.ts: -------------------------------------------------------------------------------- 1 | import { SetupContractConfig, getBurnerWallet } from "@latticexyz/std-client"; 2 | 3 | import latticeTestnet from "./supportedChains/latticeTestnet"; 4 | import latestLatticeTestnetDeploy from "../../../contracts/deploys/4242/latest.json"; 5 | import localhost from "./supportedChains/localhost"; 6 | import latestLocalhostDeploy from "../../../contracts/deploys/31337/latest.json"; 7 | 8 | type NetworkConfig = SetupContractConfig & { 9 | privateKey: string; 10 | faucetServiceUrl?: string; 11 | }; 12 | 13 | export async function getNetworkConfig(): Promise { 14 | const params = new URLSearchParams(window.location.search); 15 | 16 | const supportedChains = [localhost, latticeTestnet]; 17 | const deploys = [latestLocalhostDeploy, latestLatticeTestnetDeploy]; 18 | 19 | const chainId = Number( 20 | params.get("chainId") || import.meta.env.VITE_CHAIN_ID 21 | ); 22 | const chainIndex = supportedChains.findIndex((c) => c.id === chainId); 23 | const chain = supportedChains[chainIndex]; 24 | if (!chain) { 25 | throw new Error(`Chain ${chainId} not found`); 26 | } 27 | 28 | const deploy = deploys[chainIndex]; 29 | if (!deploy) { 30 | throw new Error( 31 | `No deployment found for chain ${chainId}. Did you run \`mud deploy\`?` 32 | ); 33 | } 34 | 35 | const worldAddress = params.get("worldAddress") || deploy.worldAddress; 36 | if (!worldAddress) { 37 | throw new Error("No world address provided"); 38 | } 39 | 40 | return { 41 | clock: { 42 | period: 1000, 43 | initialTime: 0, 44 | syncInterval: 5000, 45 | }, 46 | provider: { 47 | chainId, 48 | jsonRpcUrl: params.get("rpc") ?? chain.rpcUrls.default.http[0], 49 | wsRpcUrl: params.get("wsRpc") ?? chain.rpcUrls.default.webSocket?.[0], 50 | }, 51 | privateKey: getBurnerWallet().value, 52 | chainId, 53 | modeUrl: params.get("mode") ?? chain.modeUrl, 54 | faucetServiceUrl: params.get("faucet") ?? chain.faucetUrl, 55 | worldAddress, 56 | initialBlockNumber: 57 | Number(params.get("initialBlockNumber")) || deploy.blockNumber || 0, 58 | devMode: params.get("dev") === "true", 59 | }; 60 | } 61 | -------------------------------------------------------------------------------- /packages/client/src/mud/setup.ts: -------------------------------------------------------------------------------- 1 | import { setupMUDV2Network } from "@latticexyz/std-client"; 2 | import { createFastTxExecutor, createFaucetService } from "@latticexyz/network"; 3 | import { getNetworkConfig } from "./getNetworkConfig"; 4 | import { defineContractComponents } from "./contractComponents"; 5 | import { clientComponents } from "./clientComponents"; 6 | import { world } from "./world"; 7 | import { Contract, Signer, utils } from "ethers"; 8 | import { JsonRpcProvider } from "@ethersproject/providers"; 9 | import { IWorld__factory } from "../../../contracts/types/ethers-contracts/factories/IWorld__factory"; 10 | 11 | export type SetupResult = Awaited>; 12 | 13 | export async function setup() { 14 | const contractComponents = defineContractComponents(world); 15 | const networkConfig = await getNetworkConfig(); 16 | const result = await setupMUDV2Network({ 17 | networkConfig, 18 | world, 19 | contractComponents, 20 | syncThread: "main", 21 | }); 22 | 23 | result.startSync(); 24 | 25 | // Request drip from faucet 26 | const signer = result.network.signer.get(); 27 | if (!networkConfig.devMode && networkConfig.faucetServiceUrl && signer) { 28 | const address = await signer.getAddress(); 29 | console.info("[Dev Faucet]: Player address -> ", address); 30 | 31 | const faucet = createFaucetService(networkConfig.faucetServiceUrl); 32 | 33 | const requestDrip = async () => { 34 | const balance = await signer.getBalance(); 35 | console.info(`[Dev Faucet]: Player balance -> ${balance}`); 36 | const lowBalance = balance?.lte(utils.parseEther("1")); 37 | if (lowBalance) { 38 | console.info("[Dev Faucet]: Balance is low, dripping funds to player"); 39 | // Double drip 40 | await faucet.dripDev({ address }); 41 | await faucet.dripDev({ address }); 42 | } 43 | }; 44 | 45 | requestDrip(); 46 | // Request a drip every 20 seconds 47 | setInterval(requestDrip, 20000); 48 | } 49 | 50 | // Create a World contract instance 51 | const worldContract = IWorld__factory.connect( 52 | networkConfig.worldAddress, 53 | signer ?? result.network.providers.get().json 54 | ); 55 | 56 | // Create a fast tx executor 57 | const fastTxExecutor = 58 | signer?.provider instanceof JsonRpcProvider 59 | ? await createFastTxExecutor( 60 | signer as Signer & { provider: JsonRpcProvider } 61 | ) 62 | : null; 63 | 64 | // TODO: infer this from fastTxExecute signature? 65 | type BoundFastTxExecuteFn = ( 66 | func: F, 67 | args: Parameters, 68 | options?: { 69 | retryCount?: number; 70 | } 71 | ) => Promise>; 72 | 73 | function bindFastTxExecute( 74 | contract: C 75 | ): BoundFastTxExecuteFn { 76 | return async function (...args) { 77 | if (!fastTxExecutor) { 78 | throw new Error("no signer"); 79 | } 80 | const { tx } = await fastTxExecutor.fastTxExecute(contract, ...args); 81 | return await tx; 82 | }; 83 | } 84 | 85 | return { 86 | ...result, 87 | components: { 88 | ...result.components, 89 | ...clientComponents, 90 | }, 91 | worldContract, 92 | worldSend: bindFastTxExecute(worldContract), 93 | fastTxExecutor, 94 | }; 95 | } 96 | -------------------------------------------------------------------------------- /packages/client/src/mud/supportedChains/latticeTestnet.ts: -------------------------------------------------------------------------------- 1 | import { MudChain } from "./types"; 2 | 3 | const latticeTestnet = { 4 | name: "Lattice Testnet", 5 | id: 4242, 6 | network: "lattice-testnet", 7 | nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH" }, 8 | rpcUrls: { 9 | default: { 10 | http: ["https://follower.testnet-chain.linfra.xyz"], 11 | webSocket: ["wss://follower.testnet-chain.linfra.xyz"], 12 | }, 13 | public: { 14 | http: ["https://follower.testnet-chain.linfra.xyz"], 15 | webSocket: ["wss://follower.testnet-chain.linfra.xyz"], 16 | }, 17 | }, 18 | modeUrl: "https://mode.testnet-mud-services.linfra.xyz", 19 | faucetUrl: "https://faucet.testnet-mud-services.linfra.xyz", 20 | } as const satisfies MudChain; 21 | 22 | export default latticeTestnet; 23 | -------------------------------------------------------------------------------- /packages/client/src/mud/supportedChains/localhost.ts: -------------------------------------------------------------------------------- 1 | import { MudChain } from "./types"; 2 | 3 | const localhost = { 4 | id: 31337, 5 | name: "Localhost", 6 | network: "localhost", 7 | nativeCurrency: { 8 | decimals: 18, 9 | name: "Ether", 10 | symbol: "ETH", 11 | }, 12 | rpcUrls: { 13 | default: { 14 | http: ["http://127.0.0.1:8545"], 15 | webSocket: ["ws://127.0.0.1:8545"], 16 | }, 17 | public: { 18 | http: ["http://127.0.0.1:8545"], 19 | webSocket: ["ws://127.0.0.1:8545"], 20 | }, 21 | }, 22 | modeUrl: undefined, 23 | faucetUrl: undefined, 24 | } as const satisfies MudChain; 25 | 26 | export default localhost; 27 | -------------------------------------------------------------------------------- /packages/client/src/mud/supportedChains/types.ts: -------------------------------------------------------------------------------- 1 | import { Chain } from "@wagmi/chains"; 2 | 3 | export type MudChain = Chain & { modeUrl?: string; faucetUrl?: string }; 4 | -------------------------------------------------------------------------------- /packages/client/src/mud/world.ts: -------------------------------------------------------------------------------- 1 | import { createWorld } from "@latticexyz/recs"; 2 | 3 | export const world = createWorld(); 4 | -------------------------------------------------------------------------------- /packages/client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "types": ["vite/client"], 4 | "target": "ESNext", 5 | "useDefineForClassFields": true, 6 | "module": "ESNext", 7 | "lib": ["ESNext", "DOM"], 8 | "moduleResolution": "Node", 9 | "strict": true, 10 | "resolveJsonModule": true, 11 | "isolatedModules": true, 12 | "esModuleInterop": true, 13 | "noEmit": true, 14 | "noUnusedLocals": true, 15 | "noUnusedParameters": true, 16 | "noImplicitReturns": true, 17 | "skipLibCheck": true 18 | }, 19 | "include": ["src"] 20 | } 21 | -------------------------------------------------------------------------------- /packages/client/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | 3 | export default defineConfig({ 4 | server: { 5 | port: 3000, 6 | fs: { 7 | strict: false, 8 | }, 9 | }, 10 | optimizeDeps: { 11 | esbuildOptions: { 12 | target: "es2022", 13 | }, 14 | }, 15 | build: { 16 | rollupOptions: { 17 | // TODO: revisit this config after splitting out mud config dependencies 18 | // from the cli package so we don't need to bundle the cli package 19 | external: ["chalk", "locate-path", "path-exists", "find-up"], 20 | }, 21 | target: "es2022", 22 | }, 23 | define: { 24 | "process.env": {}, 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /packages/contracts/.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | cache/ 3 | node_modules/ 4 | bindings/ 5 | artifacts/ 6 | abi/ 7 | broadcast/ 8 | .env 9 | 10 | # Ignore all deploy artifacts 11 | deploys/**/*.json 12 | # Except the latest ones (so we can load these into client) 13 | !deploys/**/latest.json 14 | -------------------------------------------------------------------------------- /packages/contracts/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "semi": true, 4 | "tabWidth": 2, 5 | "useTabs": false, 6 | "bracketSpacing": true 7 | } 8 | -------------------------------------------------------------------------------- /packages/contracts/.solhint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "solhint:recommended", 3 | "rules": { 4 | "compiler-version": ["error", ">=0.8.0"], 5 | "avoid-low-level-calls": "off", 6 | "no-inline-assembly": "off", 7 | "func-visibility": ["warn", { "ignoreConstructors": true }], 8 | "no-empty-blocks": "off", 9 | "no-complex-fallback": "off" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/contracts/deploys/31337/latest.json: -------------------------------------------------------------------------------- 1 | { 2 | "worldAddress": "0x5FbDB2315678afecb367f032d93F642f64180aa3", 3 | "blockNumber": 19 4 | } -------------------------------------------------------------------------------- /packages/contracts/deploys/4242/latest.json: -------------------------------------------------------------------------------- 1 | { 2 | "worldAddress": "0xf0F5e9b00b92f3999021fD8B88aC75c351D93fc7", 3 | "blockNumber": 10591501 4 | } -------------------------------------------------------------------------------- /packages/contracts/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | ffi = false 3 | fuzz_runs = 256 4 | optimizer = true 5 | optimizer_runs = 1000000 6 | verbosity = 1 7 | libs = ["../../node_modules", "../../../mud"] 8 | src = "src" 9 | test = "test" 10 | out = "out" 11 | extra_output_files = [ 12 | "abi", 13 | "evm.bytecode" 14 | ] 15 | fs_permissions = [{ access = "read", path = "./"}] 16 | 17 | [profile.lattice-testnet] 18 | eth_rpc_url = "https://follower.testnet-chain.linfra.xyz" -------------------------------------------------------------------------------- /packages/contracts/mud.config.mts: -------------------------------------------------------------------------------- 1 | import { mudConfig, resolveTableId } from "@latticexyz/config"; 2 | 3 | export default mudConfig({ 4 | overrideSystems: { 5 | IncrementSystem: { 6 | name: "increment", 7 | openAccess: true, 8 | }, 9 | }, 10 | tables: { 11 | CounterTable: { 12 | name: "counter", 13 | schema: { 14 | value: "uint32", 15 | }, 16 | storeArgument: true, 17 | }, 18 | }, 19 | modules: [ 20 | { 21 | name: "KeysWithValueModule", 22 | root: true, 23 | args: [resolveTableId("CounterTable")], 24 | }, 25 | ], 26 | }); 27 | -------------------------------------------------------------------------------- /packages/contracts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "contracts", 3 | "license": "MIT", 4 | "version": "0.0.0", 5 | "private": true, 6 | "scripts": { 7 | "----- EXTERNAL -----": "---------------------------", 8 | "initialize": "yarn tablegen && yarn worldgen && yarn build && yarn worldtypes && yarn tsgen", 9 | "devnode": "mud devnode", 10 | "build": "forge clean && forge build", 11 | "test": "mud test-v2", 12 | "dev": "yarn deploy", 13 | "deploy": "yarn initialize && mud deploy-v2", 14 | "deploy:testnet": "yarn initialize && mud deploy-v2 --profile=lattice-testnet", 15 | "----- INTERNAL -----": "---------------------------", 16 | "lint": "yarn prettier && yarn solhint", 17 | "tablegen": "mud tablegen", 18 | "worldgen": "mud worldgen", 19 | "worldtypes": "rimraf types && typechain --target=ethers-v5 out/IWorld.sol/IWorld.json", 20 | "tsgen": "mud tsgen --configPath mud.config.mts --out ../client/src/mud", 21 | "prettier": "prettier --write 'src/**/*.sol'", 22 | "solhint": "solhint --config ./.solhint.json 'src/**/*.sol' --fix" 23 | }, 24 | "devDependencies": { 25 | "@ethersproject/abi": "^5.7.0", 26 | "@ethersproject/bytes": "^5.7.0", 27 | "@ethersproject/providers": "^5.7.0", 28 | "@latticexyz/cli": "2.0.0-alpha.9", 29 | "@latticexyz/config": "2.0.0-alpha.9", 30 | "@latticexyz/schema-type": "2.0.0-alpha.9", 31 | "@latticexyz/solecs": "2.0.0-alpha.9", 32 | "@latticexyz/std-contracts": "2.0.0-alpha.9", 33 | "@latticexyz/store": "2.0.0-alpha.9", 34 | "@latticexyz/world": "2.0.0-alpha.9", 35 | "@rari-capital/solmate": "https://github.com/rari-capital/solmate.git#851ea3baa4327f453da723df75b1093b58b964dc", 36 | "@solidstate/contracts": "^0.0.52", 37 | "@typechain/ethers-v5": "^10.1.1", 38 | "@types/node": "^18.11.9", 39 | "ds-test": "https://github.com/dapphub/ds-test.git#c7a36fb236f298e04edf28e2fee385b80f53945f", 40 | "ethers": "^5.7.1", 41 | "forge-std": "https://github.com/foundry-rs/forge-std.git#b4f121555729b3afb3c5ffccb62ff4b6e2818fd3", 42 | "prettier": "^2.6.2", 43 | "prettier-plugin-solidity": "^1.0.0-beta.19", 44 | "rimraf": "^3.0.2", 45 | "run-pty": "^4.0.3", 46 | "solhint": "^3.3.7", 47 | "ts-node": "^10.9.1", 48 | "typechain": "^8.1.1", 49 | "typescript": "^4.9.5" 50 | }, 51 | "dependencies": {} 52 | } 53 | -------------------------------------------------------------------------------- /packages/contracts/remappings.txt: -------------------------------------------------------------------------------- 1 | ds-test/=../../node_modules/ds-test/src/ 2 | solmate/=../../node_modules/@rari-capital/solmate/src/ 3 | forge-std/=../../node_modules/forge-std/src/ 4 | @latticexyz/=../../node_modules/@latticexyz/ -------------------------------------------------------------------------------- /packages/contracts/script/PostDeploy.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.8.0; 3 | 4 | import "forge-std/Script.sol"; 5 | import { IWorld } from "../src/codegen/world/IWorld.sol"; 6 | 7 | contract PostDeploy is Script { 8 | function run(address worldAddress) external { 9 | // Load the private key from the `PRIVATE_KEY` environment variable (in .env) 10 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 11 | 12 | // Start broadcasting transactions from the deployer account 13 | vm.startBroadcast(deployerPrivateKey); 14 | 15 | // ------------------ EXAMPLES ------------------ 16 | 17 | // Call increment on the world via the registered function selector 18 | uint32 newValue = IWorld(worldAddress).increment(); 19 | console.log("Increment via IWorld:", newValue); 20 | 21 | vm.stopBroadcast(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/contracts/src/codegen/Tables.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.8.0; 3 | 4 | /* Autogenerated file. Do not edit manually. */ 5 | 6 | import { CounterTable, CounterTableTableId } from "./tables/CounterTable.sol"; 7 | -------------------------------------------------------------------------------- /packages/contracts/src/codegen/tables/CounterTable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.8.0; 3 | 4 | /* Autogenerated file. Do not edit manually. */ 5 | 6 | // Import schema type 7 | import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol"; 8 | 9 | // Import store internals 10 | import { IStore } from "@latticexyz/store/src/IStore.sol"; 11 | import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; 12 | import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; 13 | import { Bytes } from "@latticexyz/store/src/Bytes.sol"; 14 | import { Memory } from "@latticexyz/store/src/Memory.sol"; 15 | import { SliceLib } from "@latticexyz/store/src/Slice.sol"; 16 | import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol"; 17 | import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol"; 18 | import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol"; 19 | 20 | bytes32 constant _tableId = bytes32(abi.encodePacked(bytes16(""), bytes16("counter"))); 21 | bytes32 constant CounterTableTableId = _tableId; 22 | 23 | library CounterTable { 24 | /** Get the table's schema */ 25 | function getSchema() internal pure returns (Schema) { 26 | SchemaType[] memory _schema = new SchemaType[](1); 27 | _schema[0] = SchemaType.UINT32; 28 | 29 | return SchemaLib.encode(_schema); 30 | } 31 | 32 | function getKeySchema() internal pure returns (Schema) { 33 | SchemaType[] memory _schema = new SchemaType[](1); 34 | _schema[0] = SchemaType.BYTES32; 35 | 36 | return SchemaLib.encode(_schema); 37 | } 38 | 39 | /** Get the table's metadata */ 40 | function getMetadata() internal pure returns (string memory, string[] memory) { 41 | string[] memory _fieldNames = new string[](1); 42 | _fieldNames[0] = "value"; 43 | return ("CounterTable", _fieldNames); 44 | } 45 | 46 | /** Register the table's schema */ 47 | function registerSchema() internal { 48 | StoreSwitch.registerSchema(_tableId, getSchema(), getKeySchema()); 49 | } 50 | 51 | /** Register the table's schema (using the specified store) */ 52 | function registerSchema(IStore _store) internal { 53 | _store.registerSchema(_tableId, getSchema(), getKeySchema()); 54 | } 55 | 56 | /** Set the table's metadata */ 57 | function setMetadata() internal { 58 | (string memory _tableName, string[] memory _fieldNames) = getMetadata(); 59 | StoreSwitch.setMetadata(_tableId, _tableName, _fieldNames); 60 | } 61 | 62 | /** Set the table's metadata (using the specified store) */ 63 | function setMetadata(IStore _store) internal { 64 | (string memory _tableName, string[] memory _fieldNames) = getMetadata(); 65 | _store.setMetadata(_tableId, _tableName, _fieldNames); 66 | } 67 | 68 | /** Get value */ 69 | function get(bytes32 key) internal view returns (uint32 value) { 70 | bytes32[] memory _primaryKeys = new bytes32[](1); 71 | _primaryKeys[0] = bytes32((key)); 72 | 73 | bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 0); 74 | return (uint32(Bytes.slice4(_blob, 0))); 75 | } 76 | 77 | /** Get value (using the specified store) */ 78 | function get(IStore _store, bytes32 key) internal view returns (uint32 value) { 79 | bytes32[] memory _primaryKeys = new bytes32[](1); 80 | _primaryKeys[0] = bytes32((key)); 81 | 82 | bytes memory _blob = _store.getField(_tableId, _primaryKeys, 0); 83 | return (uint32(Bytes.slice4(_blob, 0))); 84 | } 85 | 86 | /** Set value */ 87 | function set(bytes32 key, uint32 value) internal { 88 | bytes32[] memory _primaryKeys = new bytes32[](1); 89 | _primaryKeys[0] = bytes32((key)); 90 | 91 | StoreSwitch.setField(_tableId, _primaryKeys, 0, abi.encodePacked((value))); 92 | } 93 | 94 | /** Set value (using the specified store) */ 95 | function set(IStore _store, bytes32 key, uint32 value) internal { 96 | bytes32[] memory _primaryKeys = new bytes32[](1); 97 | _primaryKeys[0] = bytes32((key)); 98 | 99 | _store.setField(_tableId, _primaryKeys, 0, abi.encodePacked((value))); 100 | } 101 | 102 | /** Tightly pack full data using this table's schema */ 103 | function encode(uint32 value) internal view returns (bytes memory) { 104 | return abi.encodePacked(value); 105 | } 106 | 107 | /* Delete all data for given keys */ 108 | function deleteRecord(bytes32 key) internal { 109 | bytes32[] memory _primaryKeys = new bytes32[](1); 110 | _primaryKeys[0] = bytes32((key)); 111 | 112 | StoreSwitch.deleteRecord(_tableId, _primaryKeys); 113 | } 114 | 115 | /* Delete all data for given keys (using the specified store) */ 116 | function deleteRecord(IStore _store, bytes32 key) internal { 117 | bytes32[] memory _primaryKeys = new bytes32[](1); 118 | _primaryKeys[0] = bytes32((key)); 119 | 120 | _store.deleteRecord(_tableId, _primaryKeys); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /packages/contracts/src/codegen/world/IIncrementSystem.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.8.0; 3 | 4 | /* Autogenerated file. Do not edit manually. */ 5 | 6 | interface IIncrementSystem { 7 | function increment() external returns (uint32); 8 | } 9 | -------------------------------------------------------------------------------- /packages/contracts/src/codegen/world/IWorld.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.8.0; 3 | 4 | /* Autogenerated file. Do not edit manually. */ 5 | 6 | import { IBaseWorld } from "@latticexyz/world/src/interfaces/IBaseWorld.sol"; 7 | 8 | import { IIncrementSystem } from "./IIncrementSystem.sol"; 9 | 10 | /** 11 | * The IWorld interface includes all systems dynamically added to the World 12 | * during the deploy process. 13 | */ 14 | interface IWorld is IBaseWorld, IIncrementSystem { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /packages/contracts/src/systems/IncrementSystem.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.8.0; 3 | import { console } from "forge-std/console.sol"; 4 | import { System } from "@latticexyz/world/src/System.sol"; 5 | import { CounterTable } from "../codegen/Tables.sol"; 6 | 7 | bytes32 constant SingletonKey = bytes32(uint256(0x060D)); 8 | 9 | contract IncrementSystem is System { 10 | function increment() public returns (uint32) { 11 | bytes32 key = SingletonKey; 12 | uint32 counter = CounterTable.get(key); 13 | uint32 newValue = counter + 1; 14 | CounterTable.set(key, newValue); 15 | return newValue; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/contracts/test/CounterTest.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.8.0; 3 | 4 | import "forge-std/Test.sol"; 5 | import { MudV2Test } from "@latticexyz/std-contracts/src/test/MudV2Test.t.sol"; 6 | import { getKeysWithValue } from "@latticexyz/world/src/modules/keyswithvalue/getKeysWithValue.sol"; 7 | 8 | import { IWorld } from "../src/codegen/world/IWorld.sol"; 9 | import { CounterTable, CounterTableTableId } from "../src/codegen/Tables.sol"; 10 | 11 | import { SingletonKey } from "../src/systems/IncrementSystem.sol"; 12 | 13 | contract CounterTest is MudV2Test { 14 | IWorld world; 15 | 16 | function setUp() public override { 17 | super.setUp(); 18 | world = IWorld(worldAddress); 19 | } 20 | 21 | function testWorldExists() public { 22 | uint256 codeSize; 23 | address addr = worldAddress; 24 | assembly { 25 | codeSize := extcodesize(addr) 26 | } 27 | assertTrue(codeSize > 0); 28 | } 29 | 30 | function testCounter() public { 31 | // Expect the counter to be 1 because it was incremented in the PostDeploy script. 32 | bytes32 key = SingletonKey; 33 | uint32 counter = CounterTable.get(world, key); 34 | assertEq(counter, 1); 35 | 36 | // Expect the counter to be 2 after calling increment. 37 | world.increment(); 38 | counter = CounterTable.get(world, key); 39 | assertEq(counter, 2); 40 | } 41 | 42 | function testKeysWithValue() public { 43 | bytes32 key = SingletonKey; 44 | uint32 counter = CounterTable.get(world, key); 45 | bytes32[] memory keysWithValue = getKeysWithValue(world, CounterTableTableId, CounterTable.encode(counter)); 46 | assertEq(keysWithValue.length, 1); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /packages/contracts/tsconfig.json: -------------------------------------------------------------------------------- 1 | // Visit https://aka.ms/tsconfig.json for all config options 2 | { 3 | "compilerOptions": { 4 | "target": "ES2020", 5 | "module": "commonjs", 6 | "strict": true, 7 | "resolveJsonModule": true, 8 | "esModuleInterop": true, 9 | "skipLibCheck": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "moduleResolution": "node" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/contracts/types/ethers-contracts/IWorld.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { 5 | BaseContract, 6 | BigNumber, 7 | BigNumberish, 8 | BytesLike, 9 | CallOverrides, 10 | ContractTransaction, 11 | Overrides, 12 | PayableOverrides, 13 | PopulatedTransaction, 14 | Signer, 15 | utils, 16 | } from "ethers"; 17 | import type { 18 | FunctionFragment, 19 | Result, 20 | EventFragment, 21 | } from "@ethersproject/abi"; 22 | import type { Listener, Provider } from "@ethersproject/providers"; 23 | import type { 24 | TypedEventFilter, 25 | TypedEvent, 26 | TypedListener, 27 | OnEvent, 28 | PromiseOrValue, 29 | } from "./common"; 30 | 31 | export interface IWorldInterface extends utils.Interface { 32 | functions: { 33 | "call(bytes16,bytes16,bytes)": FunctionFragment; 34 | "deleteRecord(bytes32,bytes32[])": FunctionFragment; 35 | "deleteRecord(bytes16,bytes16,bytes32[])": FunctionFragment; 36 | "getField(bytes32,bytes32[],uint8)": FunctionFragment; 37 | "getKeySchema(bytes32)": FunctionFragment; 38 | "getRecord(bytes32,bytes32[],bytes32)": FunctionFragment; 39 | "getRecord(bytes32,bytes32[])": FunctionFragment; 40 | "getSchema(bytes32)": FunctionFragment; 41 | "grantAccess(bytes16,bytes16,address)": FunctionFragment; 42 | "increment()": FunctionFragment; 43 | "installModule(address,bytes)": FunctionFragment; 44 | "installRootModule(address,bytes)": FunctionFragment; 45 | "isStore()": FunctionFragment; 46 | "pushToField(bytes32,bytes32[],uint8,bytes)": FunctionFragment; 47 | "pushToField(bytes16,bytes16,bytes32[],uint8,bytes)": FunctionFragment; 48 | "registerFunctionSelector(bytes16,bytes16,string,string)": FunctionFragment; 49 | "registerHook(bytes16,bytes16,address)": FunctionFragment; 50 | "registerNamespace(bytes16)": FunctionFragment; 51 | "registerRootFunctionSelector(bytes16,bytes16,bytes4,bytes4)": FunctionFragment; 52 | "registerSchema(bytes32,bytes32,bytes32)": FunctionFragment; 53 | "registerStoreHook(bytes32,address)": FunctionFragment; 54 | "registerSystem(bytes16,bytes16,address,bool)": FunctionFragment; 55 | "registerSystemHook(bytes16,bytes16,address)": FunctionFragment; 56 | "registerTable(bytes16,bytes16,bytes32,bytes32)": FunctionFragment; 57 | "registerTableHook(bytes16,bytes16,address)": FunctionFragment; 58 | "revokeAccess(bytes16,bytes16,address)": FunctionFragment; 59 | "setField(bytes32,bytes32[],uint8,bytes)": FunctionFragment; 60 | "setField(bytes16,bytes16,bytes32[],uint8,bytes)": FunctionFragment; 61 | "setMetadata(bytes16,bytes16,string,string[])": FunctionFragment; 62 | "setMetadata(bytes32,string,string[])": FunctionFragment; 63 | "setRecord(bytes16,bytes16,bytes32[],bytes)": FunctionFragment; 64 | "setRecord(bytes32,bytes32[],bytes)": FunctionFragment; 65 | "updateInField(bytes32,bytes32[],uint8,uint256,bytes)": FunctionFragment; 66 | "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes)": FunctionFragment; 67 | }; 68 | 69 | getFunction( 70 | nameOrSignatureOrTopic: 71 | | "call" 72 | | "deleteRecord(bytes32,bytes32[])" 73 | | "deleteRecord(bytes16,bytes16,bytes32[])" 74 | | "getField" 75 | | "getKeySchema" 76 | | "getRecord(bytes32,bytes32[],bytes32)" 77 | | "getRecord(bytes32,bytes32[])" 78 | | "getSchema" 79 | | "grantAccess" 80 | | "increment" 81 | | "installModule" 82 | | "installRootModule" 83 | | "isStore" 84 | | "pushToField(bytes32,bytes32[],uint8,bytes)" 85 | | "pushToField(bytes16,bytes16,bytes32[],uint8,bytes)" 86 | | "registerFunctionSelector" 87 | | "registerHook" 88 | | "registerNamespace" 89 | | "registerRootFunctionSelector" 90 | | "registerSchema" 91 | | "registerStoreHook" 92 | | "registerSystem" 93 | | "registerSystemHook" 94 | | "registerTable" 95 | | "registerTableHook" 96 | | "revokeAccess" 97 | | "setField(bytes32,bytes32[],uint8,bytes)" 98 | | "setField(bytes16,bytes16,bytes32[],uint8,bytes)" 99 | | "setMetadata(bytes16,bytes16,string,string[])" 100 | | "setMetadata(bytes32,string,string[])" 101 | | "setRecord(bytes16,bytes16,bytes32[],bytes)" 102 | | "setRecord(bytes32,bytes32[],bytes)" 103 | | "updateInField(bytes32,bytes32[],uint8,uint256,bytes)" 104 | | "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes)" 105 | ): FunctionFragment; 106 | 107 | encodeFunctionData( 108 | functionFragment: "call", 109 | values: [ 110 | PromiseOrValue, 111 | PromiseOrValue, 112 | PromiseOrValue 113 | ] 114 | ): string; 115 | encodeFunctionData( 116 | functionFragment: "deleteRecord(bytes32,bytes32[])", 117 | values: [PromiseOrValue, PromiseOrValue[]] 118 | ): string; 119 | encodeFunctionData( 120 | functionFragment: "deleteRecord(bytes16,bytes16,bytes32[])", 121 | values: [ 122 | PromiseOrValue, 123 | PromiseOrValue, 124 | PromiseOrValue[] 125 | ] 126 | ): string; 127 | encodeFunctionData( 128 | functionFragment: "getField", 129 | values: [ 130 | PromiseOrValue, 131 | PromiseOrValue[], 132 | PromiseOrValue 133 | ] 134 | ): string; 135 | encodeFunctionData( 136 | functionFragment: "getKeySchema", 137 | values: [PromiseOrValue] 138 | ): string; 139 | encodeFunctionData( 140 | functionFragment: "getRecord(bytes32,bytes32[],bytes32)", 141 | values: [ 142 | PromiseOrValue, 143 | PromiseOrValue[], 144 | PromiseOrValue 145 | ] 146 | ): string; 147 | encodeFunctionData( 148 | functionFragment: "getRecord(bytes32,bytes32[])", 149 | values: [PromiseOrValue, PromiseOrValue[]] 150 | ): string; 151 | encodeFunctionData( 152 | functionFragment: "getSchema", 153 | values: [PromiseOrValue] 154 | ): string; 155 | encodeFunctionData( 156 | functionFragment: "grantAccess", 157 | values: [ 158 | PromiseOrValue, 159 | PromiseOrValue, 160 | PromiseOrValue 161 | ] 162 | ): string; 163 | encodeFunctionData(functionFragment: "increment", values?: undefined): string; 164 | encodeFunctionData( 165 | functionFragment: "installModule", 166 | values: [PromiseOrValue, PromiseOrValue] 167 | ): string; 168 | encodeFunctionData( 169 | functionFragment: "installRootModule", 170 | values: [PromiseOrValue, PromiseOrValue] 171 | ): string; 172 | encodeFunctionData(functionFragment: "isStore", values?: undefined): string; 173 | encodeFunctionData( 174 | functionFragment: "pushToField(bytes32,bytes32[],uint8,bytes)", 175 | values: [ 176 | PromiseOrValue, 177 | PromiseOrValue[], 178 | PromiseOrValue, 179 | PromiseOrValue 180 | ] 181 | ): string; 182 | encodeFunctionData( 183 | functionFragment: "pushToField(bytes16,bytes16,bytes32[],uint8,bytes)", 184 | values: [ 185 | PromiseOrValue, 186 | PromiseOrValue, 187 | PromiseOrValue[], 188 | PromiseOrValue, 189 | PromiseOrValue 190 | ] 191 | ): string; 192 | encodeFunctionData( 193 | functionFragment: "registerFunctionSelector", 194 | values: [ 195 | PromiseOrValue, 196 | PromiseOrValue, 197 | PromiseOrValue, 198 | PromiseOrValue 199 | ] 200 | ): string; 201 | encodeFunctionData( 202 | functionFragment: "registerHook", 203 | values: [ 204 | PromiseOrValue, 205 | PromiseOrValue, 206 | PromiseOrValue 207 | ] 208 | ): string; 209 | encodeFunctionData( 210 | functionFragment: "registerNamespace", 211 | values: [PromiseOrValue] 212 | ): string; 213 | encodeFunctionData( 214 | functionFragment: "registerRootFunctionSelector", 215 | values: [ 216 | PromiseOrValue, 217 | PromiseOrValue, 218 | PromiseOrValue, 219 | PromiseOrValue 220 | ] 221 | ): string; 222 | encodeFunctionData( 223 | functionFragment: "registerSchema", 224 | values: [ 225 | PromiseOrValue, 226 | PromiseOrValue, 227 | PromiseOrValue 228 | ] 229 | ): string; 230 | encodeFunctionData( 231 | functionFragment: "registerStoreHook", 232 | values: [PromiseOrValue, PromiseOrValue] 233 | ): string; 234 | encodeFunctionData( 235 | functionFragment: "registerSystem", 236 | values: [ 237 | PromiseOrValue, 238 | PromiseOrValue, 239 | PromiseOrValue, 240 | PromiseOrValue 241 | ] 242 | ): string; 243 | encodeFunctionData( 244 | functionFragment: "registerSystemHook", 245 | values: [ 246 | PromiseOrValue, 247 | PromiseOrValue, 248 | PromiseOrValue 249 | ] 250 | ): string; 251 | encodeFunctionData( 252 | functionFragment: "registerTable", 253 | values: [ 254 | PromiseOrValue, 255 | PromiseOrValue, 256 | PromiseOrValue, 257 | PromiseOrValue 258 | ] 259 | ): string; 260 | encodeFunctionData( 261 | functionFragment: "registerTableHook", 262 | values: [ 263 | PromiseOrValue, 264 | PromiseOrValue, 265 | PromiseOrValue 266 | ] 267 | ): string; 268 | encodeFunctionData( 269 | functionFragment: "revokeAccess", 270 | values: [ 271 | PromiseOrValue, 272 | PromiseOrValue, 273 | PromiseOrValue 274 | ] 275 | ): string; 276 | encodeFunctionData( 277 | functionFragment: "setField(bytes32,bytes32[],uint8,bytes)", 278 | values: [ 279 | PromiseOrValue, 280 | PromiseOrValue[], 281 | PromiseOrValue, 282 | PromiseOrValue 283 | ] 284 | ): string; 285 | encodeFunctionData( 286 | functionFragment: "setField(bytes16,bytes16,bytes32[],uint8,bytes)", 287 | values: [ 288 | PromiseOrValue, 289 | PromiseOrValue, 290 | PromiseOrValue[], 291 | PromiseOrValue, 292 | PromiseOrValue 293 | ] 294 | ): string; 295 | encodeFunctionData( 296 | functionFragment: "setMetadata(bytes16,bytes16,string,string[])", 297 | values: [ 298 | PromiseOrValue, 299 | PromiseOrValue, 300 | PromiseOrValue, 301 | PromiseOrValue[] 302 | ] 303 | ): string; 304 | encodeFunctionData( 305 | functionFragment: "setMetadata(bytes32,string,string[])", 306 | values: [ 307 | PromiseOrValue, 308 | PromiseOrValue, 309 | PromiseOrValue[] 310 | ] 311 | ): string; 312 | encodeFunctionData( 313 | functionFragment: "setRecord(bytes16,bytes16,bytes32[],bytes)", 314 | values: [ 315 | PromiseOrValue, 316 | PromiseOrValue, 317 | PromiseOrValue[], 318 | PromiseOrValue 319 | ] 320 | ): string; 321 | encodeFunctionData( 322 | functionFragment: "setRecord(bytes32,bytes32[],bytes)", 323 | values: [ 324 | PromiseOrValue, 325 | PromiseOrValue[], 326 | PromiseOrValue 327 | ] 328 | ): string; 329 | encodeFunctionData( 330 | functionFragment: "updateInField(bytes32,bytes32[],uint8,uint256,bytes)", 331 | values: [ 332 | PromiseOrValue, 333 | PromiseOrValue[], 334 | PromiseOrValue, 335 | PromiseOrValue, 336 | PromiseOrValue 337 | ] 338 | ): string; 339 | encodeFunctionData( 340 | functionFragment: "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes)", 341 | values: [ 342 | PromiseOrValue, 343 | PromiseOrValue, 344 | PromiseOrValue[], 345 | PromiseOrValue, 346 | PromiseOrValue, 347 | PromiseOrValue 348 | ] 349 | ): string; 350 | 351 | decodeFunctionResult(functionFragment: "call", data: BytesLike): Result; 352 | decodeFunctionResult( 353 | functionFragment: "deleteRecord(bytes32,bytes32[])", 354 | data: BytesLike 355 | ): Result; 356 | decodeFunctionResult( 357 | functionFragment: "deleteRecord(bytes16,bytes16,bytes32[])", 358 | data: BytesLike 359 | ): Result; 360 | decodeFunctionResult(functionFragment: "getField", data: BytesLike): Result; 361 | decodeFunctionResult( 362 | functionFragment: "getKeySchema", 363 | data: BytesLike 364 | ): Result; 365 | decodeFunctionResult( 366 | functionFragment: "getRecord(bytes32,bytes32[],bytes32)", 367 | data: BytesLike 368 | ): Result; 369 | decodeFunctionResult( 370 | functionFragment: "getRecord(bytes32,bytes32[])", 371 | data: BytesLike 372 | ): Result; 373 | decodeFunctionResult(functionFragment: "getSchema", data: BytesLike): Result; 374 | decodeFunctionResult( 375 | functionFragment: "grantAccess", 376 | data: BytesLike 377 | ): Result; 378 | decodeFunctionResult(functionFragment: "increment", data: BytesLike): Result; 379 | decodeFunctionResult( 380 | functionFragment: "installModule", 381 | data: BytesLike 382 | ): Result; 383 | decodeFunctionResult( 384 | functionFragment: "installRootModule", 385 | data: BytesLike 386 | ): Result; 387 | decodeFunctionResult(functionFragment: "isStore", data: BytesLike): Result; 388 | decodeFunctionResult( 389 | functionFragment: "pushToField(bytes32,bytes32[],uint8,bytes)", 390 | data: BytesLike 391 | ): Result; 392 | decodeFunctionResult( 393 | functionFragment: "pushToField(bytes16,bytes16,bytes32[],uint8,bytes)", 394 | data: BytesLike 395 | ): Result; 396 | decodeFunctionResult( 397 | functionFragment: "registerFunctionSelector", 398 | data: BytesLike 399 | ): Result; 400 | decodeFunctionResult( 401 | functionFragment: "registerHook", 402 | data: BytesLike 403 | ): Result; 404 | decodeFunctionResult( 405 | functionFragment: "registerNamespace", 406 | data: BytesLike 407 | ): Result; 408 | decodeFunctionResult( 409 | functionFragment: "registerRootFunctionSelector", 410 | data: BytesLike 411 | ): Result; 412 | decodeFunctionResult( 413 | functionFragment: "registerSchema", 414 | data: BytesLike 415 | ): Result; 416 | decodeFunctionResult( 417 | functionFragment: "registerStoreHook", 418 | data: BytesLike 419 | ): Result; 420 | decodeFunctionResult( 421 | functionFragment: "registerSystem", 422 | data: BytesLike 423 | ): Result; 424 | decodeFunctionResult( 425 | functionFragment: "registerSystemHook", 426 | data: BytesLike 427 | ): Result; 428 | decodeFunctionResult( 429 | functionFragment: "registerTable", 430 | data: BytesLike 431 | ): Result; 432 | decodeFunctionResult( 433 | functionFragment: "registerTableHook", 434 | data: BytesLike 435 | ): Result; 436 | decodeFunctionResult( 437 | functionFragment: "revokeAccess", 438 | data: BytesLike 439 | ): Result; 440 | decodeFunctionResult( 441 | functionFragment: "setField(bytes32,bytes32[],uint8,bytes)", 442 | data: BytesLike 443 | ): Result; 444 | decodeFunctionResult( 445 | functionFragment: "setField(bytes16,bytes16,bytes32[],uint8,bytes)", 446 | data: BytesLike 447 | ): Result; 448 | decodeFunctionResult( 449 | functionFragment: "setMetadata(bytes16,bytes16,string,string[])", 450 | data: BytesLike 451 | ): Result; 452 | decodeFunctionResult( 453 | functionFragment: "setMetadata(bytes32,string,string[])", 454 | data: BytesLike 455 | ): Result; 456 | decodeFunctionResult( 457 | functionFragment: "setRecord(bytes16,bytes16,bytes32[],bytes)", 458 | data: BytesLike 459 | ): Result; 460 | decodeFunctionResult( 461 | functionFragment: "setRecord(bytes32,bytes32[],bytes)", 462 | data: BytesLike 463 | ): Result; 464 | decodeFunctionResult( 465 | functionFragment: "updateInField(bytes32,bytes32[],uint8,uint256,bytes)", 466 | data: BytesLike 467 | ): Result; 468 | decodeFunctionResult( 469 | functionFragment: "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes)", 470 | data: BytesLike 471 | ): Result; 472 | 473 | events: { 474 | "StoreDeleteRecord(bytes32,bytes32[])": EventFragment; 475 | "StoreSetField(bytes32,bytes32[],uint8,bytes)": EventFragment; 476 | "StoreSetRecord(bytes32,bytes32[],bytes)": EventFragment; 477 | }; 478 | 479 | getEvent(nameOrSignatureOrTopic: "StoreDeleteRecord"): EventFragment; 480 | getEvent(nameOrSignatureOrTopic: "StoreSetField"): EventFragment; 481 | getEvent(nameOrSignatureOrTopic: "StoreSetRecord"): EventFragment; 482 | } 483 | 484 | export interface StoreDeleteRecordEventObject { 485 | table: string; 486 | key: string[]; 487 | } 488 | export type StoreDeleteRecordEvent = TypedEvent< 489 | [string, string[]], 490 | StoreDeleteRecordEventObject 491 | >; 492 | 493 | export type StoreDeleteRecordEventFilter = 494 | TypedEventFilter; 495 | 496 | export interface StoreSetFieldEventObject { 497 | table: string; 498 | key: string[]; 499 | schemaIndex: number; 500 | data: string; 501 | } 502 | export type StoreSetFieldEvent = TypedEvent< 503 | [string, string[], number, string], 504 | StoreSetFieldEventObject 505 | >; 506 | 507 | export type StoreSetFieldEventFilter = TypedEventFilter; 508 | 509 | export interface StoreSetRecordEventObject { 510 | table: string; 511 | key: string[]; 512 | data: string; 513 | } 514 | export type StoreSetRecordEvent = TypedEvent< 515 | [string, string[], string], 516 | StoreSetRecordEventObject 517 | >; 518 | 519 | export type StoreSetRecordEventFilter = TypedEventFilter; 520 | 521 | export interface IWorld extends BaseContract { 522 | connect(signerOrProvider: Signer | Provider | string): this; 523 | attach(addressOrName: string): this; 524 | deployed(): Promise; 525 | 526 | interface: IWorldInterface; 527 | 528 | queryFilter( 529 | event: TypedEventFilter, 530 | fromBlockOrBlockhash?: string | number | undefined, 531 | toBlock?: string | number | undefined 532 | ): Promise>; 533 | 534 | listeners( 535 | eventFilter?: TypedEventFilter 536 | ): Array>; 537 | listeners(eventName?: string): Array; 538 | removeAllListeners( 539 | eventFilter: TypedEventFilter 540 | ): this; 541 | removeAllListeners(eventName?: string): this; 542 | off: OnEvent; 543 | on: OnEvent; 544 | once: OnEvent; 545 | removeListener: OnEvent; 546 | 547 | functions: { 548 | call( 549 | namespace: PromiseOrValue, 550 | name: PromiseOrValue, 551 | funcSelectorAndArgs: PromiseOrValue, 552 | overrides?: PayableOverrides & { from?: PromiseOrValue } 553 | ): Promise; 554 | 555 | "deleteRecord(bytes32,bytes32[])"( 556 | table: PromiseOrValue, 557 | key: PromiseOrValue[], 558 | overrides?: Overrides & { from?: PromiseOrValue } 559 | ): Promise; 560 | 561 | "deleteRecord(bytes16,bytes16,bytes32[])"( 562 | namespace: PromiseOrValue, 563 | name: PromiseOrValue, 564 | key: PromiseOrValue[], 565 | overrides?: Overrides & { from?: PromiseOrValue } 566 | ): Promise; 567 | 568 | getField( 569 | table: PromiseOrValue, 570 | key: PromiseOrValue[], 571 | schemaIndex: PromiseOrValue, 572 | overrides?: CallOverrides 573 | ): Promise<[string] & { data: string }>; 574 | 575 | getKeySchema( 576 | table: PromiseOrValue, 577 | overrides?: CallOverrides 578 | ): Promise<[string] & { schema: string }>; 579 | 580 | "getRecord(bytes32,bytes32[],bytes32)"( 581 | table: PromiseOrValue, 582 | key: PromiseOrValue[], 583 | schema: PromiseOrValue, 584 | overrides?: CallOverrides 585 | ): Promise<[string] & { data: string }>; 586 | 587 | "getRecord(bytes32,bytes32[])"( 588 | table: PromiseOrValue, 589 | key: PromiseOrValue[], 590 | overrides?: CallOverrides 591 | ): Promise<[string] & { data: string }>; 592 | 593 | getSchema( 594 | table: PromiseOrValue, 595 | overrides?: CallOverrides 596 | ): Promise<[string] & { schema: string }>; 597 | 598 | grantAccess( 599 | namespace: PromiseOrValue, 600 | name: PromiseOrValue, 601 | grantee: PromiseOrValue, 602 | overrides?: Overrides & { from?: PromiseOrValue } 603 | ): Promise; 604 | 605 | increment( 606 | overrides?: Overrides & { from?: PromiseOrValue } 607 | ): Promise; 608 | 609 | installModule( 610 | module: PromiseOrValue, 611 | args: PromiseOrValue, 612 | overrides?: Overrides & { from?: PromiseOrValue } 613 | ): Promise; 614 | 615 | installRootModule( 616 | module: PromiseOrValue, 617 | args: PromiseOrValue, 618 | overrides?: Overrides & { from?: PromiseOrValue } 619 | ): Promise; 620 | 621 | isStore(overrides?: CallOverrides): Promise<[void]>; 622 | 623 | "pushToField(bytes32,bytes32[],uint8,bytes)"( 624 | table: PromiseOrValue, 625 | key: PromiseOrValue[], 626 | schemaIndex: PromiseOrValue, 627 | dataToPush: PromiseOrValue, 628 | overrides?: Overrides & { from?: PromiseOrValue } 629 | ): Promise; 630 | 631 | "pushToField(bytes16,bytes16,bytes32[],uint8,bytes)"( 632 | namespace: PromiseOrValue, 633 | name: PromiseOrValue, 634 | key: PromiseOrValue[], 635 | schemaIndex: PromiseOrValue, 636 | dataToPush: PromiseOrValue, 637 | overrides?: Overrides & { from?: PromiseOrValue } 638 | ): Promise; 639 | 640 | registerFunctionSelector( 641 | namespace: PromiseOrValue, 642 | name: PromiseOrValue, 643 | systemFunctionName: PromiseOrValue, 644 | systemFunctionArguments: PromiseOrValue, 645 | overrides?: Overrides & { from?: PromiseOrValue } 646 | ): Promise; 647 | 648 | registerHook( 649 | namespace: PromiseOrValue, 650 | name: PromiseOrValue, 651 | hook: PromiseOrValue, 652 | overrides?: Overrides & { from?: PromiseOrValue } 653 | ): Promise; 654 | 655 | registerNamespace( 656 | namespace: PromiseOrValue, 657 | overrides?: Overrides & { from?: PromiseOrValue } 658 | ): Promise; 659 | 660 | registerRootFunctionSelector( 661 | namespace: PromiseOrValue, 662 | name: PromiseOrValue, 663 | worldFunctionSelector: PromiseOrValue, 664 | systemFunctionSelector: PromiseOrValue, 665 | overrides?: Overrides & { from?: PromiseOrValue } 666 | ): Promise; 667 | 668 | registerSchema( 669 | table: PromiseOrValue, 670 | schema: PromiseOrValue, 671 | keySchema: PromiseOrValue, 672 | overrides?: Overrides & { from?: PromiseOrValue } 673 | ): Promise; 674 | 675 | registerStoreHook( 676 | table: PromiseOrValue, 677 | hook: PromiseOrValue, 678 | overrides?: Overrides & { from?: PromiseOrValue } 679 | ): Promise; 680 | 681 | registerSystem( 682 | namespace: PromiseOrValue, 683 | name: PromiseOrValue, 684 | system: PromiseOrValue, 685 | publicAccess: PromiseOrValue, 686 | overrides?: Overrides & { from?: PromiseOrValue } 687 | ): Promise; 688 | 689 | registerSystemHook( 690 | namespace: PromiseOrValue, 691 | name: PromiseOrValue, 692 | hook: PromiseOrValue, 693 | overrides?: Overrides & { from?: PromiseOrValue } 694 | ): Promise; 695 | 696 | registerTable( 697 | namespace: PromiseOrValue, 698 | name: PromiseOrValue, 699 | valueSchema: PromiseOrValue, 700 | keySchema: PromiseOrValue, 701 | overrides?: Overrides & { from?: PromiseOrValue } 702 | ): Promise; 703 | 704 | registerTableHook( 705 | namespace: PromiseOrValue, 706 | name: PromiseOrValue, 707 | hook: PromiseOrValue, 708 | overrides?: Overrides & { from?: PromiseOrValue } 709 | ): Promise; 710 | 711 | revokeAccess( 712 | namespace: PromiseOrValue, 713 | name: PromiseOrValue, 714 | grantee: PromiseOrValue, 715 | overrides?: Overrides & { from?: PromiseOrValue } 716 | ): Promise; 717 | 718 | "setField(bytes32,bytes32[],uint8,bytes)"( 719 | table: PromiseOrValue, 720 | key: PromiseOrValue[], 721 | schemaIndex: PromiseOrValue, 722 | data: PromiseOrValue, 723 | overrides?: Overrides & { from?: PromiseOrValue } 724 | ): Promise; 725 | 726 | "setField(bytes16,bytes16,bytes32[],uint8,bytes)"( 727 | namespace: PromiseOrValue, 728 | name: PromiseOrValue, 729 | key: PromiseOrValue[], 730 | schemaIndex: PromiseOrValue, 731 | data: PromiseOrValue, 732 | overrides?: Overrides & { from?: PromiseOrValue } 733 | ): Promise; 734 | 735 | "setMetadata(bytes16,bytes16,string,string[])"( 736 | namespace: PromiseOrValue, 737 | name: PromiseOrValue, 738 | tableName: PromiseOrValue, 739 | fieldNames: PromiseOrValue[], 740 | overrides?: Overrides & { from?: PromiseOrValue } 741 | ): Promise; 742 | 743 | "setMetadata(bytes32,string,string[])"( 744 | table: PromiseOrValue, 745 | tableName: PromiseOrValue, 746 | fieldNames: PromiseOrValue[], 747 | overrides?: Overrides & { from?: PromiseOrValue } 748 | ): Promise; 749 | 750 | "setRecord(bytes16,bytes16,bytes32[],bytes)"( 751 | namespace: PromiseOrValue, 752 | name: PromiseOrValue, 753 | key: PromiseOrValue[], 754 | data: PromiseOrValue, 755 | overrides?: Overrides & { from?: PromiseOrValue } 756 | ): Promise; 757 | 758 | "setRecord(bytes32,bytes32[],bytes)"( 759 | table: PromiseOrValue, 760 | key: PromiseOrValue[], 761 | data: PromiseOrValue, 762 | overrides?: Overrides & { from?: PromiseOrValue } 763 | ): Promise; 764 | 765 | "updateInField(bytes32,bytes32[],uint8,uint256,bytes)"( 766 | table: PromiseOrValue, 767 | key: PromiseOrValue[], 768 | schemaIndex: PromiseOrValue, 769 | startByteIndex: PromiseOrValue, 770 | dataToSet: PromiseOrValue, 771 | overrides?: Overrides & { from?: PromiseOrValue } 772 | ): Promise; 773 | 774 | "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes)"( 775 | namespace: PromiseOrValue, 776 | name: PromiseOrValue, 777 | key: PromiseOrValue[], 778 | schemaIndex: PromiseOrValue, 779 | startByteIndex: PromiseOrValue, 780 | dataToSet: PromiseOrValue, 781 | overrides?: Overrides & { from?: PromiseOrValue } 782 | ): Promise; 783 | }; 784 | 785 | call( 786 | namespace: PromiseOrValue, 787 | name: PromiseOrValue, 788 | funcSelectorAndArgs: PromiseOrValue, 789 | overrides?: PayableOverrides & { from?: PromiseOrValue } 790 | ): Promise; 791 | 792 | "deleteRecord(bytes32,bytes32[])"( 793 | table: PromiseOrValue, 794 | key: PromiseOrValue[], 795 | overrides?: Overrides & { from?: PromiseOrValue } 796 | ): Promise; 797 | 798 | "deleteRecord(bytes16,bytes16,bytes32[])"( 799 | namespace: PromiseOrValue, 800 | name: PromiseOrValue, 801 | key: PromiseOrValue[], 802 | overrides?: Overrides & { from?: PromiseOrValue } 803 | ): Promise; 804 | 805 | getField( 806 | table: PromiseOrValue, 807 | key: PromiseOrValue[], 808 | schemaIndex: PromiseOrValue, 809 | overrides?: CallOverrides 810 | ): Promise; 811 | 812 | getKeySchema( 813 | table: PromiseOrValue, 814 | overrides?: CallOverrides 815 | ): Promise; 816 | 817 | "getRecord(bytes32,bytes32[],bytes32)"( 818 | table: PromiseOrValue, 819 | key: PromiseOrValue[], 820 | schema: PromiseOrValue, 821 | overrides?: CallOverrides 822 | ): Promise; 823 | 824 | "getRecord(bytes32,bytes32[])"( 825 | table: PromiseOrValue, 826 | key: PromiseOrValue[], 827 | overrides?: CallOverrides 828 | ): Promise; 829 | 830 | getSchema( 831 | table: PromiseOrValue, 832 | overrides?: CallOverrides 833 | ): Promise; 834 | 835 | grantAccess( 836 | namespace: PromiseOrValue, 837 | name: PromiseOrValue, 838 | grantee: PromiseOrValue, 839 | overrides?: Overrides & { from?: PromiseOrValue } 840 | ): Promise; 841 | 842 | increment( 843 | overrides?: Overrides & { from?: PromiseOrValue } 844 | ): Promise; 845 | 846 | installModule( 847 | module: PromiseOrValue, 848 | args: PromiseOrValue, 849 | overrides?: Overrides & { from?: PromiseOrValue } 850 | ): Promise; 851 | 852 | installRootModule( 853 | module: PromiseOrValue, 854 | args: PromiseOrValue, 855 | overrides?: Overrides & { from?: PromiseOrValue } 856 | ): Promise; 857 | 858 | isStore(overrides?: CallOverrides): Promise; 859 | 860 | "pushToField(bytes32,bytes32[],uint8,bytes)"( 861 | table: PromiseOrValue, 862 | key: PromiseOrValue[], 863 | schemaIndex: PromiseOrValue, 864 | dataToPush: PromiseOrValue, 865 | overrides?: Overrides & { from?: PromiseOrValue } 866 | ): Promise; 867 | 868 | "pushToField(bytes16,bytes16,bytes32[],uint8,bytes)"( 869 | namespace: PromiseOrValue, 870 | name: PromiseOrValue, 871 | key: PromiseOrValue[], 872 | schemaIndex: PromiseOrValue, 873 | dataToPush: PromiseOrValue, 874 | overrides?: Overrides & { from?: PromiseOrValue } 875 | ): Promise; 876 | 877 | registerFunctionSelector( 878 | namespace: PromiseOrValue, 879 | name: PromiseOrValue, 880 | systemFunctionName: PromiseOrValue, 881 | systemFunctionArguments: PromiseOrValue, 882 | overrides?: Overrides & { from?: PromiseOrValue } 883 | ): Promise; 884 | 885 | registerHook( 886 | namespace: PromiseOrValue, 887 | name: PromiseOrValue, 888 | hook: PromiseOrValue, 889 | overrides?: Overrides & { from?: PromiseOrValue } 890 | ): Promise; 891 | 892 | registerNamespace( 893 | namespace: PromiseOrValue, 894 | overrides?: Overrides & { from?: PromiseOrValue } 895 | ): Promise; 896 | 897 | registerRootFunctionSelector( 898 | namespace: PromiseOrValue, 899 | name: PromiseOrValue, 900 | worldFunctionSelector: PromiseOrValue, 901 | systemFunctionSelector: PromiseOrValue, 902 | overrides?: Overrides & { from?: PromiseOrValue } 903 | ): Promise; 904 | 905 | registerSchema( 906 | table: PromiseOrValue, 907 | schema: PromiseOrValue, 908 | keySchema: PromiseOrValue, 909 | overrides?: Overrides & { from?: PromiseOrValue } 910 | ): Promise; 911 | 912 | registerStoreHook( 913 | table: PromiseOrValue, 914 | hook: PromiseOrValue, 915 | overrides?: Overrides & { from?: PromiseOrValue } 916 | ): Promise; 917 | 918 | registerSystem( 919 | namespace: PromiseOrValue, 920 | name: PromiseOrValue, 921 | system: PromiseOrValue, 922 | publicAccess: PromiseOrValue, 923 | overrides?: Overrides & { from?: PromiseOrValue } 924 | ): Promise; 925 | 926 | registerSystemHook( 927 | namespace: PromiseOrValue, 928 | name: PromiseOrValue, 929 | hook: PromiseOrValue, 930 | overrides?: Overrides & { from?: PromiseOrValue } 931 | ): Promise; 932 | 933 | registerTable( 934 | namespace: PromiseOrValue, 935 | name: PromiseOrValue, 936 | valueSchema: PromiseOrValue, 937 | keySchema: PromiseOrValue, 938 | overrides?: Overrides & { from?: PromiseOrValue } 939 | ): Promise; 940 | 941 | registerTableHook( 942 | namespace: PromiseOrValue, 943 | name: PromiseOrValue, 944 | hook: PromiseOrValue, 945 | overrides?: Overrides & { from?: PromiseOrValue } 946 | ): Promise; 947 | 948 | revokeAccess( 949 | namespace: PromiseOrValue, 950 | name: PromiseOrValue, 951 | grantee: PromiseOrValue, 952 | overrides?: Overrides & { from?: PromiseOrValue } 953 | ): Promise; 954 | 955 | "setField(bytes32,bytes32[],uint8,bytes)"( 956 | table: PromiseOrValue, 957 | key: PromiseOrValue[], 958 | schemaIndex: PromiseOrValue, 959 | data: PromiseOrValue, 960 | overrides?: Overrides & { from?: PromiseOrValue } 961 | ): Promise; 962 | 963 | "setField(bytes16,bytes16,bytes32[],uint8,bytes)"( 964 | namespace: PromiseOrValue, 965 | name: PromiseOrValue, 966 | key: PromiseOrValue[], 967 | schemaIndex: PromiseOrValue, 968 | data: PromiseOrValue, 969 | overrides?: Overrides & { from?: PromiseOrValue } 970 | ): Promise; 971 | 972 | "setMetadata(bytes16,bytes16,string,string[])"( 973 | namespace: PromiseOrValue, 974 | name: PromiseOrValue, 975 | tableName: PromiseOrValue, 976 | fieldNames: PromiseOrValue[], 977 | overrides?: Overrides & { from?: PromiseOrValue } 978 | ): Promise; 979 | 980 | "setMetadata(bytes32,string,string[])"( 981 | table: PromiseOrValue, 982 | tableName: PromiseOrValue, 983 | fieldNames: PromiseOrValue[], 984 | overrides?: Overrides & { from?: PromiseOrValue } 985 | ): Promise; 986 | 987 | "setRecord(bytes16,bytes16,bytes32[],bytes)"( 988 | namespace: PromiseOrValue, 989 | name: PromiseOrValue, 990 | key: PromiseOrValue[], 991 | data: PromiseOrValue, 992 | overrides?: Overrides & { from?: PromiseOrValue } 993 | ): Promise; 994 | 995 | "setRecord(bytes32,bytes32[],bytes)"( 996 | table: PromiseOrValue, 997 | key: PromiseOrValue[], 998 | data: PromiseOrValue, 999 | overrides?: Overrides & { from?: PromiseOrValue } 1000 | ): Promise; 1001 | 1002 | "updateInField(bytes32,bytes32[],uint8,uint256,bytes)"( 1003 | table: PromiseOrValue, 1004 | key: PromiseOrValue[], 1005 | schemaIndex: PromiseOrValue, 1006 | startByteIndex: PromiseOrValue, 1007 | dataToSet: PromiseOrValue, 1008 | overrides?: Overrides & { from?: PromiseOrValue } 1009 | ): Promise; 1010 | 1011 | "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes)"( 1012 | namespace: PromiseOrValue, 1013 | name: PromiseOrValue, 1014 | key: PromiseOrValue[], 1015 | schemaIndex: PromiseOrValue, 1016 | startByteIndex: PromiseOrValue, 1017 | dataToSet: PromiseOrValue, 1018 | overrides?: Overrides & { from?: PromiseOrValue } 1019 | ): Promise; 1020 | 1021 | callStatic: { 1022 | call( 1023 | namespace: PromiseOrValue, 1024 | name: PromiseOrValue, 1025 | funcSelectorAndArgs: PromiseOrValue, 1026 | overrides?: CallOverrides 1027 | ): Promise; 1028 | 1029 | "deleteRecord(bytes32,bytes32[])"( 1030 | table: PromiseOrValue, 1031 | key: PromiseOrValue[], 1032 | overrides?: CallOverrides 1033 | ): Promise; 1034 | 1035 | "deleteRecord(bytes16,bytes16,bytes32[])"( 1036 | namespace: PromiseOrValue, 1037 | name: PromiseOrValue, 1038 | key: PromiseOrValue[], 1039 | overrides?: CallOverrides 1040 | ): Promise; 1041 | 1042 | getField( 1043 | table: PromiseOrValue, 1044 | key: PromiseOrValue[], 1045 | schemaIndex: PromiseOrValue, 1046 | overrides?: CallOverrides 1047 | ): Promise; 1048 | 1049 | getKeySchema( 1050 | table: PromiseOrValue, 1051 | overrides?: CallOverrides 1052 | ): Promise; 1053 | 1054 | "getRecord(bytes32,bytes32[],bytes32)"( 1055 | table: PromiseOrValue, 1056 | key: PromiseOrValue[], 1057 | schema: PromiseOrValue, 1058 | overrides?: CallOverrides 1059 | ): Promise; 1060 | 1061 | "getRecord(bytes32,bytes32[])"( 1062 | table: PromiseOrValue, 1063 | key: PromiseOrValue[], 1064 | overrides?: CallOverrides 1065 | ): Promise; 1066 | 1067 | getSchema( 1068 | table: PromiseOrValue, 1069 | overrides?: CallOverrides 1070 | ): Promise; 1071 | 1072 | grantAccess( 1073 | namespace: PromiseOrValue, 1074 | name: PromiseOrValue, 1075 | grantee: PromiseOrValue, 1076 | overrides?: CallOverrides 1077 | ): Promise; 1078 | 1079 | increment(overrides?: CallOverrides): Promise; 1080 | 1081 | installModule( 1082 | module: PromiseOrValue, 1083 | args: PromiseOrValue, 1084 | overrides?: CallOverrides 1085 | ): Promise; 1086 | 1087 | installRootModule( 1088 | module: PromiseOrValue, 1089 | args: PromiseOrValue, 1090 | overrides?: CallOverrides 1091 | ): Promise; 1092 | 1093 | isStore(overrides?: CallOverrides): Promise; 1094 | 1095 | "pushToField(bytes32,bytes32[],uint8,bytes)"( 1096 | table: PromiseOrValue, 1097 | key: PromiseOrValue[], 1098 | schemaIndex: PromiseOrValue, 1099 | dataToPush: PromiseOrValue, 1100 | overrides?: CallOverrides 1101 | ): Promise; 1102 | 1103 | "pushToField(bytes16,bytes16,bytes32[],uint8,bytes)"( 1104 | namespace: PromiseOrValue, 1105 | name: PromiseOrValue, 1106 | key: PromiseOrValue[], 1107 | schemaIndex: PromiseOrValue, 1108 | dataToPush: PromiseOrValue, 1109 | overrides?: CallOverrides 1110 | ): Promise; 1111 | 1112 | registerFunctionSelector( 1113 | namespace: PromiseOrValue, 1114 | name: PromiseOrValue, 1115 | systemFunctionName: PromiseOrValue, 1116 | systemFunctionArguments: PromiseOrValue, 1117 | overrides?: CallOverrides 1118 | ): Promise; 1119 | 1120 | registerHook( 1121 | namespace: PromiseOrValue, 1122 | name: PromiseOrValue, 1123 | hook: PromiseOrValue, 1124 | overrides?: CallOverrides 1125 | ): Promise; 1126 | 1127 | registerNamespace( 1128 | namespace: PromiseOrValue, 1129 | overrides?: CallOverrides 1130 | ): Promise; 1131 | 1132 | registerRootFunctionSelector( 1133 | namespace: PromiseOrValue, 1134 | name: PromiseOrValue, 1135 | worldFunctionSelector: PromiseOrValue, 1136 | systemFunctionSelector: PromiseOrValue, 1137 | overrides?: CallOverrides 1138 | ): Promise; 1139 | 1140 | registerSchema( 1141 | table: PromiseOrValue, 1142 | schema: PromiseOrValue, 1143 | keySchema: PromiseOrValue, 1144 | overrides?: CallOverrides 1145 | ): Promise; 1146 | 1147 | registerStoreHook( 1148 | table: PromiseOrValue, 1149 | hook: PromiseOrValue, 1150 | overrides?: CallOverrides 1151 | ): Promise; 1152 | 1153 | registerSystem( 1154 | namespace: PromiseOrValue, 1155 | name: PromiseOrValue, 1156 | system: PromiseOrValue, 1157 | publicAccess: PromiseOrValue, 1158 | overrides?: CallOverrides 1159 | ): Promise; 1160 | 1161 | registerSystemHook( 1162 | namespace: PromiseOrValue, 1163 | name: PromiseOrValue, 1164 | hook: PromiseOrValue, 1165 | overrides?: CallOverrides 1166 | ): Promise; 1167 | 1168 | registerTable( 1169 | namespace: PromiseOrValue, 1170 | name: PromiseOrValue, 1171 | valueSchema: PromiseOrValue, 1172 | keySchema: PromiseOrValue, 1173 | overrides?: CallOverrides 1174 | ): Promise; 1175 | 1176 | registerTableHook( 1177 | namespace: PromiseOrValue, 1178 | name: PromiseOrValue, 1179 | hook: PromiseOrValue, 1180 | overrides?: CallOverrides 1181 | ): Promise; 1182 | 1183 | revokeAccess( 1184 | namespace: PromiseOrValue, 1185 | name: PromiseOrValue, 1186 | grantee: PromiseOrValue, 1187 | overrides?: CallOverrides 1188 | ): Promise; 1189 | 1190 | "setField(bytes32,bytes32[],uint8,bytes)"( 1191 | table: PromiseOrValue, 1192 | key: PromiseOrValue[], 1193 | schemaIndex: PromiseOrValue, 1194 | data: PromiseOrValue, 1195 | overrides?: CallOverrides 1196 | ): Promise; 1197 | 1198 | "setField(bytes16,bytes16,bytes32[],uint8,bytes)"( 1199 | namespace: PromiseOrValue, 1200 | name: PromiseOrValue, 1201 | key: PromiseOrValue[], 1202 | schemaIndex: PromiseOrValue, 1203 | data: PromiseOrValue, 1204 | overrides?: CallOverrides 1205 | ): Promise; 1206 | 1207 | "setMetadata(bytes16,bytes16,string,string[])"( 1208 | namespace: PromiseOrValue, 1209 | name: PromiseOrValue, 1210 | tableName: PromiseOrValue, 1211 | fieldNames: PromiseOrValue[], 1212 | overrides?: CallOverrides 1213 | ): Promise; 1214 | 1215 | "setMetadata(bytes32,string,string[])"( 1216 | table: PromiseOrValue, 1217 | tableName: PromiseOrValue, 1218 | fieldNames: PromiseOrValue[], 1219 | overrides?: CallOverrides 1220 | ): Promise; 1221 | 1222 | "setRecord(bytes16,bytes16,bytes32[],bytes)"( 1223 | namespace: PromiseOrValue, 1224 | name: PromiseOrValue, 1225 | key: PromiseOrValue[], 1226 | data: PromiseOrValue, 1227 | overrides?: CallOverrides 1228 | ): Promise; 1229 | 1230 | "setRecord(bytes32,bytes32[],bytes)"( 1231 | table: PromiseOrValue, 1232 | key: PromiseOrValue[], 1233 | data: PromiseOrValue, 1234 | overrides?: CallOverrides 1235 | ): Promise; 1236 | 1237 | "updateInField(bytes32,bytes32[],uint8,uint256,bytes)"( 1238 | table: PromiseOrValue, 1239 | key: PromiseOrValue[], 1240 | schemaIndex: PromiseOrValue, 1241 | startByteIndex: PromiseOrValue, 1242 | dataToSet: PromiseOrValue, 1243 | overrides?: CallOverrides 1244 | ): Promise; 1245 | 1246 | "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes)"( 1247 | namespace: PromiseOrValue, 1248 | name: PromiseOrValue, 1249 | key: PromiseOrValue[], 1250 | schemaIndex: PromiseOrValue, 1251 | startByteIndex: PromiseOrValue, 1252 | dataToSet: PromiseOrValue, 1253 | overrides?: CallOverrides 1254 | ): Promise; 1255 | }; 1256 | 1257 | filters: { 1258 | "StoreDeleteRecord(bytes32,bytes32[])"( 1259 | table?: null, 1260 | key?: null 1261 | ): StoreDeleteRecordEventFilter; 1262 | StoreDeleteRecord(table?: null, key?: null): StoreDeleteRecordEventFilter; 1263 | 1264 | "StoreSetField(bytes32,bytes32[],uint8,bytes)"( 1265 | table?: null, 1266 | key?: null, 1267 | schemaIndex?: null, 1268 | data?: null 1269 | ): StoreSetFieldEventFilter; 1270 | StoreSetField( 1271 | table?: null, 1272 | key?: null, 1273 | schemaIndex?: null, 1274 | data?: null 1275 | ): StoreSetFieldEventFilter; 1276 | 1277 | "StoreSetRecord(bytes32,bytes32[],bytes)"( 1278 | table?: null, 1279 | key?: null, 1280 | data?: null 1281 | ): StoreSetRecordEventFilter; 1282 | StoreSetRecord( 1283 | table?: null, 1284 | key?: null, 1285 | data?: null 1286 | ): StoreSetRecordEventFilter; 1287 | }; 1288 | 1289 | estimateGas: { 1290 | call( 1291 | namespace: PromiseOrValue, 1292 | name: PromiseOrValue, 1293 | funcSelectorAndArgs: PromiseOrValue, 1294 | overrides?: PayableOverrides & { from?: PromiseOrValue } 1295 | ): Promise; 1296 | 1297 | "deleteRecord(bytes32,bytes32[])"( 1298 | table: PromiseOrValue, 1299 | key: PromiseOrValue[], 1300 | overrides?: Overrides & { from?: PromiseOrValue } 1301 | ): Promise; 1302 | 1303 | "deleteRecord(bytes16,bytes16,bytes32[])"( 1304 | namespace: PromiseOrValue, 1305 | name: PromiseOrValue, 1306 | key: PromiseOrValue[], 1307 | overrides?: Overrides & { from?: PromiseOrValue } 1308 | ): Promise; 1309 | 1310 | getField( 1311 | table: PromiseOrValue, 1312 | key: PromiseOrValue[], 1313 | schemaIndex: PromiseOrValue, 1314 | overrides?: CallOverrides 1315 | ): Promise; 1316 | 1317 | getKeySchema( 1318 | table: PromiseOrValue, 1319 | overrides?: CallOverrides 1320 | ): Promise; 1321 | 1322 | "getRecord(bytes32,bytes32[],bytes32)"( 1323 | table: PromiseOrValue, 1324 | key: PromiseOrValue[], 1325 | schema: PromiseOrValue, 1326 | overrides?: CallOverrides 1327 | ): Promise; 1328 | 1329 | "getRecord(bytes32,bytes32[])"( 1330 | table: PromiseOrValue, 1331 | key: PromiseOrValue[], 1332 | overrides?: CallOverrides 1333 | ): Promise; 1334 | 1335 | getSchema( 1336 | table: PromiseOrValue, 1337 | overrides?: CallOverrides 1338 | ): Promise; 1339 | 1340 | grantAccess( 1341 | namespace: PromiseOrValue, 1342 | name: PromiseOrValue, 1343 | grantee: PromiseOrValue, 1344 | overrides?: Overrides & { from?: PromiseOrValue } 1345 | ): Promise; 1346 | 1347 | increment( 1348 | overrides?: Overrides & { from?: PromiseOrValue } 1349 | ): Promise; 1350 | 1351 | installModule( 1352 | module: PromiseOrValue, 1353 | args: PromiseOrValue, 1354 | overrides?: Overrides & { from?: PromiseOrValue } 1355 | ): Promise; 1356 | 1357 | installRootModule( 1358 | module: PromiseOrValue, 1359 | args: PromiseOrValue, 1360 | overrides?: Overrides & { from?: PromiseOrValue } 1361 | ): Promise; 1362 | 1363 | isStore(overrides?: CallOverrides): Promise; 1364 | 1365 | "pushToField(bytes32,bytes32[],uint8,bytes)"( 1366 | table: PromiseOrValue, 1367 | key: PromiseOrValue[], 1368 | schemaIndex: PromiseOrValue, 1369 | dataToPush: PromiseOrValue, 1370 | overrides?: Overrides & { from?: PromiseOrValue } 1371 | ): Promise; 1372 | 1373 | "pushToField(bytes16,bytes16,bytes32[],uint8,bytes)"( 1374 | namespace: PromiseOrValue, 1375 | name: PromiseOrValue, 1376 | key: PromiseOrValue[], 1377 | schemaIndex: PromiseOrValue, 1378 | dataToPush: PromiseOrValue, 1379 | overrides?: Overrides & { from?: PromiseOrValue } 1380 | ): Promise; 1381 | 1382 | registerFunctionSelector( 1383 | namespace: PromiseOrValue, 1384 | name: PromiseOrValue, 1385 | systemFunctionName: PromiseOrValue, 1386 | systemFunctionArguments: PromiseOrValue, 1387 | overrides?: Overrides & { from?: PromiseOrValue } 1388 | ): Promise; 1389 | 1390 | registerHook( 1391 | namespace: PromiseOrValue, 1392 | name: PromiseOrValue, 1393 | hook: PromiseOrValue, 1394 | overrides?: Overrides & { from?: PromiseOrValue } 1395 | ): Promise; 1396 | 1397 | registerNamespace( 1398 | namespace: PromiseOrValue, 1399 | overrides?: Overrides & { from?: PromiseOrValue } 1400 | ): Promise; 1401 | 1402 | registerRootFunctionSelector( 1403 | namespace: PromiseOrValue, 1404 | name: PromiseOrValue, 1405 | worldFunctionSelector: PromiseOrValue, 1406 | systemFunctionSelector: PromiseOrValue, 1407 | overrides?: Overrides & { from?: PromiseOrValue } 1408 | ): Promise; 1409 | 1410 | registerSchema( 1411 | table: PromiseOrValue, 1412 | schema: PromiseOrValue, 1413 | keySchema: PromiseOrValue, 1414 | overrides?: Overrides & { from?: PromiseOrValue } 1415 | ): Promise; 1416 | 1417 | registerStoreHook( 1418 | table: PromiseOrValue, 1419 | hook: PromiseOrValue, 1420 | overrides?: Overrides & { from?: PromiseOrValue } 1421 | ): Promise; 1422 | 1423 | registerSystem( 1424 | namespace: PromiseOrValue, 1425 | name: PromiseOrValue, 1426 | system: PromiseOrValue, 1427 | publicAccess: PromiseOrValue, 1428 | overrides?: Overrides & { from?: PromiseOrValue } 1429 | ): Promise; 1430 | 1431 | registerSystemHook( 1432 | namespace: PromiseOrValue, 1433 | name: PromiseOrValue, 1434 | hook: PromiseOrValue, 1435 | overrides?: Overrides & { from?: PromiseOrValue } 1436 | ): Promise; 1437 | 1438 | registerTable( 1439 | namespace: PromiseOrValue, 1440 | name: PromiseOrValue, 1441 | valueSchema: PromiseOrValue, 1442 | keySchema: PromiseOrValue, 1443 | overrides?: Overrides & { from?: PromiseOrValue } 1444 | ): Promise; 1445 | 1446 | registerTableHook( 1447 | namespace: PromiseOrValue, 1448 | name: PromiseOrValue, 1449 | hook: PromiseOrValue, 1450 | overrides?: Overrides & { from?: PromiseOrValue } 1451 | ): Promise; 1452 | 1453 | revokeAccess( 1454 | namespace: PromiseOrValue, 1455 | name: PromiseOrValue, 1456 | grantee: PromiseOrValue, 1457 | overrides?: Overrides & { from?: PromiseOrValue } 1458 | ): Promise; 1459 | 1460 | "setField(bytes32,bytes32[],uint8,bytes)"( 1461 | table: PromiseOrValue, 1462 | key: PromiseOrValue[], 1463 | schemaIndex: PromiseOrValue, 1464 | data: PromiseOrValue, 1465 | overrides?: Overrides & { from?: PromiseOrValue } 1466 | ): Promise; 1467 | 1468 | "setField(bytes16,bytes16,bytes32[],uint8,bytes)"( 1469 | namespace: PromiseOrValue, 1470 | name: PromiseOrValue, 1471 | key: PromiseOrValue[], 1472 | schemaIndex: PromiseOrValue, 1473 | data: PromiseOrValue, 1474 | overrides?: Overrides & { from?: PromiseOrValue } 1475 | ): Promise; 1476 | 1477 | "setMetadata(bytes16,bytes16,string,string[])"( 1478 | namespace: PromiseOrValue, 1479 | name: PromiseOrValue, 1480 | tableName: PromiseOrValue, 1481 | fieldNames: PromiseOrValue[], 1482 | overrides?: Overrides & { from?: PromiseOrValue } 1483 | ): Promise; 1484 | 1485 | "setMetadata(bytes32,string,string[])"( 1486 | table: PromiseOrValue, 1487 | tableName: PromiseOrValue, 1488 | fieldNames: PromiseOrValue[], 1489 | overrides?: Overrides & { from?: PromiseOrValue } 1490 | ): Promise; 1491 | 1492 | "setRecord(bytes16,bytes16,bytes32[],bytes)"( 1493 | namespace: PromiseOrValue, 1494 | name: PromiseOrValue, 1495 | key: PromiseOrValue[], 1496 | data: PromiseOrValue, 1497 | overrides?: Overrides & { from?: PromiseOrValue } 1498 | ): Promise; 1499 | 1500 | "setRecord(bytes32,bytes32[],bytes)"( 1501 | table: PromiseOrValue, 1502 | key: PromiseOrValue[], 1503 | data: PromiseOrValue, 1504 | overrides?: Overrides & { from?: PromiseOrValue } 1505 | ): Promise; 1506 | 1507 | "updateInField(bytes32,bytes32[],uint8,uint256,bytes)"( 1508 | table: PromiseOrValue, 1509 | key: PromiseOrValue[], 1510 | schemaIndex: PromiseOrValue, 1511 | startByteIndex: PromiseOrValue, 1512 | dataToSet: PromiseOrValue, 1513 | overrides?: Overrides & { from?: PromiseOrValue } 1514 | ): Promise; 1515 | 1516 | "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes)"( 1517 | namespace: PromiseOrValue, 1518 | name: PromiseOrValue, 1519 | key: PromiseOrValue[], 1520 | schemaIndex: PromiseOrValue, 1521 | startByteIndex: PromiseOrValue, 1522 | dataToSet: PromiseOrValue, 1523 | overrides?: Overrides & { from?: PromiseOrValue } 1524 | ): Promise; 1525 | }; 1526 | 1527 | populateTransaction: { 1528 | call( 1529 | namespace: PromiseOrValue, 1530 | name: PromiseOrValue, 1531 | funcSelectorAndArgs: PromiseOrValue, 1532 | overrides?: PayableOverrides & { from?: PromiseOrValue } 1533 | ): Promise; 1534 | 1535 | "deleteRecord(bytes32,bytes32[])"( 1536 | table: PromiseOrValue, 1537 | key: PromiseOrValue[], 1538 | overrides?: Overrides & { from?: PromiseOrValue } 1539 | ): Promise; 1540 | 1541 | "deleteRecord(bytes16,bytes16,bytes32[])"( 1542 | namespace: PromiseOrValue, 1543 | name: PromiseOrValue, 1544 | key: PromiseOrValue[], 1545 | overrides?: Overrides & { from?: PromiseOrValue } 1546 | ): Promise; 1547 | 1548 | getField( 1549 | table: PromiseOrValue, 1550 | key: PromiseOrValue[], 1551 | schemaIndex: PromiseOrValue, 1552 | overrides?: CallOverrides 1553 | ): Promise; 1554 | 1555 | getKeySchema( 1556 | table: PromiseOrValue, 1557 | overrides?: CallOverrides 1558 | ): Promise; 1559 | 1560 | "getRecord(bytes32,bytes32[],bytes32)"( 1561 | table: PromiseOrValue, 1562 | key: PromiseOrValue[], 1563 | schema: PromiseOrValue, 1564 | overrides?: CallOverrides 1565 | ): Promise; 1566 | 1567 | "getRecord(bytes32,bytes32[])"( 1568 | table: PromiseOrValue, 1569 | key: PromiseOrValue[], 1570 | overrides?: CallOverrides 1571 | ): Promise; 1572 | 1573 | getSchema( 1574 | table: PromiseOrValue, 1575 | overrides?: CallOverrides 1576 | ): Promise; 1577 | 1578 | grantAccess( 1579 | namespace: PromiseOrValue, 1580 | name: PromiseOrValue, 1581 | grantee: PromiseOrValue, 1582 | overrides?: Overrides & { from?: PromiseOrValue } 1583 | ): Promise; 1584 | 1585 | increment( 1586 | overrides?: Overrides & { from?: PromiseOrValue } 1587 | ): Promise; 1588 | 1589 | installModule( 1590 | module: PromiseOrValue, 1591 | args: PromiseOrValue, 1592 | overrides?: Overrides & { from?: PromiseOrValue } 1593 | ): Promise; 1594 | 1595 | installRootModule( 1596 | module: PromiseOrValue, 1597 | args: PromiseOrValue, 1598 | overrides?: Overrides & { from?: PromiseOrValue } 1599 | ): Promise; 1600 | 1601 | isStore(overrides?: CallOverrides): Promise; 1602 | 1603 | "pushToField(bytes32,bytes32[],uint8,bytes)"( 1604 | table: PromiseOrValue, 1605 | key: PromiseOrValue[], 1606 | schemaIndex: PromiseOrValue, 1607 | dataToPush: PromiseOrValue, 1608 | overrides?: Overrides & { from?: PromiseOrValue } 1609 | ): Promise; 1610 | 1611 | "pushToField(bytes16,bytes16,bytes32[],uint8,bytes)"( 1612 | namespace: PromiseOrValue, 1613 | name: PromiseOrValue, 1614 | key: PromiseOrValue[], 1615 | schemaIndex: PromiseOrValue, 1616 | dataToPush: PromiseOrValue, 1617 | overrides?: Overrides & { from?: PromiseOrValue } 1618 | ): Promise; 1619 | 1620 | registerFunctionSelector( 1621 | namespace: PromiseOrValue, 1622 | name: PromiseOrValue, 1623 | systemFunctionName: PromiseOrValue, 1624 | systemFunctionArguments: PromiseOrValue, 1625 | overrides?: Overrides & { from?: PromiseOrValue } 1626 | ): Promise; 1627 | 1628 | registerHook( 1629 | namespace: PromiseOrValue, 1630 | name: PromiseOrValue, 1631 | hook: PromiseOrValue, 1632 | overrides?: Overrides & { from?: PromiseOrValue } 1633 | ): Promise; 1634 | 1635 | registerNamespace( 1636 | namespace: PromiseOrValue, 1637 | overrides?: Overrides & { from?: PromiseOrValue } 1638 | ): Promise; 1639 | 1640 | registerRootFunctionSelector( 1641 | namespace: PromiseOrValue, 1642 | name: PromiseOrValue, 1643 | worldFunctionSelector: PromiseOrValue, 1644 | systemFunctionSelector: PromiseOrValue, 1645 | overrides?: Overrides & { from?: PromiseOrValue } 1646 | ): Promise; 1647 | 1648 | registerSchema( 1649 | table: PromiseOrValue, 1650 | schema: PromiseOrValue, 1651 | keySchema: PromiseOrValue, 1652 | overrides?: Overrides & { from?: PromiseOrValue } 1653 | ): Promise; 1654 | 1655 | registerStoreHook( 1656 | table: PromiseOrValue, 1657 | hook: PromiseOrValue, 1658 | overrides?: Overrides & { from?: PromiseOrValue } 1659 | ): Promise; 1660 | 1661 | registerSystem( 1662 | namespace: PromiseOrValue, 1663 | name: PromiseOrValue, 1664 | system: PromiseOrValue, 1665 | publicAccess: PromiseOrValue, 1666 | overrides?: Overrides & { from?: PromiseOrValue } 1667 | ): Promise; 1668 | 1669 | registerSystemHook( 1670 | namespace: PromiseOrValue, 1671 | name: PromiseOrValue, 1672 | hook: PromiseOrValue, 1673 | overrides?: Overrides & { from?: PromiseOrValue } 1674 | ): Promise; 1675 | 1676 | registerTable( 1677 | namespace: PromiseOrValue, 1678 | name: PromiseOrValue, 1679 | valueSchema: PromiseOrValue, 1680 | keySchema: PromiseOrValue, 1681 | overrides?: Overrides & { from?: PromiseOrValue } 1682 | ): Promise; 1683 | 1684 | registerTableHook( 1685 | namespace: PromiseOrValue, 1686 | name: PromiseOrValue, 1687 | hook: PromiseOrValue, 1688 | overrides?: Overrides & { from?: PromiseOrValue } 1689 | ): Promise; 1690 | 1691 | revokeAccess( 1692 | namespace: PromiseOrValue, 1693 | name: PromiseOrValue, 1694 | grantee: PromiseOrValue, 1695 | overrides?: Overrides & { from?: PromiseOrValue } 1696 | ): Promise; 1697 | 1698 | "setField(bytes32,bytes32[],uint8,bytes)"( 1699 | table: PromiseOrValue, 1700 | key: PromiseOrValue[], 1701 | schemaIndex: PromiseOrValue, 1702 | data: PromiseOrValue, 1703 | overrides?: Overrides & { from?: PromiseOrValue } 1704 | ): Promise; 1705 | 1706 | "setField(bytes16,bytes16,bytes32[],uint8,bytes)"( 1707 | namespace: PromiseOrValue, 1708 | name: PromiseOrValue, 1709 | key: PromiseOrValue[], 1710 | schemaIndex: PromiseOrValue, 1711 | data: PromiseOrValue, 1712 | overrides?: Overrides & { from?: PromiseOrValue } 1713 | ): Promise; 1714 | 1715 | "setMetadata(bytes16,bytes16,string,string[])"( 1716 | namespace: PromiseOrValue, 1717 | name: PromiseOrValue, 1718 | tableName: PromiseOrValue, 1719 | fieldNames: PromiseOrValue[], 1720 | overrides?: Overrides & { from?: PromiseOrValue } 1721 | ): Promise; 1722 | 1723 | "setMetadata(bytes32,string,string[])"( 1724 | table: PromiseOrValue, 1725 | tableName: PromiseOrValue, 1726 | fieldNames: PromiseOrValue[], 1727 | overrides?: Overrides & { from?: PromiseOrValue } 1728 | ): Promise; 1729 | 1730 | "setRecord(bytes16,bytes16,bytes32[],bytes)"( 1731 | namespace: PromiseOrValue, 1732 | name: PromiseOrValue, 1733 | key: PromiseOrValue[], 1734 | data: PromiseOrValue, 1735 | overrides?: Overrides & { from?: PromiseOrValue } 1736 | ): Promise; 1737 | 1738 | "setRecord(bytes32,bytes32[],bytes)"( 1739 | table: PromiseOrValue, 1740 | key: PromiseOrValue[], 1741 | data: PromiseOrValue, 1742 | overrides?: Overrides & { from?: PromiseOrValue } 1743 | ): Promise; 1744 | 1745 | "updateInField(bytes32,bytes32[],uint8,uint256,bytes)"( 1746 | table: PromiseOrValue, 1747 | key: PromiseOrValue[], 1748 | schemaIndex: PromiseOrValue, 1749 | startByteIndex: PromiseOrValue, 1750 | dataToSet: PromiseOrValue, 1751 | overrides?: Overrides & { from?: PromiseOrValue } 1752 | ): Promise; 1753 | 1754 | "updateInField(bytes16,bytes16,bytes32[],uint8,uint256,bytes)"( 1755 | namespace: PromiseOrValue, 1756 | name: PromiseOrValue, 1757 | key: PromiseOrValue[], 1758 | schemaIndex: PromiseOrValue, 1759 | startByteIndex: PromiseOrValue, 1760 | dataToSet: PromiseOrValue, 1761 | overrides?: Overrides & { from?: PromiseOrValue } 1762 | ): Promise; 1763 | }; 1764 | } 1765 | -------------------------------------------------------------------------------- /packages/contracts/types/ethers-contracts/common.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import type { Listener } from "@ethersproject/providers"; 5 | import type { Event, EventFilter } from "ethers"; 6 | 7 | export interface TypedEvent< 8 | TArgsArray extends Array = any, 9 | TArgsObject = any 10 | > extends Event { 11 | args: TArgsArray & TArgsObject; 12 | } 13 | 14 | export interface TypedEventFilter<_TEvent extends TypedEvent> 15 | extends EventFilter {} 16 | 17 | export interface TypedListener { 18 | (...listenerArg: [...__TypechainArgsArray, TEvent]): void; 19 | } 20 | 21 | type __TypechainArgsArray = T extends TypedEvent ? U : never; 22 | 23 | export interface OnEvent { 24 | ( 25 | eventFilter: TypedEventFilter, 26 | listener: TypedListener 27 | ): TRes; 28 | (eventName: string, listener: Listener): TRes; 29 | } 30 | 31 | export type MinEthersFactory = { 32 | deploy(...a: ARGS[]): Promise; 33 | }; 34 | 35 | export type GetContractTypeFromFactory = F extends MinEthersFactory< 36 | infer C, 37 | any 38 | > 39 | ? C 40 | : never; 41 | 42 | export type GetARGsTypeFromFactory = F extends MinEthersFactory 43 | ? Parameters 44 | : never; 45 | 46 | export type PromiseOrValue = T | Promise; 47 | -------------------------------------------------------------------------------- /packages/contracts/types/ethers-contracts/factories/IWorld__factory.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { Contract, Signer, utils } from "ethers"; 6 | import type { Provider } from "@ethersproject/providers"; 7 | import type { IWorld, IWorldInterface } from "../IWorld"; 8 | 9 | const _abi = [ 10 | { 11 | inputs: [ 12 | { 13 | internalType: "string", 14 | name: "resource", 15 | type: "string", 16 | }, 17 | { 18 | internalType: "address", 19 | name: "caller", 20 | type: "address", 21 | }, 22 | ], 23 | name: "AccessDenied", 24 | type: "error", 25 | }, 26 | { 27 | inputs: [ 28 | { 29 | internalType: "bytes4", 30 | name: "functionSelector", 31 | type: "bytes4", 32 | }, 33 | ], 34 | name: "FunctionSelectorExists", 35 | type: "error", 36 | }, 37 | { 38 | inputs: [ 39 | { 40 | internalType: "bytes4", 41 | name: "functionSelector", 42 | type: "bytes4", 43 | }, 44 | ], 45 | name: "FunctionSelectorNotFound", 46 | type: "error", 47 | }, 48 | { 49 | inputs: [ 50 | { 51 | internalType: "string", 52 | name: "resource", 53 | type: "string", 54 | }, 55 | ], 56 | name: "InvalidSelector", 57 | type: "error", 58 | }, 59 | { 60 | inputs: [ 61 | { 62 | internalType: "string", 63 | name: "module", 64 | type: "string", 65 | }, 66 | ], 67 | name: "ModuleAlreadyInstalled", 68 | type: "error", 69 | }, 70 | { 71 | inputs: [ 72 | { 73 | internalType: "string", 74 | name: "resource", 75 | type: "string", 76 | }, 77 | ], 78 | name: "ResourceExists", 79 | type: "error", 80 | }, 81 | { 82 | inputs: [ 83 | { 84 | internalType: "string", 85 | name: "resource", 86 | type: "string", 87 | }, 88 | ], 89 | name: "ResourceNotFound", 90 | type: "error", 91 | }, 92 | { 93 | inputs: [ 94 | { 95 | internalType: "address", 96 | name: "system", 97 | type: "address", 98 | }, 99 | ], 100 | name: "SystemExists", 101 | type: "error", 102 | }, 103 | { 104 | anonymous: false, 105 | inputs: [ 106 | { 107 | indexed: false, 108 | internalType: "bytes32", 109 | name: "table", 110 | type: "bytes32", 111 | }, 112 | { 113 | indexed: false, 114 | internalType: "bytes32[]", 115 | name: "key", 116 | type: "bytes32[]", 117 | }, 118 | ], 119 | name: "StoreDeleteRecord", 120 | type: "event", 121 | }, 122 | { 123 | anonymous: false, 124 | inputs: [ 125 | { 126 | indexed: false, 127 | internalType: "bytes32", 128 | name: "table", 129 | type: "bytes32", 130 | }, 131 | { 132 | indexed: false, 133 | internalType: "bytes32[]", 134 | name: "key", 135 | type: "bytes32[]", 136 | }, 137 | { 138 | indexed: false, 139 | internalType: "uint8", 140 | name: "schemaIndex", 141 | type: "uint8", 142 | }, 143 | { 144 | indexed: false, 145 | internalType: "bytes", 146 | name: "data", 147 | type: "bytes", 148 | }, 149 | ], 150 | name: "StoreSetField", 151 | type: "event", 152 | }, 153 | { 154 | anonymous: false, 155 | inputs: [ 156 | { 157 | indexed: false, 158 | internalType: "bytes32", 159 | name: "table", 160 | type: "bytes32", 161 | }, 162 | { 163 | indexed: false, 164 | internalType: "bytes32[]", 165 | name: "key", 166 | type: "bytes32[]", 167 | }, 168 | { 169 | indexed: false, 170 | internalType: "bytes", 171 | name: "data", 172 | type: "bytes", 173 | }, 174 | ], 175 | name: "StoreSetRecord", 176 | type: "event", 177 | }, 178 | { 179 | inputs: [ 180 | { 181 | internalType: "bytes16", 182 | name: "namespace", 183 | type: "bytes16", 184 | }, 185 | { 186 | internalType: "bytes16", 187 | name: "name", 188 | type: "bytes16", 189 | }, 190 | { 191 | internalType: "bytes", 192 | name: "funcSelectorAndArgs", 193 | type: "bytes", 194 | }, 195 | ], 196 | name: "call", 197 | outputs: [ 198 | { 199 | internalType: "bytes", 200 | name: "", 201 | type: "bytes", 202 | }, 203 | ], 204 | stateMutability: "payable", 205 | type: "function", 206 | }, 207 | { 208 | inputs: [ 209 | { 210 | internalType: "bytes32", 211 | name: "table", 212 | type: "bytes32", 213 | }, 214 | { 215 | internalType: "bytes32[]", 216 | name: "key", 217 | type: "bytes32[]", 218 | }, 219 | ], 220 | name: "deleteRecord", 221 | outputs: [], 222 | stateMutability: "nonpayable", 223 | type: "function", 224 | }, 225 | { 226 | inputs: [ 227 | { 228 | internalType: "bytes16", 229 | name: "namespace", 230 | type: "bytes16", 231 | }, 232 | { 233 | internalType: "bytes16", 234 | name: "name", 235 | type: "bytes16", 236 | }, 237 | { 238 | internalType: "bytes32[]", 239 | name: "key", 240 | type: "bytes32[]", 241 | }, 242 | ], 243 | name: "deleteRecord", 244 | outputs: [], 245 | stateMutability: "nonpayable", 246 | type: "function", 247 | }, 248 | { 249 | inputs: [ 250 | { 251 | internalType: "bytes32", 252 | name: "table", 253 | type: "bytes32", 254 | }, 255 | { 256 | internalType: "bytes32[]", 257 | name: "key", 258 | type: "bytes32[]", 259 | }, 260 | { 261 | internalType: "uint8", 262 | name: "schemaIndex", 263 | type: "uint8", 264 | }, 265 | ], 266 | name: "getField", 267 | outputs: [ 268 | { 269 | internalType: "bytes", 270 | name: "data", 271 | type: "bytes", 272 | }, 273 | ], 274 | stateMutability: "view", 275 | type: "function", 276 | }, 277 | { 278 | inputs: [ 279 | { 280 | internalType: "bytes32", 281 | name: "table", 282 | type: "bytes32", 283 | }, 284 | ], 285 | name: "getKeySchema", 286 | outputs: [ 287 | { 288 | internalType: "Schema", 289 | name: "schema", 290 | type: "bytes32", 291 | }, 292 | ], 293 | stateMutability: "view", 294 | type: "function", 295 | }, 296 | { 297 | inputs: [ 298 | { 299 | internalType: "bytes32", 300 | name: "table", 301 | type: "bytes32", 302 | }, 303 | { 304 | internalType: "bytes32[]", 305 | name: "key", 306 | type: "bytes32[]", 307 | }, 308 | { 309 | internalType: "Schema", 310 | name: "schema", 311 | type: "bytes32", 312 | }, 313 | ], 314 | name: "getRecord", 315 | outputs: [ 316 | { 317 | internalType: "bytes", 318 | name: "data", 319 | type: "bytes", 320 | }, 321 | ], 322 | stateMutability: "view", 323 | type: "function", 324 | }, 325 | { 326 | inputs: [ 327 | { 328 | internalType: "bytes32", 329 | name: "table", 330 | type: "bytes32", 331 | }, 332 | { 333 | internalType: "bytes32[]", 334 | name: "key", 335 | type: "bytes32[]", 336 | }, 337 | ], 338 | name: "getRecord", 339 | outputs: [ 340 | { 341 | internalType: "bytes", 342 | name: "data", 343 | type: "bytes", 344 | }, 345 | ], 346 | stateMutability: "view", 347 | type: "function", 348 | }, 349 | { 350 | inputs: [ 351 | { 352 | internalType: "bytes32", 353 | name: "table", 354 | type: "bytes32", 355 | }, 356 | ], 357 | name: "getSchema", 358 | outputs: [ 359 | { 360 | internalType: "Schema", 361 | name: "schema", 362 | type: "bytes32", 363 | }, 364 | ], 365 | stateMutability: "view", 366 | type: "function", 367 | }, 368 | { 369 | inputs: [ 370 | { 371 | internalType: "bytes16", 372 | name: "namespace", 373 | type: "bytes16", 374 | }, 375 | { 376 | internalType: "bytes16", 377 | name: "name", 378 | type: "bytes16", 379 | }, 380 | { 381 | internalType: "address", 382 | name: "grantee", 383 | type: "address", 384 | }, 385 | ], 386 | name: "grantAccess", 387 | outputs: [], 388 | stateMutability: "nonpayable", 389 | type: "function", 390 | }, 391 | { 392 | inputs: [], 393 | name: "increment", 394 | outputs: [ 395 | { 396 | internalType: "uint32", 397 | name: "", 398 | type: "uint32", 399 | }, 400 | ], 401 | stateMutability: "nonpayable", 402 | type: "function", 403 | }, 404 | { 405 | inputs: [ 406 | { 407 | internalType: "contract IModule", 408 | name: "module", 409 | type: "address", 410 | }, 411 | { 412 | internalType: "bytes", 413 | name: "args", 414 | type: "bytes", 415 | }, 416 | ], 417 | name: "installModule", 418 | outputs: [], 419 | stateMutability: "nonpayable", 420 | type: "function", 421 | }, 422 | { 423 | inputs: [ 424 | { 425 | internalType: "contract IModule", 426 | name: "module", 427 | type: "address", 428 | }, 429 | { 430 | internalType: "bytes", 431 | name: "args", 432 | type: "bytes", 433 | }, 434 | ], 435 | name: "installRootModule", 436 | outputs: [], 437 | stateMutability: "nonpayable", 438 | type: "function", 439 | }, 440 | { 441 | inputs: [], 442 | name: "isStore", 443 | outputs: [], 444 | stateMutability: "view", 445 | type: "function", 446 | }, 447 | { 448 | inputs: [ 449 | { 450 | internalType: "bytes32", 451 | name: "table", 452 | type: "bytes32", 453 | }, 454 | { 455 | internalType: "bytes32[]", 456 | name: "key", 457 | type: "bytes32[]", 458 | }, 459 | { 460 | internalType: "uint8", 461 | name: "schemaIndex", 462 | type: "uint8", 463 | }, 464 | { 465 | internalType: "bytes", 466 | name: "dataToPush", 467 | type: "bytes", 468 | }, 469 | ], 470 | name: "pushToField", 471 | outputs: [], 472 | stateMutability: "nonpayable", 473 | type: "function", 474 | }, 475 | { 476 | inputs: [ 477 | { 478 | internalType: "bytes16", 479 | name: "namespace", 480 | type: "bytes16", 481 | }, 482 | { 483 | internalType: "bytes16", 484 | name: "name", 485 | type: "bytes16", 486 | }, 487 | { 488 | internalType: "bytes32[]", 489 | name: "key", 490 | type: "bytes32[]", 491 | }, 492 | { 493 | internalType: "uint8", 494 | name: "schemaIndex", 495 | type: "uint8", 496 | }, 497 | { 498 | internalType: "bytes", 499 | name: "dataToPush", 500 | type: "bytes", 501 | }, 502 | ], 503 | name: "pushToField", 504 | outputs: [], 505 | stateMutability: "nonpayable", 506 | type: "function", 507 | }, 508 | { 509 | inputs: [ 510 | { 511 | internalType: "bytes16", 512 | name: "namespace", 513 | type: "bytes16", 514 | }, 515 | { 516 | internalType: "bytes16", 517 | name: "name", 518 | type: "bytes16", 519 | }, 520 | { 521 | internalType: "string", 522 | name: "systemFunctionName", 523 | type: "string", 524 | }, 525 | { 526 | internalType: "string", 527 | name: "systemFunctionArguments", 528 | type: "string", 529 | }, 530 | ], 531 | name: "registerFunctionSelector", 532 | outputs: [ 533 | { 534 | internalType: "bytes4", 535 | name: "worldFunctionSelector", 536 | type: "bytes4", 537 | }, 538 | ], 539 | stateMutability: "nonpayable", 540 | type: "function", 541 | }, 542 | { 543 | inputs: [ 544 | { 545 | internalType: "bytes16", 546 | name: "namespace", 547 | type: "bytes16", 548 | }, 549 | { 550 | internalType: "bytes16", 551 | name: "name", 552 | type: "bytes16", 553 | }, 554 | { 555 | internalType: "address", 556 | name: "hook", 557 | type: "address", 558 | }, 559 | ], 560 | name: "registerHook", 561 | outputs: [], 562 | stateMutability: "nonpayable", 563 | type: "function", 564 | }, 565 | { 566 | inputs: [ 567 | { 568 | internalType: "bytes16", 569 | name: "namespace", 570 | type: "bytes16", 571 | }, 572 | ], 573 | name: "registerNamespace", 574 | outputs: [], 575 | stateMutability: "nonpayable", 576 | type: "function", 577 | }, 578 | { 579 | inputs: [ 580 | { 581 | internalType: "bytes16", 582 | name: "namespace", 583 | type: "bytes16", 584 | }, 585 | { 586 | internalType: "bytes16", 587 | name: "name", 588 | type: "bytes16", 589 | }, 590 | { 591 | internalType: "bytes4", 592 | name: "worldFunctionSelector", 593 | type: "bytes4", 594 | }, 595 | { 596 | internalType: "bytes4", 597 | name: "systemFunctionSelector", 598 | type: "bytes4", 599 | }, 600 | ], 601 | name: "registerRootFunctionSelector", 602 | outputs: [ 603 | { 604 | internalType: "bytes4", 605 | name: "", 606 | type: "bytes4", 607 | }, 608 | ], 609 | stateMutability: "nonpayable", 610 | type: "function", 611 | }, 612 | { 613 | inputs: [ 614 | { 615 | internalType: "bytes32", 616 | name: "table", 617 | type: "bytes32", 618 | }, 619 | { 620 | internalType: "Schema", 621 | name: "schema", 622 | type: "bytes32", 623 | }, 624 | { 625 | internalType: "Schema", 626 | name: "keySchema", 627 | type: "bytes32", 628 | }, 629 | ], 630 | name: "registerSchema", 631 | outputs: [], 632 | stateMutability: "nonpayable", 633 | type: "function", 634 | }, 635 | { 636 | inputs: [ 637 | { 638 | internalType: "bytes32", 639 | name: "table", 640 | type: "bytes32", 641 | }, 642 | { 643 | internalType: "contract IStoreHook", 644 | name: "hook", 645 | type: "address", 646 | }, 647 | ], 648 | name: "registerStoreHook", 649 | outputs: [], 650 | stateMutability: "nonpayable", 651 | type: "function", 652 | }, 653 | { 654 | inputs: [ 655 | { 656 | internalType: "bytes16", 657 | name: "namespace", 658 | type: "bytes16", 659 | }, 660 | { 661 | internalType: "bytes16", 662 | name: "name", 663 | type: "bytes16", 664 | }, 665 | { 666 | internalType: "contract System", 667 | name: "system", 668 | type: "address", 669 | }, 670 | { 671 | internalType: "bool", 672 | name: "publicAccess", 673 | type: "bool", 674 | }, 675 | ], 676 | name: "registerSystem", 677 | outputs: [ 678 | { 679 | internalType: "bytes32", 680 | name: "resourceSelector", 681 | type: "bytes32", 682 | }, 683 | ], 684 | stateMutability: "nonpayable", 685 | type: "function", 686 | }, 687 | { 688 | inputs: [ 689 | { 690 | internalType: "bytes16", 691 | name: "namespace", 692 | type: "bytes16", 693 | }, 694 | { 695 | internalType: "bytes16", 696 | name: "name", 697 | type: "bytes16", 698 | }, 699 | { 700 | internalType: "contract ISystemHook", 701 | name: "hook", 702 | type: "address", 703 | }, 704 | ], 705 | name: "registerSystemHook", 706 | outputs: [], 707 | stateMutability: "nonpayable", 708 | type: "function", 709 | }, 710 | { 711 | inputs: [ 712 | { 713 | internalType: "bytes16", 714 | name: "namespace", 715 | type: "bytes16", 716 | }, 717 | { 718 | internalType: "bytes16", 719 | name: "name", 720 | type: "bytes16", 721 | }, 722 | { 723 | internalType: "Schema", 724 | name: "valueSchema", 725 | type: "bytes32", 726 | }, 727 | { 728 | internalType: "Schema", 729 | name: "keySchema", 730 | type: "bytes32", 731 | }, 732 | ], 733 | name: "registerTable", 734 | outputs: [ 735 | { 736 | internalType: "bytes32", 737 | name: "resourceSelector", 738 | type: "bytes32", 739 | }, 740 | ], 741 | stateMutability: "nonpayable", 742 | type: "function", 743 | }, 744 | { 745 | inputs: [ 746 | { 747 | internalType: "bytes16", 748 | name: "namespace", 749 | type: "bytes16", 750 | }, 751 | { 752 | internalType: "bytes16", 753 | name: "name", 754 | type: "bytes16", 755 | }, 756 | { 757 | internalType: "contract IStoreHook", 758 | name: "hook", 759 | type: "address", 760 | }, 761 | ], 762 | name: "registerTableHook", 763 | outputs: [], 764 | stateMutability: "nonpayable", 765 | type: "function", 766 | }, 767 | { 768 | inputs: [ 769 | { 770 | internalType: "bytes16", 771 | name: "namespace", 772 | type: "bytes16", 773 | }, 774 | { 775 | internalType: "bytes16", 776 | name: "name", 777 | type: "bytes16", 778 | }, 779 | { 780 | internalType: "address", 781 | name: "grantee", 782 | type: "address", 783 | }, 784 | ], 785 | name: "revokeAccess", 786 | outputs: [], 787 | stateMutability: "nonpayable", 788 | type: "function", 789 | }, 790 | { 791 | inputs: [ 792 | { 793 | internalType: "bytes32", 794 | name: "table", 795 | type: "bytes32", 796 | }, 797 | { 798 | internalType: "bytes32[]", 799 | name: "key", 800 | type: "bytes32[]", 801 | }, 802 | { 803 | internalType: "uint8", 804 | name: "schemaIndex", 805 | type: "uint8", 806 | }, 807 | { 808 | internalType: "bytes", 809 | name: "data", 810 | type: "bytes", 811 | }, 812 | ], 813 | name: "setField", 814 | outputs: [], 815 | stateMutability: "nonpayable", 816 | type: "function", 817 | }, 818 | { 819 | inputs: [ 820 | { 821 | internalType: "bytes16", 822 | name: "namespace", 823 | type: "bytes16", 824 | }, 825 | { 826 | internalType: "bytes16", 827 | name: "name", 828 | type: "bytes16", 829 | }, 830 | { 831 | internalType: "bytes32[]", 832 | name: "key", 833 | type: "bytes32[]", 834 | }, 835 | { 836 | internalType: "uint8", 837 | name: "schemaIndex", 838 | type: "uint8", 839 | }, 840 | { 841 | internalType: "bytes", 842 | name: "data", 843 | type: "bytes", 844 | }, 845 | ], 846 | name: "setField", 847 | outputs: [], 848 | stateMutability: "nonpayable", 849 | type: "function", 850 | }, 851 | { 852 | inputs: [ 853 | { 854 | internalType: "bytes16", 855 | name: "namespace", 856 | type: "bytes16", 857 | }, 858 | { 859 | internalType: "bytes16", 860 | name: "name", 861 | type: "bytes16", 862 | }, 863 | { 864 | internalType: "string", 865 | name: "tableName", 866 | type: "string", 867 | }, 868 | { 869 | internalType: "string[]", 870 | name: "fieldNames", 871 | type: "string[]", 872 | }, 873 | ], 874 | name: "setMetadata", 875 | outputs: [], 876 | stateMutability: "nonpayable", 877 | type: "function", 878 | }, 879 | { 880 | inputs: [ 881 | { 882 | internalType: "bytes32", 883 | name: "table", 884 | type: "bytes32", 885 | }, 886 | { 887 | internalType: "string", 888 | name: "tableName", 889 | type: "string", 890 | }, 891 | { 892 | internalType: "string[]", 893 | name: "fieldNames", 894 | type: "string[]", 895 | }, 896 | ], 897 | name: "setMetadata", 898 | outputs: [], 899 | stateMutability: "nonpayable", 900 | type: "function", 901 | }, 902 | { 903 | inputs: [ 904 | { 905 | internalType: "bytes16", 906 | name: "namespace", 907 | type: "bytes16", 908 | }, 909 | { 910 | internalType: "bytes16", 911 | name: "name", 912 | type: "bytes16", 913 | }, 914 | { 915 | internalType: "bytes32[]", 916 | name: "key", 917 | type: "bytes32[]", 918 | }, 919 | { 920 | internalType: "bytes", 921 | name: "data", 922 | type: "bytes", 923 | }, 924 | ], 925 | name: "setRecord", 926 | outputs: [], 927 | stateMutability: "nonpayable", 928 | type: "function", 929 | }, 930 | { 931 | inputs: [ 932 | { 933 | internalType: "bytes32", 934 | name: "table", 935 | type: "bytes32", 936 | }, 937 | { 938 | internalType: "bytes32[]", 939 | name: "key", 940 | type: "bytes32[]", 941 | }, 942 | { 943 | internalType: "bytes", 944 | name: "data", 945 | type: "bytes", 946 | }, 947 | ], 948 | name: "setRecord", 949 | outputs: [], 950 | stateMutability: "nonpayable", 951 | type: "function", 952 | }, 953 | { 954 | inputs: [ 955 | { 956 | internalType: "bytes32", 957 | name: "table", 958 | type: "bytes32", 959 | }, 960 | { 961 | internalType: "bytes32[]", 962 | name: "key", 963 | type: "bytes32[]", 964 | }, 965 | { 966 | internalType: "uint8", 967 | name: "schemaIndex", 968 | type: "uint8", 969 | }, 970 | { 971 | internalType: "uint256", 972 | name: "startByteIndex", 973 | type: "uint256", 974 | }, 975 | { 976 | internalType: "bytes", 977 | name: "dataToSet", 978 | type: "bytes", 979 | }, 980 | ], 981 | name: "updateInField", 982 | outputs: [], 983 | stateMutability: "nonpayable", 984 | type: "function", 985 | }, 986 | { 987 | inputs: [ 988 | { 989 | internalType: "bytes16", 990 | name: "namespace", 991 | type: "bytes16", 992 | }, 993 | { 994 | internalType: "bytes16", 995 | name: "name", 996 | type: "bytes16", 997 | }, 998 | { 999 | internalType: "bytes32[]", 1000 | name: "key", 1001 | type: "bytes32[]", 1002 | }, 1003 | { 1004 | internalType: "uint8", 1005 | name: "schemaIndex", 1006 | type: "uint8", 1007 | }, 1008 | { 1009 | internalType: "uint256", 1010 | name: "startByteIndex", 1011 | type: "uint256", 1012 | }, 1013 | { 1014 | internalType: "bytes", 1015 | name: "dataToSet", 1016 | type: "bytes", 1017 | }, 1018 | ], 1019 | name: "updateInField", 1020 | outputs: [], 1021 | stateMutability: "nonpayable", 1022 | type: "function", 1023 | }, 1024 | ] as const; 1025 | 1026 | export class IWorld__factory { 1027 | static readonly abi = _abi; 1028 | static createInterface(): IWorldInterface { 1029 | return new utils.Interface(_abi) as IWorldInterface; 1030 | } 1031 | static connect(address: string, signerOrProvider: Signer | Provider): IWorld { 1032 | return new Contract(address, _abi, signerOrProvider) as IWorld; 1033 | } 1034 | } 1035 | -------------------------------------------------------------------------------- /packages/contracts/types/ethers-contracts/factories/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export { IWorld__factory } from "./IWorld__factory"; 5 | -------------------------------------------------------------------------------- /packages/contracts/types/ethers-contracts/index.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export type { IWorld } from "./IWorld"; 5 | export * as factories from "./factories"; 6 | export { IWorld__factory } from "./factories/IWorld__factory"; 7 | --------------------------------------------------------------------------------